summaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-09-02 14:21:24 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-17 13:20:03 +0200
commitf801cf40243d8f81ac05aa7466d9d8b1e676ee7c (patch)
tree27a03ba9afe263fb9b2268b08f602e1f5e92b9fe /net/ieee802154
parent742c3afe53c5d16fa62632c34f8e2273766d3052 (diff)
downloadop-kernel-dev-f801cf40243d8f81ac05aa7466d9d8b1e676ee7c.zip
op-kernel-dev-f801cf40243d8f81ac05aa7466d9d8b1e676ee7c.tar.gz
ieee802154: 6lowpan: earlier skb->dev switch
We should change the skb->dev pointer earlier to the lowpan interface Sometimes we call iphc_decompress which also use some netdev printout functionality. This patch will change that the correct interface will be displayed in this case, which should be the lowpan interface. Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com> Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/6lowpan/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c
index 74d8fec..f9cb70b 100644
--- a/net/ieee802154/6lowpan/rx.c
+++ b/net/ieee802154/6lowpan/rx.c
@@ -18,7 +18,6 @@
static int lowpan_give_skb_to_device(struct sk_buff *skb,
struct net_device *wdev)
{
- skb->dev = wdev->ieee802154_ptr->lowpan_dev;
skb->protocol = htons(ETH_P_IPV6);
skb->pkt_type = PACKET_HOST;
@@ -71,9 +70,11 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *wdev,
if (!ldev || !netif_running(ldev))
goto drop;
+ /* Replacing skb->dev and followed rx handlers will manipulate skb. */
skb = skb_share_check(skb, GFP_ATOMIC);
if (!skb)
goto drop;
+ skb->dev = ldev;
if (ieee802154_hdr_peek_addrs(skb, &hdr) < 0)
goto drop_skb;
OpenPOWER on IntegriCloud