From: Varka Bhadram Date: Fri, 12 Jun 2015 07:14:24 +0000 (+0530) Subject: mac802154: rx packet handle cleanup X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1bc1754e82f03c2c29b6e39ee02af48fa3bdef23;p=linux-beck.git 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 Signed-off-by: Marcel Holtmann --- 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);