diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 31 | ||||
-rw-r--r-- | include/net/cfg80211.h | 40 |
2 files changed, 71 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 04d4516f9c71..7501acfcfdc4 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -425,6 +425,32 @@ enum nl80211_sta_flags { | |||
425 | }; | 425 | }; |
426 | 426 | ||
427 | /** | 427 | /** |
428 | * enum nl80211_rate_info - bitrate information | ||
429 | * | ||
430 | * These attribute types are used with %NL80211_STA_INFO_TXRATE | ||
431 | * when getting information about the bitrate of a station. | ||
432 | * | ||
433 | * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved | ||
434 | * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) | ||
435 | * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) | ||
436 | * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate | ||
437 | * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval | ||
438 | * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined | ||
439 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use | ||
440 | */ | ||
441 | enum nl80211_rate_info { | ||
442 | __NL80211_RATE_INFO_INVALID, | ||
443 | NL80211_RATE_INFO_BITRATE, | ||
444 | NL80211_RATE_INFO_MCS, | ||
445 | NL80211_RATE_INFO_40_MHZ_WIDTH, | ||
446 | NL80211_RATE_INFO_SHORT_GI, | ||
447 | |||
448 | /* keep last */ | ||
449 | __NL80211_RATE_INFO_AFTER_LAST, | ||
450 | NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1 | ||
451 | }; | ||
452 | |||
453 | /** | ||
428 | * enum nl80211_sta_info - station information | 454 | * enum nl80211_sta_info - station information |
429 | * | 455 | * |
430 | * These attribute types are used with %NL80211_ATTR_STA_INFO | 456 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
@@ -436,6 +462,9 @@ enum nl80211_sta_flags { | |||
436 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 462 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
437 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 463 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
438 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 464 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
465 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | ||
466 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | ||
467 | * containing info as possible, see &enum nl80211_sta_info_txrate. | ||
439 | */ | 468 | */ |
440 | enum nl80211_sta_info { | 469 | enum nl80211_sta_info { |
441 | __NL80211_STA_INFO_INVALID, | 470 | __NL80211_STA_INFO_INVALID, |
@@ -445,6 +474,8 @@ enum nl80211_sta_info { | |||
445 | NL80211_STA_INFO_LLID, | 474 | NL80211_STA_INFO_LLID, |
446 | NL80211_STA_INFO_PLID, | 475 | NL80211_STA_INFO_PLID, |
447 | NL80211_STA_INFO_PLINK_STATE, | 476 | NL80211_STA_INFO_PLINK_STATE, |
477 | NL80211_STA_INFO_SIGNAL, | ||
478 | NL80211_STA_INFO_TX_BITRATE, | ||
448 | 479 | ||
449 | /* keep last */ | 480 | /* keep last */ |
450 | __NL80211_STA_INFO_AFTER_LAST, | 481 | __NL80211_STA_INFO_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index a0c0bf19496c..65e03ac93109 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -169,6 +169,9 @@ struct station_parameters { | |||
169 | * @STATION_INFO_LLID: @llid filled | 169 | * @STATION_INFO_LLID: @llid filled |
170 | * @STATION_INFO_PLID: @plid filled | 170 | * @STATION_INFO_PLID: @plid filled |
171 | * @STATION_INFO_PLINK_STATE: @plink_state filled | 171 | * @STATION_INFO_PLINK_STATE: @plink_state filled |
172 | * @STATION_INFO_SIGNAL: @signal filled | ||
173 | * @STATION_INFO_TX_BITRATE: @tx_bitrate fields are filled | ||
174 | * (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs) | ||
172 | */ | 175 | */ |
173 | enum station_info_flags { | 176 | enum station_info_flags { |
174 | STATION_INFO_INACTIVE_TIME = 1<<0, | 177 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -177,6 +180,39 @@ enum station_info_flags { | |||
177 | STATION_INFO_LLID = 1<<3, | 180 | STATION_INFO_LLID = 1<<3, |
178 | STATION_INFO_PLID = 1<<4, | 181 | STATION_INFO_PLID = 1<<4, |
179 | STATION_INFO_PLINK_STATE = 1<<5, | 182 | STATION_INFO_PLINK_STATE = 1<<5, |
183 | STATION_INFO_SIGNAL = 1<<6, | ||
184 | STATION_INFO_TX_BITRATE = 1<<7, | ||
185 | }; | ||
186 | |||
187 | /** | ||
188 | * enum station_info_rate_flags - bitrate info flags | ||
189 | * | ||
190 | * Used by the driver to indicate the specific rate transmission | ||
191 | * type for 802.11n transmissions. | ||
192 | * | ||
193 | * @RATE_INFO_FLAGS_MCS: @tx_bitrate_mcs filled | ||
194 | * @RATE_INFO_FLAGS_40_MHZ_WIDTH: 40 Mhz width transmission | ||
195 | * @RATE_INFO_FLAGS_SHORT_GI: 400ns guard interval | ||
196 | */ | ||
197 | enum rate_info_flags { | ||
198 | RATE_INFO_FLAGS_MCS = 1<<0, | ||
199 | RATE_INFO_FLAGS_40_MHZ_WIDTH = 1<<1, | ||
200 | RATE_INFO_FLAGS_SHORT_GI = 1<<2, | ||
201 | }; | ||
202 | |||
203 | /** | ||
204 | * struct rate_info - bitrate information | ||
205 | * | ||
206 | * Information about a receiving or transmitting bitrate | ||
207 | * | ||
208 | * @flags: bitflag of flags from &enum rate_info_flags | ||
209 | * @mcs: mcs index if struct describes a 802.11n bitrate | ||
210 | * @legacy: bitrate in 100kbit/s for 802.11abg | ||
211 | */ | ||
212 | struct rate_info { | ||
213 | u8 flags; | ||
214 | u8 mcs; | ||
215 | u16 legacy; | ||
180 | }; | 216 | }; |
181 | 217 | ||
182 | /** | 218 | /** |
@@ -191,6 +227,8 @@ enum station_info_flags { | |||
191 | * @llid: mesh local link id | 227 | * @llid: mesh local link id |
192 | * @plid: mesh peer link id | 228 | * @plid: mesh peer link id |
193 | * @plink_state: mesh peer link state | 229 | * @plink_state: mesh peer link state |
230 | * @signal: signal strength of last received packet in dBm | ||
231 | * @txrate: current unicast bitrate to this station | ||
194 | */ | 232 | */ |
195 | struct station_info { | 233 | struct station_info { |
196 | u32 filled; | 234 | u32 filled; |
@@ -200,6 +238,8 @@ struct station_info { | |||
200 | u16 llid; | 238 | u16 llid; |
201 | u16 plid; | 239 | u16 plid; |
202 | u8 plink_state; | 240 | u8 plink_state; |
241 | s8 signal; | ||
242 | struct rate_info txrate; | ||
203 | }; | 243 | }; |
204 | 244 | ||
205 | /** | 245 | /** |