e54d6113e131fcc58fc7284c62e9d364ff27b1f2
[openwrt.git] / target / linux / rb532 / patches-2.6.28 / 019-korina_set_dev_field_allocated_skb.patch
1 I'm not sure if this is necessary, but the original driver did it and
2 apparently also many other drivers do it, so it should not be completely
3 wrong to do it.
4
5 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
6 ---
7  drivers/net/korina.c |    2 ++
8  1 files changed, 2 insertions(+), 0 deletions(-)
9
10 --- a/drivers/net/korina.c
11 +++ b/drivers/net/korina.c
12 @@ -418,6 +418,7 @@ static int korina_rx(struct net_device *
13                         /* 16 bit align */
14                         skb_reserve(skb_new, 2);
15  
16 +                       skb_new->dev = dev;
17                         lp->rx_skb[lp->rx_next_done] = skb_new;
18                 }
19                 rd->devcs = 0;
20 @@ -761,6 +762,7 @@ static void korina_alloc_ring(struct net
21                 if (!skb)
22                         break;
23                 skb_reserve(skb, 2);
24 +               skb->dev = dev;
25                 lp->rx_skb[i] = skb;
26                 lp->rd_ring[i].control = DMA_DESC_IOD |
27                                 DMA_COUNT(KORINA_RBSIZE);