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
6 for (i = 0; i < nr_bufs; i++) {
9 + int offset = RX_OFFSET;
14 * Make sure IP header starts on a fresh cache line.
17 - skb_reserve(skb, RX_OFFSET);
19 + offset += sp->phy_dev->pkt_align;
20 + skb_reserve(skb, offset);
21 sp->rx_skb[idx] = skb;
23 rd = (ar231x_descr_t *) & sp->rx_ring[idx];
25 /* alloc new buffer. */
26 skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET);
27 if (skb_new != NULL) {
30 skb = sp->rx_skb[idx];
33 ((status >> DMA_RX_LEN_SHIFT) & 0x3fff) - CRC_LEN);
35 dev->stats.rx_bytes += skb->len;
36 - skb->protocol = eth_type_trans(skb, dev);
37 - /* pass the packet to upper layers */
40 + /* pass the packet to upper layers */
45 - skb_reserve(skb_new, RX_OFFSET);
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);
54 return PTR_ERR(phydev);
57 + sp->rx = phydev->netif_rx;
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
68 struct ar231x_private {
69 struct net_device *dev;
70 + int (*rx)(struct sk_buff *skb);