Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314626
b: refs/heads/master
c: 32bad7e
h: refs/heads/master
v: v3
  • Loading branch information
alex.bluesman.smirnov@gmail.com authored and David S. Miller committed Jun 27, 2012
1 parent ebac3af commit e90f0a2
Show file tree
Hide file tree
Showing 9 changed files with 584 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ac24979dcb3418a295e11823c1f2506df1d9926
refs/heads/master: 32bad7e30f113a8a5cebe4704bf6519ab4383e1b
14 changes: 2 additions & 12 deletions trunk/include/linux/nl802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,8 @@ enum {
enum {
__IEEE802154_DEV_INVALID = -1,

/* TODO:
* Nowadays three device types supported by this stack at linux-zigbee
* project: WPAN = 0, MONITOR = 1 and SMAC = 2.
*
* Since this stack implementation exists many years, it's definitely
* bad idea to change the assigned values due to they are already used
* by third-party userspace software like: iz-tools, wireshark...
*
* Currently only monitor device is added and initialized by '1' for
* compatibility.
*/
IEEE802154_DEV_MONITOR = 1,
IEEE802154_DEV_WPAN,
IEEE802154_DEV_MONITOR,

__IEEE802154_DEV_MAX,
};
Expand Down
8 changes: 8 additions & 0 deletions trunk/include/net/mac802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@

#include <net/af_ieee802154.h>

/* General MAC frame format:
* 2 bytes: Frame Control
* 1 byte: Sequence Number
* 20 bytes: Addressing fields
* 14 bytes: Auxiliary Security Header
*/
#define MAC802154_FRAME_HARD_HEADER_LEN (2 + 1 + 20 + 14)

/* The following flags are used to indicate changed address settings from
* the stack to the hardware.
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac802154/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
obj-$(CONFIG_MAC802154) += mac802154.o
mac802154-objs := ieee802154_dev.o rx.o tx.o mac_cmd.o mib.o monitor.o
mac802154-objs := ieee802154_dev.o rx.o tx.o mac_cmd.o mib.o monitor.o wpan.o
4 changes: 4 additions & 0 deletions trunk/net/mac802154/ieee802154_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ mac802154_add_iface(struct wpan_phy *phy, const char *name, int type)
dev = alloc_netdev(sizeof(struct mac802154_sub_if_data),
name, mac802154_monitor_setup);
break;
case IEEE802154_DEV_WPAN:
dev = alloc_netdev(sizeof(struct mac802154_sub_if_data),
name, mac802154_wpan_setup);
break;
default:
dev = NULL;
err = -EINVAL;
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/mac802154/mac802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ struct mac802154_sub_if_data {
#define MAC802154_CHAN_NONE (~(u8)0) /* No channel is assigned */

extern struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced;
extern struct ieee802154_mlme_ops mac802154_mlme_wpan;

int mac802154_slave_open(struct net_device *dev);
int mac802154_slave_close(struct net_device *dev);

void mac802154_monitors_rx(struct mac802154_priv *priv, struct sk_buff *skb);
void mac802154_monitor_setup(struct net_device *dev);

void mac802154_wpans_rx(struct mac802154_priv *priv, struct sk_buff *skb);
void mac802154_wpan_setup(struct net_device *dev);

netdev_tx_t mac802154_tx(struct mac802154_priv *priv, struct sk_buff *skb,
u8 page, u8 chan);

Expand Down
4 changes: 4 additions & 0 deletions trunk/net/mac802154/mac_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ struct wpan_phy *mac802154_get_phy(const struct net_device *dev)
struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced = {
.get_phy = mac802154_get_phy,
};

struct ieee802154_mlme_ops mac802154_mlme_wpan = {
.get_phy = mac802154_get_phy,
};
1 change: 1 addition & 0 deletions trunk/net/mac802154/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi)
}

mac802154_monitors_rx(priv, skb);
mac802154_wpans_rx(priv, skb);
out:
dev_kfree_skb(skb);
return;
Expand Down
Loading

0 comments on commit e90f0a2

Please sign in to comment.