bnxt_en: Optimize .ndo_set_mac_address() for VFs.

No need to call bnxt_approve_mac() which will send a message to the
PF if the MAC address hasn't changed.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan 2017-10-26 11:51:24 -04:00 committed by David S. Miller
parent 431aa1eb20
commit c1a7bdff17
1 changed files with 3 additions and 3 deletions

View File

@ -7249,13 +7249,13 @@ static int bnxt_change_mac_addr(struct net_device *dev, void *p)
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
if (ether_addr_equal(addr->sa_data, dev->dev_addr))
return 0;
rc = bnxt_approve_mac(bp, addr->sa_data);
if (rc)
return rc;
if (ether_addr_equal(addr->sa_data, dev->dev_addr))
return 0;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
if (netif_running(dev)) {
bnxt_close_nic(bp, false, false);