]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:34 +0000 (17:36 -0700)
commitebbf4a465720056b698eb6b5f06a65087ec3d339
tree4c472a0b8696c9c48e77b5b7ca39e0bd7683aad9
parentcb41225bfb5dc28daab1032587b98702987d6569
bnxt_en: enforce proper storing of MAC address

Orabug: 23221795

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>
(cherry picked from commit bdd4347b33f480187b44699cf1caac9400496d6d)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c