mac802154: rx packet handle cleanup
authorVarka Bhadram <varkabhadram@gmail.com>
Fri, 12 Jun 2015 07:14:24 +0000 (12:44 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 14 Jun 2015 23:20:17 +0000 (01:20 +0200)
This patch replaces !netif_running(sdata->dev) with
!ieee802154_sdata_running(sdata) and also devide the
code two separate if branches.

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/mac802154/rx.c

index 1bdf98068608e902489fea9f21fc624b5fdd7433..d93ad2d4a4fc2a8cf103d0a87337e2eb115fddd0 100644 (file)
@@ -202,8 +202,10 @@ __ieee802154_rx_handle_packet(struct ieee802154_local *local,
        }
 
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
-               if (sdata->wpan_dev.iftype != NL802154_IFTYPE_NODE ||
-                   !netif_running(sdata->dev))
+               if (sdata->wpan_dev.iftype != NL802154_IFTYPE_NODE)
+                       continue;
+
+               if (!ieee802154_sdata_running(sdata))
                        continue;
 
                ieee802154_subif_frame(sdata, skb, &hdr);