diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-08-28 12:20:42 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-08-30 12:28:44 +0200 |
commit | c8cd6e7f159e6f8d79a23df4aeaa7a540415951b (patch) | |
tree | 8bbecf2f13065bb633e42dda0e476d3be5d8c3be /net/wireless | |
parent | nl80211: add NL80211_CMD_UPDATE_FT_IES to supported commands (diff) | |
download | linux-c8cd6e7f159e6f8d79a23df4aeaa7a540415951b.tar.xz linux-c8cd6e7f159e6f8d79a23df4aeaa7a540415951b.zip |
cfg80211: add local BSS receive time to survey information
This is useful for checking how much airtime is being used up by other
transmissions on the channel, e.g. by calculating (time_rx - time_bss_rx)
or (time_busy - time_bss_rx - time_tx)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20190828102042.58016-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8a6cef949210..3e30e18d1d89 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -8806,6 +8806,10 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 portid, u32 seq, nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN, survey->time_scan, NL80211_SURVEY_INFO_PAD)) goto nla_put_failure; + if ((survey->filled & SURVEY_INFO_TIME_BSS_RX) && + nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_BSS_RX, + survey->time_bss_rx, NL80211_SURVEY_INFO_PAD)) + goto nla_put_failure; nla_nest_end(msg, infoattr); |