]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2016 20:37:00 +0000 (15:37 -0500)
commitedd165213ea3e11515dea466648f4c3929206c79
tree7227a9835903939e98ab9137ff2b086e90a170f7
parent3fe4fbd9040a42317f54e9f25e42d39fd4d97831
bnxt_en: Improve bnxt_vf_update_mac().

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>
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c