diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-05-27 04:08:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-27 21:41:49 -0700 |
commit | e09b74d0195496fdc2dbe106eaa55da48873876e (patch) | |
tree | 693b64de8a1390e4fe065f174e521266ed460e6b /drivers/net | |
parent | c48b22daa6062fff9eded311b4d6974c29b40487 (diff) | |
download | op-kernel-dev-e09b74d0195496fdc2dbe106eaa55da48873876e.zip op-kernel-dev-e09b74d0195496fdc2dbe106eaa55da48873876e.tar.gz |
bnx2x: Zero VFs starting MACs
Hypervisor/Supervisor should set the VF's MAC prior to its load;
Using a randomly generated MAC as a default is a bad practice.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 7ed9cdf..80982c3 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -11406,7 +11406,7 @@ static int bnx2x_init_bp(struct bnx2x *bp) if (rc) return rc; } else { - random_ether_addr(bp->dev->dev_addr); + eth_zero_addr(bp->dev->dev_addr); } bnx2x_set_modes_bitmap(bp); @@ -11865,6 +11865,10 @@ static int bnx2x_validate_addr(struct net_device *dev) { struct bnx2x *bp = netdev_priv(dev); + /* query the bulletin board for mac address configured by the PF */ + if (IS_VF(bp)) + bnx2x_sample_bulletin(bp); + if (!bnx2x_is_valid_ether_addr(bp, dev->dev_addr)) { BNX2X_ERR("Non-valid Ethernet address\n"); return -EADDRNOTAVAIL; |