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,40 @@ 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)
27 + struct ssb_device *sdev = bp->sdev;
28 + if (startswith(getvar("hardware_version"), "WL300-"))
30 + if (sdev->bus->sprom.et0phyaddr == 0 &&
31 + sdev->bus->sprom.et1phyaddr == 1)
32 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
38 +static inline void b44_bcm47xx_workarounds(struct b44 *bp)
43 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 @@ -2089,6 +2117,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])){