summaryrefslogtreecommitdiffstats
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-17 15:44:46 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-05-19 05:44:42 -0400
commitedea8f7c75ec6c238130bd7e74d9f6f4c26e97b0 (patch)
treed195877b5647f91cd83399f4f8b1462e7f19d24e /include/net/cfg802154.h
parent8329fcf11f5c2ae2fb7b1f56f05b0bb899babc85 (diff)
cfg802154: introduce wpan phy flags
This patch introduce a flag property for the wpan phy structure. The current flag settings in ieee802154_hw are accessable in mac802154 layer only which is okay for flags which indicates MAC handling which are done by phy. For real PHY layer settings like cca mode, transmit power, cca energy detection level. The difference between these flags are that the MAC handling flags are only handled in mac802154/HardMac layer e.g. on an interface up. The phy settings are direct netlink calls from nl802154 into the driver layer and the nl802154 need to have a chance to check if the driver supports this handling before sending to the next layer. We also check now on PHY flags while dumping and setting pib attributes. In comparing with MIB attributes the 802.15.4 gives us an default value which we assume when a transceiver implement less functionality. In case of MIB settings the nl802154 layer doesn't need to check on the ieee802154_hw flags then. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 37abc1603285..a12c6c5247e9 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -106,6 +106,20 @@ wpan_phy_cca_cmp(const struct wpan_phy_cca *a, const struct wpan_phy_cca *b)
106 return true; 106 return true;
107} 107}
108 108
109/**
110 * @WPAN_PHY_FLAG_TRANSMIT_POWER: Indicates that transceiver will support
111 * transmit power setting.
112 * @WPAN_PHY_FLAG_CCA_ED_LEVEL: Indicates that transceiver will support cca ed
113 * level setting.
114 * @WPAN_PHY_FLAG_CCA_MODE: Indicates that transceiver will support cca mode
115 * setting.
116 */
117enum wpan_phy_flags {
118 WPAN_PHY_FLAG_TXPOWER = BIT(1),
119 WPAN_PHY_FLAG_CCA_ED_LEVEL = BIT(2),
120 WPAN_PHY_FLAG_CCA_MODE = BIT(3),
121};
122
109struct wpan_phy { 123struct wpan_phy {
110 struct mutex pib_lock; 124 struct mutex pib_lock;
111 125
@@ -117,6 +131,8 @@ struct wpan_phy {
117 */ 131 */
118 const void *privid; 132 const void *privid;
119 133
134 u32 flags;
135
120 /* 136 /*
121 * This is a PIB according to 802.15.4-2011. 137 * This is a PIB according to 802.15.4-2011.
122 * We do not provide timing-related variables, as they 138 * We do not provide timing-related variables, as they