From 863e88f255dac0657e57d5f1a1f95ee8733f8c13 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Sun, 9 Nov 2014 08:36:45 +0100 Subject: mac802154: move mac pib attributes into wpan_dev This patch moves all mac pib attributes into the wpan_dev struct. Furthermore we can easier access these attributes over the netdev 802154_ptr pointer. Currently this is only possible over a complicated callback structure in mac802154 because subif data structure is accessable inside mac802154 only. Signed-off-by: Alexander Aring Signed-off-by: Marcel Holtmann --- include/net/cfg802154.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'include/net/cfg802154.h') diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index 9d99b96..ac8dd3b 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h @@ -52,14 +52,9 @@ struct wpan_phy { u32 channels_supported[32]; s8 transmit_power; u8 cca_mode; - u8 min_be; - u8 max_be; - u8 csma_retries; - s8 frame_retries; __le64 perm_extended_addr; - bool lbt; s32 cca_ed_level; struct device dev; @@ -69,6 +64,25 @@ struct wpan_phy { struct wpan_dev { struct wpan_phy *wpan_phy; + + /* MAC PIB */ + __le16 pan_id; + __le16 short_addr; + __le64 extended_addr; + + /* MAC BSN field */ + u8 bsn; + /* MAC DSN field */ + u8 dsn; + + u8 min_be; + u8 max_be; + u8 csma_retries; + s8 frame_retries; + + bool lbt; + + bool promiscuous_mode; }; #define to_phy(_dev) container_of(_dev, struct wpan_phy, dev) -- cgit v1.1