diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-05-17 15:44:53 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-19 05:44:44 -0400 |
commit | 0e66545701014814360b08a7a43ca652f82b6e5a (patch) | |
tree | 4f786847a131fe6750760a21760eaf1940cb7b4a /include/net/nl802154.h | |
parent | 392f4e67ad96e1d686c700cba5e218d40347426d (diff) |
nl802154: add support for dump phy capabilities
This patch add support to nl802154 to dump all phy capabilities which is
inside the wpan_phy_supported struct. Also we introduce a new method to
dumping supported channels. The new method will offer a easier interface
and has lesser netlink traffic.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/nl802154.h')
-rw-r--r-- | include/net/nl802154.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/net/nl802154.h b/include/net/nl802154.h index 055277156eef..0badebd1de7f 100644 --- a/include/net/nl802154.h +++ b/include/net/nl802154.h | |||
@@ -100,6 +100,8 @@ enum nl802154_attrs { | |||
100 | 100 | ||
101 | NL802154_ATTR_EXTENDED_ADDR, | 101 | NL802154_ATTR_EXTENDED_ADDR, |
102 | 102 | ||
103 | NL802154_ATTR_WPAN_PHY_CAPS, | ||
104 | |||
103 | /* add attributes here, update the policy in nl802154.c */ | 105 | /* add attributes here, update the policy in nl802154.c */ |
104 | 106 | ||
105 | __NL802154_ATTR_AFTER_LAST, | 107 | __NL802154_ATTR_AFTER_LAST, |
@@ -120,6 +122,61 @@ enum nl802154_iftype { | |||
120 | }; | 122 | }; |
121 | 123 | ||
122 | /** | 124 | /** |
125 | * enum nl802154_wpan_phy_capability_attr - wpan phy capability attributes | ||
126 | * | ||
127 | * @__NL802154_CAP_ATTR_INVALID: attribute number 0 is reserved | ||
128 | * @NL802154_CAP_ATTR_CHANNELS: a nested attribute for nl802154_channel_attr | ||
129 | * @NL802154_CAP_ATTR_TX_POWERS: a nested attribute for | ||
130 | * nl802154_wpan_phy_tx_power | ||
131 | * @NL802154_CAP_ATTR_MIN_CCA_ED_LEVEL: minimum value for cca_ed_level | ||
132 | * @NL802154_CAP_ATTR_MAX_CCA_ED_LEVEL: maxmimum value for cca_ed_level | ||
133 | * @NL802154_CAP_ATTR_CCA_MODES: nl802154_cca_modes flags | ||
134 | * @NL802154_CAP_ATTR_CCA_OPTS: nl802154_cca_opts flags | ||
135 | * @NL802154_CAP_ATTR_MIN_MINBE: minimum of minbe value | ||
136 | * @NL802154_CAP_ATTR_MAX_MINBE: maximum of minbe value | ||
137 | * @NL802154_CAP_ATTR_MIN_MAXBE: minimum of maxbe value | ||
138 | * @NL802154_CAP_ATTR_MAX_MINBE: maximum of maxbe value | ||
139 | * @NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS: minimum of csma backoff value | ||
140 | * @NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS: maximum of csma backoffs value | ||
141 | * @NL802154_CAP_ATTR_MIN_FRAME_RETRIES: minimum of frame retries value | ||
142 | * @NL802154_CAP_ATTR_MAX_FRAME_RETRIES: maximum of frame retries value | ||
143 | * @NL802154_CAP_ATTR_IFTYPES: nl802154_iftype flags | ||
144 | * @NL802154_CAP_ATTR_LBT: nl802154_supported_bool_states flags | ||
145 | * @NL802154_CAP_ATTR_MAX: highest cap attribute currently defined | ||
146 | * @__NL802154_CAP_ATTR_AFTER_LAST: internal use | ||
147 | */ | ||
148 | enum nl802154_wpan_phy_capability_attr { | ||
149 | __NL802154_CAP_ATTR_INVALID, | ||
150 | |||
151 | NL802154_CAP_ATTR_IFTYPES, | ||
152 | |||
153 | NL802154_CAP_ATTR_CHANNELS, | ||
154 | NL802154_CAP_ATTR_TX_POWERS, | ||
155 | |||
156 | NL802154_CAP_ATTR_CCA_ED_LEVELS, | ||
157 | NL802154_CAP_ATTR_CCA_MODES, | ||
158 | NL802154_CAP_ATTR_CCA_OPTS, | ||
159 | |||
160 | NL802154_CAP_ATTR_MIN_MINBE, | ||
161 | NL802154_CAP_ATTR_MAX_MINBE, | ||
162 | |||
163 | NL802154_CAP_ATTR_MIN_MAXBE, | ||
164 | NL802154_CAP_ATTR_MAX_MAXBE, | ||
165 | |||
166 | NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS, | ||
167 | NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS, | ||
168 | |||
169 | NL802154_CAP_ATTR_MIN_FRAME_RETRIES, | ||
170 | NL802154_CAP_ATTR_MAX_FRAME_RETRIES, | ||
171 | |||
172 | NL802154_CAP_ATTR_LBT, | ||
173 | |||
174 | /* keep last */ | ||
175 | __NL802154_CAP_ATTR_AFTER_LAST, | ||
176 | NL802154_CAP_ATTR_MAX = __NL802154_CAP_ATTR_AFTER_LAST - 1 | ||
177 | }; | ||
178 | |||
179 | /** | ||
123 | * enum nl802154_cca_modes - cca modes | 180 | * enum nl802154_cca_modes - cca modes |
124 | * | 181 | * |
125 | * @__NL802154_CCA_INVALID: cca mode number 0 is reserved | 182 | * @__NL802154_CCA_INVALID: cca mode number 0 is reserved |