summaryrefslogtreecommitdiff
path: root/net/mac802154/ieee802154_dev.c
diff options
context:
space:
mode:
authoralex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com>2012-05-15 20:50:29 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-16 15:17:08 -0400
commit0606069d9ef538687957d41ed6387d665af7a643 (patch)
treeb0e54cbdddc436a4b8fd48db676c0ab2efd55d6f /net/mac802154/ieee802154_dev.c
parent62610ad21870a8cf842d4a48f07c3a964e1d2622 (diff)
mac802154: monitor device support
Support for monitor device intended to capture all the network activity. This interface could be used by networks sniffers and is already supported by WireShark. That's a good test point to check that basic MAC support works. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac802154/ieee802154_dev.c')
-rw-r--r--net/mac802154/ieee802154_dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac802154/ieee802154_dev.c b/net/mac802154/ieee802154_dev.c
index 9f36760b6c3a..e3edfb0661b0 100644
--- a/net/mac802154/ieee802154_dev.c
+++ b/net/mac802154/ieee802154_dev.c
@@ -135,8 +135,11 @@ mac802154_add_iface(struct wpan_phy *phy, const char *name, int type)
struct net_device *dev;
int err = -ENOMEM;
- /* No devices is currently added */
switch (type) {
+ case IEEE802154_DEV_MONITOR:
+ dev = alloc_netdev(sizeof(struct mac802154_sub_if_data),
+ name, mac802154_monitor_setup);
+ break;
default:
dev = NULL;
err = -EINVAL;