]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: enforce proper storing of MAC address
authorJeffrey Huang <huangjw@broadcom.com>
Wed, 2 Dec 2015 06:54:07 +0000 (01:54 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2015 20:07:13 +0000 (15:07 -0500)
commite35ea9e47a02be50153f823769209ebe671843bf
treeae77e7383929fec2fd84b0af4828539d5fc07fae
parentccbd2fe734f0b6b3ec710e0735edac06953c7497
bnxt_en: enforce proper storing of MAC address

For PF, the bp->pf.mac_addr always holds the permanent MAC
addr assigned by the HW.  For VF, the bp->vf.mac_addr always
holds the administrator assigned VF MAC addr. The random
generated VF MAC addr should never get stored to bp->vf.mac_addr.
This way, when the VF wants to change the MAC address, we can tell
if the adminstrator has already set it and disallow the VF from
changing it.

v2: Fix compile error if CONFIG_BNXT_SRIOV is not set.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c