Skip to content

Commit

Permalink
mac802154: rx: monitor receive cleanup
Browse files Browse the repository at this point in the history
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 <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Oct 29, 2014
1 parent 1846067 commit 20b4812
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mac802154/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 20b4812

Please sign in to comment.