1 --- a/drivers/net/b44.c
2 +++ b/drivers/net/b44.c
3 @@ -384,7 +384,7 @@ static void b44_set_flow_ctrl(struct b44
4 __b44_set_flow_ctrl(bp, pause_enab);
7 -#ifdef SSB_DRIVER_MIPS
8 +#ifdef CONFIG_SSB_DRIVER_MIPS
9 extern char *nvram_get(char *name);
10 static void b44_wap54g10_workaround(struct b44 *bp)
12 @@ -421,12 +421,45 @@ static inline void b44_wap54g10_workarou
16 +#ifdef CONFIG_SSB_DRIVER_MIPS
17 +static inline int startswith (const char *source, const char *cmp)
19 + return !strncmp(source,cmp,strlen(cmp));
22 +#define getvar(str) (nvram_get(str) ? : "")
24 +static inline void b44_bcm47xx_workarounds(struct b44 *bp)
26 + /* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
27 + if (simple_strtoul(getvar("boardnum"), NULL, 0) == 100) {
28 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
31 + struct ssb_device *sdev = bp->sdev;
32 + if (startswith(getvar("hardware_version"), "WL300-"))
34 + if (sdev->bus->sprom.et0phyaddr == 0 &&
35 + sdev->bus->sprom.et1phyaddr == 1)
36 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
43 +static inline void b44_bcm47xx_workarounds(struct b44 *bp)
48 static int b44_setup_phy(struct b44 *bp)
53 b44_wap54g10_workaround(bp);
54 + b44_bcm47xx_workarounds(bp);
56 if (bp->phy_addr == B44_PHY_ADDR_NO_PHY)
58 @@ -2089,6 +2122,8 @@ static int __devinit b44_get_invariants(
59 * valid PHY address. */
62 + b44_bcm47xx_workarounds(bp);
64 memcpy(bp->dev->dev_addr, addr, 6);
66 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){