Skip to contentSkip to conversation

bcm43xx-d80211: check for valid MAC address in SPROM (#2)

PATCH New Stefano Brivio 1 participant 1 message May 10, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 bcm43xx-d80211: check for valid MAC address in SPROM (#2)

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.

drivers/net/wireless/d80211/bcm43xx/bcm43xx_main.c +1 -1
Index: 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