1 Index: linux-2.6.25.17/drivers/net/b44.c
2 ===================================================================
3 --- linux-2.6.25.17.orig/drivers/net/b44.c 2008-10-02 00:36:09.000000000 +0100
4 +++ linux-2.6.25.17/drivers/net/b44.c 2008-10-02 20:34:42.000000000 +0100
5 @@ -384,7 +384,7 @@ static void b44_set_flow_ctrl(struct b44
6 __b44_set_flow_ctrl(bp, pause_enab);
9 -#ifdef SSB_DRIVER_MIPS
10 +#ifdef CONFIG_SSB_DRIVER_MIPS
11 extern char *nvram_get(char *name);
12 static void b44_wap54g10_workaround(struct b44 *bp)
14 @@ -2066,6 +2066,28 @@ out:
18 +#ifdef CONFIG_SSB_DRIVER_MIPS
19 +static void b44_wrtsl54gs_workaround(struct b44 *bp)
24 + * workaround for physical wiring in Linksys WRSL54GS
25 + * see https://dev.openwrt.org/ticket/2662 and 3903
26 + * eth1 PHY is probably on BCM5325 switch accessed via eth0
28 + str = nvram_get("boardnum");
31 + if (simple_strtoul(str, NULL, 0) == 42) {
32 + bp->phy_addr = B44_PHY_ADDR_NO_PHY;
37 +static void b44_wrtsl54gs_workaround(struct b44 *bp) { }
40 static int __devinit b44_get_invariants(struct b44 *bp)
42 struct ssb_device *sdev = bp->sdev;
43 @@ -2087,6 +2109,8 @@ static int __devinit b44_get_invariants(
44 * valid PHY address. */
47 + b44_wrtsl54gs_workaround(bp);
49 memcpy(bp->dev->dev_addr, addr, 6);
51 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){