diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-10-08 20:39:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 15:04:20 -0400 |
commit | 8610c29a2c9f273886b1c31ae4d92c69d4326262 (patch) | |
tree | c0424e55a67e0a2a1c7f1d72a9d807c442da5a9c /net/wireless/nl80211.c | |
parent | 15943a72c7d2031c9150917ca9161a9f891d455a (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 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 882dc921103b..c506241f8637 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3153,6 +3153,21 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 pid, u32 seq, | |||
3153 | survey->noise); | 3153 | survey->noise); |
3154 | if (survey->filled & SURVEY_INFO_IN_USE) | 3154 | if (survey->filled & SURVEY_INFO_IN_USE) |
3155 | NLA_PUT_FLAG(msg, NL80211_SURVEY_INFO_IN_USE); | 3155 | NLA_PUT_FLAG(msg, NL80211_SURVEY_INFO_IN_USE); |
3156 | if (survey->filled & SURVEY_INFO_CHANNEL_TIME) | ||
3157 | NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME, | ||
3158 | survey->channel_time); | ||
3159 | if (survey->filled & SURVEY_INFO_CHANNEL_TIME_BUSY) | ||
3160 | NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY, | ||
3161 | survey->channel_time_busy); | ||
3162 | if (survey->filled & SURVEY_INFO_CHANNEL_TIME_EXT_BUSY) | ||
3163 | NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY, | ||
3164 | survey->channel_time_ext_busy); | ||
3165 | if (survey->filled & SURVEY_INFO_CHANNEL_TIME_RX) | ||
3166 | NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_RX, | ||
3167 | survey->channel_time_rx); | ||
3168 | if (survey->filled & SURVEY_INFO_CHANNEL_TIME_TX) | ||
3169 | NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_TX, | ||
3170 | survey->channel_time_tx); | ||
3156 | 3171 | ||
3157 | nla_nest_end(msg, infoattr); | 3172 | nla_nest_end(msg, infoattr); |
3158 | 3173 | ||