[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170221142728.604-1-tklauser@distanz.ch>
Date: Tue, 21 Feb 2017 15:27:28 +0100
From: Tobias Klauser <tklauser@...tanz.ch>
To: Michael Chan <michael.chan@...adcom.com>
Cc: netdev@...r.kernel.org
Subject: [PATCH] bnxt_en: use eth_hw_addr_random()
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@...tanz.ch>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 6dacdf1e4d26..235733e91c79 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -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;
--
2.11.0
Powered by blists - more mailing lists