1 --- a/drivers/net/ethernet/broadcom/b44.c
2 +++ b/drivers/net/ethernet/broadcom/b44.c
3 @@ -410,10 +410,41 @@ static void b44_wap54g10_workaround(stru
5 pr_warning("PHY: cannot reset MII transceiver isolate bit\n");
8 +static inline int startswith (const char *source, const char *cmp)
10 + return !strncmp(source,cmp,strlen(cmp));
13 +static inline void b44_bcm47xx_workarounds(struct b44 *bp)
16 + /* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
17 + if (nvram_getenv("boardnum", buf, sizeof(buf)) > 0)
19 + if (simple_strtoul(buf, NULL, 0) == 100) {
20 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
23 + struct ssb_device *sdev = bp->sdev;
24 + if (nvram_getenv("hardware_version", buf, sizeof(buf)) > 0)
26 + if (startswith(buf, "WL300-")) {
27 + if (sdev->bus->sprom.et0phyaddr == 0 &&
28 + sdev->bus->sprom.et1phyaddr == 1)
29 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
35 static inline void b44_wap54g10_workaround(struct b44 *bp)
39 +static inline void b44_bcm47xx_workarounds(struct b44 *bp)
44 static int b44_setup_phy(struct b44 *bp)
45 @@ -422,6 +453,7 @@ static int b44_setup_phy(struct b44 *bp)
48 b44_wap54g10_workaround(bp);
49 + b44_bcm47xx_workarounds(bp);
51 if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
53 @@ -2088,6 +2120,8 @@ static int __devinit b44_get_invariants(
54 * valid PHY address. */
57 + b44_bcm47xx_workarounds(bp);
59 memcpy(bp->dev->dev_addr, addr, 6);
61 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){