1 diff --git a/drivers/net/b44.c b/drivers/net/b44.c
2 --- a/drivers/net/b44.c
3 +++ b/drivers/net/b44.c
4 @@ -384,7 +384,7 @@ static void b44_set_flow_ctrl(struct b44 *bp, u32 local, u32 remote)
5 __b44_set_flow_ctrl(bp, pause_enab);
8 -#ifdef SSB_DRIVER_MIPS
9 +#ifdef CONFIG_SSB_DRIVER_MIPS
10 extern char *nvram_get(char *name);
11 static void b44_wap54g10_workaround(struct b44 *bp)
13 @@ -2068,6 +2068,28 @@ out:
17 +#ifdef CONFIG_SSB_DRIVER_MIPS
18 +static void b44_wrtsl54gs_workaround(struct b44 *bp)
23 + * workaround for physical wiring in Linksys WRSL54GS
24 + * see https://dev.openwrt.org/ticket/2662 and 3903
25 + * eth1 PHY is probably on BCM5325 switch accessed via eth0
27 + str = nvram_get("boardnum");
30 + if (simple_strtoul(str, NULL, 0) == 42) {
31 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
36 +static void b44_wrtsl54gs_workaround(struct b44 *bp) { }
39 static int __devinit b44_get_invariants(struct b44 *bp)
41 struct ssb_device *sdev = bp->sdev;
42 @@ -2089,6 +2111,8 @@ static int __devinit b44_get_invariants(struct b44 *bp)
43 * valid PHY address. */
46 + b44_wrtsl54gs_workaround(bp);
48 memcpy(bp->dev->dev_addr, addr, 6);
50 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){