From: Alexander Aring Date: Wed, 29 Oct 2014 20:34:41 +0000 (+0100) Subject: mac802154: rx: monitor receive cleanup X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=20b48120c14fb4bf6ebe4ed4cfa1b828e5e1dff8;p=openwrt%2Fstaging%2Fblogic.git mac802154: rx: monitor receive cleanup This patch replace the !netif_running(sdata->dev) instead we doing a !ieee802154_sdata_running(sdata). Also move this in two separate if branches to compare with mac80211 code. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c index 6ba2769f5fb4..971a8553e9b6 100644 --- a/net/mac802154/rx.c +++ b/net/mac802154/rx.c @@ -233,8 +233,10 @@ ieee802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb) skb->protocol = htons(ETH_P_IEEE802154); list_for_each_entry_rcu(sdata, &local->interfaces, list) { - if (sdata->type != IEEE802154_DEV_MONITOR || - !netif_running(sdata->dev)) + if (sdata->type != IEEE802154_DEV_MONITOR) + continue; + + if (!ieee802154_sdata_running(sdata)) continue; skb2 = skb_clone(skb, GFP_ATOMIC);