summaryrefslogtreecommitdiff
path: root/net/mac802154/rx.c
diff options
context:
space:
mode:
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>2014-06-11 10:03:07 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-06-11 19:10:19 (GMT)
commit2d3b5b0a90e5370ad13ca98d95519c3e41d2c925 (patch)
treebad4e444da804759fe1d8f91d4a940cdcb4ca1fb /net/mac802154/rx.c
parenta374eeb5e5b35c877a890dce5d3f7cca5a3e33f6 (diff)
downloadlinux-2d3b5b0a90e5370ad13ca98d95519c3e41d2c925.tar.xz
mac802154: don't deliver packets to devices that are down
Only one WPAN devices can be active at any given time, so only deliver packets to that one interface that is actually up. Multiple monitors may be up at any given time, but we don't have to deliver to monitors that are down either. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac802154/rx.c')
-rw-r--r--net/mac802154/rx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 0597b96..7f820a1 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -64,20 +64,23 @@ mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi)
if (skb->len < 2) {
pr_debug("got invalid frame\n");
- goto out;
+ goto fail;
}
crc = crc_ccitt(0, skb->data, skb->len);
if (crc) {
pr_debug("CRC mismatch\n");
- goto out;
+ goto fail;
}
skb_trim(skb, skb->len - 2); /* CRC */
}
mac802154_monitors_rx(priv, skb);
mac802154_wpans_rx(priv, skb);
-out:
- dev_kfree_skb(skb);
+
+ return;
+
+fail:
+ kfree_skb(skb);
}
static void mac802154_rx_worker(struct work_struct *work)