[xburst] Add support for enabling/disabling the aic controllers clock.
[openwrt.git] / target / linux / atheros / patches-2.6.32 / 200-ar2313_enable_mvswitch.patch
1 Index: linux-2.6.32.7/drivers/net/ar231x.c
2 ===================================================================
3 --- linux-2.6.32.7.orig/drivers/net/ar231x.c 2010-02-03 17:00:35.874430230 +0100
4 +++ linux-2.6.32.7/drivers/net/ar231x.c 2010-02-03 17:02:28.998430523 +0100
5 @@ -735,6 +735,7 @@
6 for (i = 0; i < nr_bufs; i++) {
7 struct sk_buff *skb;
8 ar231x_descr_t *rd;
9 + int offset = RX_OFFSET;
10
11 if (sp->rx_skb[idx])
12 break;
13 @@ -750,7 +751,9 @@
14 * Make sure IP header starts on a fresh cache line.
15 */
16 skb->dev = dev;
17 - skb_reserve(skb, RX_OFFSET);
18 + if (sp->phy_dev)
19 + offset += sp->phy_dev->pkt_align;
20 + skb_reserve(skb, offset);
21 sp->rx_skb[idx] = skb;
22
23 rd = (ar231x_descr_t *) & sp->rx_ring[idx];
24 @@ -824,20 +827,23 @@
25 /* alloc new buffer. */
26 skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET);
27 if (skb_new != NULL) {
28 + int offset;
29
30 skb = sp->rx_skb[idx];
31 /* set skb */
32 skb_put(skb,
33 ((status >> DMA_RX_LEN_SHIFT) & 0x3fff) - CRC_LEN);
34 -
35 dev->stats.rx_bytes += skb->len;
36 - skb->protocol = eth_type_trans(skb, dev);
37 - /* pass the packet to upper layers */
38 - netif_rx(skb);
39
40 + /* pass the packet to upper layers */
41 + sp->rx(skb);
42 skb_new->dev = dev;
43 +
44 /* 16 bit align */
45 - skb_reserve(skb_new, RX_OFFSET);
46 + offset = RX_OFFSET;
47 + if (sp->phy_dev)
48 + offset += sp->phy_dev->pkt_align;
49 + skb_reserve(skb_new, offset);
50 /* reset descriptor's curr_addr */
51 rxdesc->addr = virt_to_phys(skb_new->data);
52
53 @@ -1239,6 +1245,8 @@
54 return PTR_ERR(phydev);
55 }
56
57 + sp->rx = phydev->netif_rx;
58 +
59 /* mask with MAC supported features */
60 phydev->supported &= (SUPPORTED_10baseT_Half
61 | SUPPORTED_10baseT_Full
62 Index: linux-2.6.32.7/drivers/net/ar231x.h
63 ===================================================================
64 --- linux-2.6.32.7.orig/drivers/net/ar231x.h 2010-02-03 17:00:35.874430230 +0100
65 +++ linux-2.6.32.7/drivers/net/ar231x.h 2010-02-03 17:02:28.998430523 +0100
66 @@ -221,6 +221,8 @@
67 */
68 struct ar231x_private {
69 struct net_device *dev;
70 + int (*rx)(struct sk_buff *skb);
71 +
72 int version;
73 u32 mb[2];
74
This page took 0.040401 seconds and 5 git commands to generate.