Add support for the ultra-crappy Marvell 88E6060, which is used in Fonera+ and the...
[openwrt/openwrt.git] / target / linux / atheros / patches-2.6.23 / 200-ar2313_enable_mvswitch.patch
1 Index: linux-2.6.23.16/drivers/net/ar2313/ar2313.c
2 ===================================================================
3 --- linux-2.6.23.16.orig/drivers/net/ar2313/ar2313.c 2008-04-20 10:26:15.000000000 +0200
4 +++ linux-2.6.23.16/drivers/net/ar2313/ar2313.c 2008-04-20 10:26:16.000000000 +0200
5 @@ -955,7 +955,7 @@
6 dev->stats.rx_bytes += skb->len;
7 skb->protocol = eth_type_trans(skb, dev);
8 /* pass the packet to upper layers */
9 - netif_rx(skb);
10 + sp->rx(skb);
11
12 skb_new->dev = dev;
13 /* 16 bit align */
14 @@ -1370,6 +1370,11 @@
15 return PTR_ERR(phydev);
16 }
17
18 + if (phydev->netif_rx)
19 + sp->rx = phydev->netif_rx;
20 + else
21 + sp->rx = netif_rx;
22 +
23 /* mask with MAC supported features */
24 phydev->supported &= (SUPPORTED_10baseT_Half
25 | SUPPORTED_10baseT_Full
26 Index: linux-2.6.23.16/drivers/net/ar2313/ar2313.h
27 ===================================================================
28 --- linux-2.6.23.16.orig/drivers/net/ar2313/ar2313.h 2008-04-20 10:26:15.000000000 +0200
29 +++ linux-2.6.23.16/drivers/net/ar2313/ar2313.h 2008-04-20 10:26:16.000000000 +0200
30 @@ -107,6 +107,8 @@
31 */
32 struct ar2313_private {
33 struct net_device *dev;
34 + int (*rx)(struct sk_buff *skb);
35 +
36 int version;
37 u32 mb[2];
38