[PATCH] bcm43xx: check for valid MAC address in SPROM
authorStefano Brivio <stefano.brivio@polimi.it>
Thu, 4 May 2006 23:26:29 +0000 (01:26 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 5 May 2006 20:55:23 +0000 (16:55 -0400)
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/bcm43xx/bcm43xx_main.c

index 9a06e61df0a253c4fed8e0df22af350e8979e58f..4be2d9b5749ba44d7f3206ef033b02cf37c39e44 100644 (file)
@@ -3482,7 +3482,7 @@ static int bcm43xx_attach_board(struct bcm43xx_private *bcm)
        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);