netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bcm43xx-d80211: check for valid MAC address in SPROM (#2)
@ 2006-05-10 23:11 Stefano Brivio
  0 siblings, 0 replies; only message in thread
From: Stefano Brivio @ 2006-05-10 23:11 UTC (permalink / raw)
  To: John W. Linville; +Cc: bcm43xx-dev, netdev

Sorry for the mistake. Now diffed against the right port :). Please apply
to wireless-dev.

--

Check for valid MAC address in SPROM fields instead of relying on PHY type
while setting the MAC address in the networking subsystem, as some devices
have multiple PHYs.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Index: wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
+++ wireless-dev/drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c
@@ -3934,7 +3934,7 @@ static int bcm43xx_attach_board(struct b
 	bcm43xx_pctl_set_crystal(bcm, 0);
 
 	/* Set the MAC address in the networking subsystem */
-	if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A)
+	if (is_valid_ether_addr(bcm->sprom.et1macaddr))
 		memcpy(bcm->net_dev->dev_addr, bcm->sprom.et1macaddr, 6);
 	else
 		memcpy(bcm->net_dev->dev_addr, bcm->sprom.il0macaddr, 6);


--
Ciao
Stefano

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-10 23:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 23:11 [PATCH 1/2] bcm43xx-d80211: check for valid MAC address in SPROM (#2) Stefano Brivio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).