mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
15943a72c7
commit
8610c29a2c
3 changed files with 50 additions and 0 deletions
|
|
@ -3153,6 +3153,21 @@ static int nl80211_send_survey(struct sk_buff *msg, u32 pid, u32 seq,
|
|||
survey->noise);
|
||||
if (survey->filled & SURVEY_INFO_IN_USE)
|
||||
NLA_PUT_FLAG(msg, NL80211_SURVEY_INFO_IN_USE);
|
||||
if (survey->filled & SURVEY_INFO_CHANNEL_TIME)
|
||||
NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME,
|
||||
survey->channel_time);
|
||||
if (survey->filled & SURVEY_INFO_CHANNEL_TIME_BUSY)
|
||||
NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY,
|
||||
survey->channel_time_busy);
|
||||
if (survey->filled & SURVEY_INFO_CHANNEL_TIME_EXT_BUSY)
|
||||
NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY,
|
||||
survey->channel_time_ext_busy);
|
||||
if (survey->filled & SURVEY_INFO_CHANNEL_TIME_RX)
|
||||
NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_RX,
|
||||
survey->channel_time_rx);
|
||||
if (survey->filled & SURVEY_INFO_CHANNEL_TIME_TX)
|
||||
NLA_PUT_U64(msg, NL80211_SURVEY_INFO_CHANNEL_TIME_TX,
|
||||
survey->channel_time_tx);
|
||||
|
||||
nla_nest_end(msg, infoattr);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue