]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Improve bnxt_vf_update_mac().
authorJeffrey Huang <huangjw@broadcom.com>
Fri, 26 Feb 2016 08:59:59 +0000 (03:59 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:55 +0000 (17:36 -0700)
commit8cb1253ad76048fdf7a744d8b34e4034cb003999
tree364baba019515e959275a41f8df7f4c249e0eed8
parent9d30d7e9ee933390ec9d6584cfc40e73523cec31
bnxt_en: Improve bnxt_vf_update_mac().

Orabug: 23221795

Allow the VF to setup its own MAC address if the PF has not administratively
set it for the VF.  To do that, we should always store the MAC address
from the firmware.  There are 2 cases:

1. The MAC address is valid.  This MAC address is assigned by the PF and
it needs to override the current VF MAC address.

2. The MAC address is zero.  The VF will use a random MAC address by default.
By storing this 0 MAC address in the VF structure, it will allow the VF
user to change the MAC address later using ndo_set_mac_address() when
it sees that the stored MAC address is 0.

v2: Expanded descriptions and added more comments.

Signed-off-by: Jeffrey Huang <huangjw@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3874d6a8b61966a77aa743b4160ba96bf3081ce5)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c