提交 f9f7b960 编写于 作者: S Stefano Brivio 提交者: John W. Linville

[PATCH] bcm43xx: check for valid MAC address in SPROM

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: NStefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 f21709d7
...@@ -3482,7 +3482,7 @@ static int bcm43xx_attach_board(struct bcm43xx_private *bcm) ...@@ -3482,7 +3482,7 @@ static int bcm43xx_attach_board(struct bcm43xx_private *bcm)
bcm43xx_pctl_set_crystal(bcm, 0); bcm43xx_pctl_set_crystal(bcm, 0);
/* Set the MAC address in the networking subsystem */ /* 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); memcpy(bcm->net_dev->dev_addr, bcm->sprom.et1macaddr, 6);
else else
memcpy(bcm->net_dev->dev_addr, bcm->sprom.il0macaddr, 6); memcpy(bcm->net_dev->dev_addr, bcm->sprom.il0macaddr, 6);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册