bnxt_en: use eth_hw_addr_random()
authorTobias Klauser <tklauser@distanz.ch>
Tue, 21 Feb 2017 14:27:28 +0000 (15:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2017 18:33:43 +0000 (13:33 -0500)
Use eth_hw_addr_random() to set a random MAC address in order to make
sure bp->dev->addr_assign_type will be properly set to NET_ADDR_RANDOM.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 6dacdf1e4d26ce846ec3a6ab8ea22d98b704cd9d..235733e91c791b8ff04951cbdd42ec10ab435bae 100644 (file)
@@ -4552,7 +4552,7 @@ static int bnxt_hwrm_func_qcaps(struct bnxt *bp)
                        /* overwrite netdev dev_adr with admin VF MAC */
                        memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
                } else {
-                       random_ether_addr(bp->dev->dev_addr);
+                       eth_hw_addr_random(bp->dev);
                        rc = bnxt_approve_mac(bp, bp->dev->dev_addr);
                }
                return rc;