summaryrefslogtreecommitdiffstats
path: root/net/ieee802154/6lowpan/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154/6lowpan/rx.c')
-rw-r--r--net/ieee802154/6lowpan/rx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ieee802154/6lowpan/rx.c b/net/ieee802154/6lowpan/rx.c
index b1442f3..c529d9f 100644
--- a/net/ieee802154/6lowpan/rx.c
+++ b/net/ieee802154/6lowpan/rx.c
@@ -65,19 +65,20 @@ static int lowpan_rcv(struct sk_buff *skb, struct net_device *wdev,
struct packet_type *pt, struct net_device *orig_wdev)
{
struct ieee802154_hdr hdr;
+ struct net_device *ldev;
int ret;
- if (wdev->type != ARPHRD_IEEE802154 ||
- !wdev->ieee802154_ptr->lowpan_dev)
+ if (wdev->type != ARPHRD_IEEE802154)
+ goto drop;
+
+ ldev = wdev->ieee802154_ptr->lowpan_dev;
+ if (!ldev || !netif_running(ldev))
goto drop;
skb = skb_share_check(skb, GFP_ATOMIC);
if (!skb)
goto drop;
- if (!netif_running(wdev))
- goto drop_skb;
-
if (skb->pkt_type == PACKET_OTHERHOST)
goto drop_skb;
OpenPOWER on IntegriCloud