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 @@ -2068,6 +2068,28 @@ out:
16 +#ifdef CONFIG_SSB_DRIVER_MIPS
17 +static void b44_wrtsl54gs_workaround(struct b44 *bp)
22 + * workaround for physical wiring in Linksys WRSL54GS
23 + * see https://dev.openwrt.org/ticket/2662 and 3903
24 + * eth1 PHY is probably on BCM5325 switch accessed via eth0
26 + str = nvram_get("boardnum");
29 + if (simple_strtoul(str, NULL, 0) == 42) {
30 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
35 +static void b44_wrtsl54gs_workaround(struct b44 *bp) { }
38 static int __devinit b44_get_invariants(struct b44 *bp)
40 struct ssb_device *sdev = bp->sdev;
41 @@ -2089,6 +2111,8 @@ static int __devinit b44_get_invariants(
42 * valid PHY address. */
45 + b44_wrtsl54gs_workaround(bp);
47 memcpy(bp->dev->dev_addr, addr, 6);
49 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){