diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-10-27 17:13:32 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-10-27 18:07:42 +0100 |
commit | 2a9820c9e20a7889bf464e1edff5f75d685a8214 (patch) | |
tree | da13a692aa54e96256161b43c75f605832261e98 /net/mac802154/monitor.c | |
parent | c730c90316aa5753c6b2d3d5af40085c220e3a91 (diff) |
mac802154: rx: move receive handling into rx.c
This patch removes all relevant receiving functions inclusive frame
parsing into rx file. Like mac80211 we should implement the complete
receive handling and parsing in this file.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/monitor.c')
-rw-r--r-- | net/mac802154/monitor.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/net/mac802154/monitor.c b/net/mac802154/monitor.c index 575832231fd6..dfdedc206c6a 100644 --- a/net/mac802154/monitor.c +++ b/net/mac802154/monitor.c @@ -18,9 +18,7 @@ */ #include <linux/netdevice.h> -#include <linux/skbuff.h> #include <linux/if_arp.h> -#include <linux/crc-ccitt.h> #include <linux/ieee802154.h> #include <net/mac802154.h> @@ -30,31 +28,6 @@ #include "ieee802154_i.h" -void mac802154_monitors_rx(struct ieee802154_local *local, struct sk_buff *skb) -{ - struct sk_buff *skb2; - struct ieee802154_sub_if_data *sdata; - u16 crc = crc_ccitt(0, skb->data, skb->len); - u8 *data; - - rcu_read_lock(); - list_for_each_entry_rcu(sdata, &local->interfaces, list) { - if (sdata->type != IEEE802154_DEV_MONITOR || - !netif_running(sdata->dev)) - continue; - - skb2 = skb_clone(skb, GFP_ATOMIC); - skb2->dev = sdata->dev; - skb2->pkt_type = PACKET_HOST; - data = skb_put(skb2, 2); - data[0] = crc & 0xff; - data[1] = crc >> 8; - - netif_rx_ni(skb2); - } - rcu_read_unlock(); -} - static const struct net_device_ops mac802154_monitor_ops = { .ndo_open = mac802154_slave_open, .ndo_stop = mac802154_slave_close, |