diff options
author | Paul Stewart <pstew@chromium.org> | 2011-03-31 12:25:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 15:34:12 -0400 |
commit | f4263c9857e6411ef2388868cc6c79a1602a654e (patch) | |
tree | 2eec220076c4d56a2460e185076cda6646ef2f9f /include | |
parent | 8447c163afeaa7e9f6f015088177b1c8511e0877 (diff) |
nl80211: Add BSS parameters to station
This allows user-space monitoring of BSS parameters for the associated
station. This is useful for debugging and verifying that the paramaters
are as expected.
[Exactly the same as before but bundled into a single message]
Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 35 | ||||
-rw-r--r-- | include/net/cfg80211.h | 34 |
2 files changed, 68 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 30022189104d..16eea7229e99 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -1222,6 +1222,36 @@ enum nl80211_rate_info { | |||
1222 | }; | 1222 | }; |
1223 | 1223 | ||
1224 | /** | 1224 | /** |
1225 | * enum nl80211_sta_bss_param - BSS information collected by STA | ||
1226 | * | ||
1227 | * These attribute types are used with %NL80211_STA_INFO_BSS_PARAM | ||
1228 | * when getting information about the bitrate of a station. | ||
1229 | * | ||
1230 | * @__NL80211_STA_BSS_PARAM_INVALID: attribute number 0 is reserved | ||
1231 | * @NL80211_STA_BSS_PARAM_CTS_PROT: whether CTS protection is enabled (flag) | ||
1232 | * @NL80211_STA_BSS_PARAM_SHORT_PREAMBLE: whether short preamble is enabled | ||
1233 | * (flag) | ||
1234 | * @NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME: whether short slot time is enabled | ||
1235 | * (flag) | ||
1236 | * @NL80211_STA_BSS_PARAM_DTIM_PERIOD: DTIM period for beaconing (u8) | ||
1237 | * @NL80211_STA_BSS_PARAM_BEACON_INTERVAL: Beacon interval (u16) | ||
1238 | * @NL80211_STA_BSS_PARAM_MAX: highest sta_bss_param number currently defined | ||
1239 | * @__NL80211_STA_BSS_PARAM_AFTER_LAST: internal use | ||
1240 | */ | ||
1241 | enum nl80211_sta_bss_param { | ||
1242 | __NL80211_STA_BSS_PARAM_INVALID, | ||
1243 | NL80211_STA_BSS_PARAM_CTS_PROT, | ||
1244 | NL80211_STA_BSS_PARAM_SHORT_PREAMBLE, | ||
1245 | NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME, | ||
1246 | NL80211_STA_BSS_PARAM_DTIM_PERIOD, | ||
1247 | NL80211_STA_BSS_PARAM_BEACON_INTERVAL, | ||
1248 | |||
1249 | /* keep last */ | ||
1250 | __NL80211_STA_BSS_PARAM_AFTER_LAST, | ||
1251 | NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1 | ||
1252 | }; | ||
1253 | |||
1254 | /** | ||
1225 | * enum nl80211_sta_info - station information | 1255 | * enum nl80211_sta_info - station information |
1226 | * | 1256 | * |
1227 | * These attribute types are used with %NL80211_ATTR_STA_INFO | 1257 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
@@ -1233,7 +1263,7 @@ enum nl80211_rate_info { | |||
1233 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1263 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
1234 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1264 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1235 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1265 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1236 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1266 | * containing info as possible, see &enum nl80211_rate_info |
1237 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | 1267 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) |
1238 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | 1268 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this |
1239 | * station) | 1269 | * station) |
@@ -1245,6 +1275,8 @@ enum nl80211_rate_info { | |||
1245 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station | 1275 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station |
1246 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested | 1276 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested |
1247 | * attribute, like NL80211_STA_INFO_TX_BITRATE. | 1277 | * attribute, like NL80211_STA_INFO_TX_BITRATE. |
1278 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute | ||
1279 | * containing info as possible, see &enum nl80211_sta_bss_param | ||
1248 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1280 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1249 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1281 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1250 | */ | 1282 | */ |
@@ -1264,6 +1296,7 @@ enum nl80211_sta_info { | |||
1264 | NL80211_STA_INFO_TX_FAILED, | 1296 | NL80211_STA_INFO_TX_FAILED, |
1265 | NL80211_STA_INFO_SIGNAL_AVG, | 1297 | NL80211_STA_INFO_SIGNAL_AVG, |
1266 | NL80211_STA_INFO_RX_BITRATE, | 1298 | NL80211_STA_INFO_RX_BITRATE, |
1299 | NL80211_STA_INFO_BSS_PARAM, | ||
1267 | 1300 | ||
1268 | /* keep last */ | 1301 | /* keep last */ |
1269 | __NL80211_STA_INFO_AFTER_LAST, | 1302 | __NL80211_STA_INFO_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2c4530451721..ba7384acf4e0 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -422,6 +422,7 @@ struct station_parameters { | |||
422 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled | 422 | * @STATION_INFO_RX_DROP_MISC: @rx_dropped_misc filled |
423 | * @STATION_INFO_SIGNAL_AVG: @signal_avg filled | 423 | * @STATION_INFO_SIGNAL_AVG: @signal_avg filled |
424 | * @STATION_INFO_RX_BITRATE: @rxrate fields are filled | 424 | * @STATION_INFO_RX_BITRATE: @rxrate fields are filled |
425 | * @STATION_INFO_BSS_PARAM: @bss_param filled | ||
425 | */ | 426 | */ |
426 | enum station_info_flags { | 427 | enum station_info_flags { |
427 | STATION_INFO_INACTIVE_TIME = 1<<0, | 428 | STATION_INFO_INACTIVE_TIME = 1<<0, |
@@ -439,6 +440,7 @@ enum station_info_flags { | |||
439 | STATION_INFO_RX_DROP_MISC = 1<<12, | 440 | STATION_INFO_RX_DROP_MISC = 1<<12, |
440 | STATION_INFO_SIGNAL_AVG = 1<<13, | 441 | STATION_INFO_SIGNAL_AVG = 1<<13, |
441 | STATION_INFO_RX_BITRATE = 1<<14, | 442 | STATION_INFO_RX_BITRATE = 1<<14, |
443 | STATION_INFO_BSS_PARAM = 1<<15, | ||
442 | }; | 444 | }; |
443 | 445 | ||
444 | /** | 446 | /** |
@@ -473,6 +475,37 @@ struct rate_info { | |||
473 | }; | 475 | }; |
474 | 476 | ||
475 | /** | 477 | /** |
478 | * enum station_info_rate_flags - bitrate info flags | ||
479 | * | ||
480 | * Used by the driver to indicate the specific rate transmission | ||
481 | * type for 802.11n transmissions. | ||
482 | * | ||
483 | * @BSS_PARAM_FLAGS_CTS_PROT: whether CTS protection is enabled | ||
484 | * @BSS_PARAM_FLAGS_SHORT_PREAMBLE: whether short preamble is enabled | ||
485 | * @BSS_PARAM_FLAGS_SHORT_SLOT_TIME: whether short slot time is enabled | ||
486 | */ | ||
487 | enum bss_param_flags { | ||
488 | BSS_PARAM_FLAGS_CTS_PROT = 1<<0, | ||
489 | BSS_PARAM_FLAGS_SHORT_PREAMBLE = 1<<1, | ||
490 | BSS_PARAM_FLAGS_SHORT_SLOT_TIME = 1<<2, | ||
491 | }; | ||
492 | |||
493 | /** | ||
494 | * struct sta_bss_parameters - BSS parameters for the attached station | ||
495 | * | ||
496 | * Information about the currently associated BSS | ||
497 | * | ||
498 | * @flags: bitflag of flags from &enum bss_param_flags | ||
499 | * @dtim_period: DTIM period for the BSS | ||
500 | * @beacon_interval: beacon interval | ||
501 | */ | ||
502 | struct sta_bss_parameters { | ||
503 | u8 flags; | ||
504 | u8 dtim_period; | ||
505 | u16 beacon_interval; | ||
506 | }; | ||
507 | |||
508 | /** | ||
476 | * struct station_info - station information | 509 | * struct station_info - station information |
477 | * | 510 | * |
478 | * Station information filled by driver for get_station() and dump_station. | 511 | * Station information filled by driver for get_station() and dump_station. |
@@ -515,6 +548,7 @@ struct station_info { | |||
515 | u32 tx_retries; | 548 | u32 tx_retries; |
516 | u32 tx_failed; | 549 | u32 tx_failed; |
517 | u32 rx_dropped_misc; | 550 | u32 rx_dropped_misc; |
551 | struct sta_bss_parameters bss_param; | ||
518 | 552 | ||
519 | int generation; | 553 | int generation; |
520 | }; | 554 | }; |