diff options
author | Varka Bhadram <varkabhadram@gmail.com> | 2015-06-12 12:44:24 +0530 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-06-15 01:20:17 +0200 |
commit | 1bc1754e82f03c2c29b6e39ee02af48fa3bdef23 (patch) | |
tree | eca7edb04ca9f3ec76eb7147620de15a014ac2aa /net/mac802154 | |
parent | 5d667ef6e01be22343b07a1f5d5a976962e3103e (diff) | |
download | lwn-1bc1754e82f03c2c29b6e39ee02af48fa3bdef23.tar.gz lwn-1bc1754e82f03c2c29b6e39ee02af48fa3bdef23.zip |
mac802154: rx packet handle cleanup
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>
Diffstat (limited to 'net/mac802154')
-rw-r--r-- | net/mac802154/rx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c index 1bdf98068608..d93ad2d4a4fc 100644 --- a/net/mac802154/rx.c +++ b/net/mac802154/rx.c @@ -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); |