]> git.baikalelectronics.ru Git - kernel.git/commit
i40evf: properly handle ndo_set_mac_address calls
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 31 Aug 2015 23:54:44 +0000 (19:54 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 14 Oct 2015 06:22:48 +0000 (23:22 -0700)
commita59dc02e2d100c64cb6b2469b9cd78e2773d0b8d
treed07e4afca1abb04555bddd75190e458157504a88
parentd770ee8bdd910fca88bdd3bc4464c6b66da4d526
i40evf: properly handle ndo_set_mac_address calls

The driver was not correctly handling calls to its ndo_set_mac_address
method. It did not properly check to see if the override would be
allowed by the PF driver, and never removed the old address from its
filter list.

Add a new flag to the adapter struct which is set if the MAC address is
assigned by the PF. Check this flag and don't allow the MAC address to
be changed if it is set. Search for and properly remove the filter
for the old MAC address when the new one is set.

Change-ID: I817bf620c869c5a80e6a7eab65c9cbad1dc89799
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_main.c