aboutsummaryrefslogtreecommitdiff
path: root/net/mac802154
diff options
context:
space:
mode:
authoralex.bluesman.smirnov@gmail.com <alex.bluesman.smirnov@gmail.com>2012-05-15 20:50:24 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-16 15:17:01 -0400
commit4d23c9cc075e778584aa74da402f6bf968ad92b7 (patch)
tree60c20f508c7d57adbf5f7410c5137fba6970152b /net/mac802154
parent74a02fcf77dd760176418e1641a8624b26b357a2 (diff)
mac802154: slave interfaces declaration
Slaves represent typical network interfaces available from userspace. Each ieee802154 device/transceiver may have several slaves and able to be associated with several networks at the same time. So this patch adds structure for slaves declaration. Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/mac802154.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/net/mac802154/mac802154.h b/net/mac802154/mac802154.h
index 4f2d97506c6..d53b86c75d5 100644
--- a/net/mac802154/mac802154.h
+++ b/net/mac802154/mac802154.h
@@ -58,6 +58,34 @@ struct mac802154_priv {
#define MAC802154_DEVICE_STOPPED 0x00
#define MAC802154_DEVICE_RUN 0x01
+/* Slave interface definition.
+ *
+ * Slaves represent typical network interfaces available from userspace.
+ * Each ieee802154 device/transceiver may have several slaves and able
+ * to be associated with several networks at the same time.
+ */
+struct mac802154_sub_if_data {
+ struct list_head list; /* the ieee802154_priv->slaves list */
+
+ struct mac802154_priv *hw;
+ struct net_device *dev;
+
+ int type;
+
+ spinlock_t mib_lock;
+
+ __le16 pan_id;
+ __le16 short_addr;
+
+ u8 chan;
+ u8 page;
+
+ /* MAC BSN field */
+ u8 bsn;
+ /* MAC DSN field */
+ u8 dsn;
+};
+
#define mac802154_to_priv(_hw) container_of(_hw, struct mac802154_priv, hw)
#define MAC802154_MAX_XMIT_ATTEMPTS 3