aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-08 20:39:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-11 15:04:20 -0400
commit8610c29a2c9f273886b1c31ae4d92c69d4326262 (patch)
treec0424e55a67e0a2a1c7f1d72a9d807c442da5a9c /include/net/cfg80211.h
parent15943a72c7d2031c9150917ca9161a9f891d455a (diff)
cfg80211: add channel utilization stats to the survey command
Using these, user space can calculate a relative channel utilization with arbitrary intervals by regularly taking snapshots of the survey results. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index f920a06f363e..24d5b5869272 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -294,6 +294,11 @@ struct key_params {
294 * 294 *
295 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in 295 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in
296 * @SURVEY_INFO_IN_USE: channel is currently being used 296 * @SURVEY_INFO_IN_USE: channel is currently being used
297 * @SURVEY_INFO_CHANNEL_TIME: channel active time (in ms) was filled in
298 * @SURVEY_INFO_CHANNEL_TIME_BUSY: channel busy time was filled in
299 * @SURVEY_INFO_CHANNEL_TIME_EXT_BUSY: extension channel busy time was filled in
300 * @SURVEY_INFO_CHANNEL_TIME_RX: channel receive time was filled in
301 * @SURVEY_INFO_CHANNEL_TIME_TX: channel transmit time was filled in
297 * 302 *
298 * Used by the driver to indicate which info in &struct survey_info 303 * Used by the driver to indicate which info in &struct survey_info
299 * it has filled in during the get_survey(). 304 * it has filled in during the get_survey().
@@ -301,6 +306,11 @@ struct key_params {
301enum survey_info_flags { 306enum survey_info_flags {
302 SURVEY_INFO_NOISE_DBM = 1<<0, 307 SURVEY_INFO_NOISE_DBM = 1<<0,
303 SURVEY_INFO_IN_USE = 1<<1, 308 SURVEY_INFO_IN_USE = 1<<1,
309 SURVEY_INFO_CHANNEL_TIME = 1<<2,
310 SURVEY_INFO_CHANNEL_TIME_BUSY = 1<<3,
311 SURVEY_INFO_CHANNEL_TIME_EXT_BUSY = 1<<4,
312 SURVEY_INFO_CHANNEL_TIME_RX = 1<<5,
313 SURVEY_INFO_CHANNEL_TIME_TX = 1<<6,
304}; 314};
305 315
306/** 316/**
@@ -310,6 +320,11 @@ enum survey_info_flags {
310 * @filled: bitflag of flags from &enum survey_info_flags 320 * @filled: bitflag of flags from &enum survey_info_flags
311 * @noise: channel noise in dBm. This and all following fields are 321 * @noise: channel noise in dBm. This and all following fields are
312 * optional 322 * optional
323 * @channel_time: amount of time in ms the radio spent on the channel
324 * @channel_time_busy: amount of time the primary channel was sensed busy
325 * @channel_time_ext_busy: amount of time the extension channel was sensed busy
326 * @channel_time_rx: amount of time the radio spent receiving data
327 * @channel_time_tx: amount of time the radio spent transmitting data
313 * 328 *
314 * Used by dump_survey() to report back per-channel survey information. 329 * Used by dump_survey() to report back per-channel survey information.
315 * 330 *
@@ -318,6 +333,11 @@ enum survey_info_flags {
318 */ 333 */
319struct survey_info { 334struct survey_info {
320 struct ieee80211_channel *channel; 335 struct ieee80211_channel *channel;
336 u64 channel_time;
337 u64 channel_time_busy;
338 u64 channel_time_ext_busy;
339 u64 channel_time_rx;
340 u64 channel_time_tx;
321 u32 filled; 341 u32 filled;
322 s8 noise; 342 s8 noise;
323}; 343};