ath9k: fetch survey data for all channels
[openwrt.git] / package / mac80211 / patches / 514-mac80211_survey_chan_in_use.patch
1 --- a/include/net/cfg80211.h
2 +++ b/include/net/cfg80211.h
3 @@ -294,12 +294,14 @@ struct key_params {
4 * enum survey_info_flags - survey information flags
5 *
6 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in
7 + * @SURVEY_INFO_IN_USE: channel is currently being used
8 *
9 * Used by the driver to indicate which info in &struct survey_info
10 * it has filled in during the get_survey().
11 */
12 enum survey_info_flags {
13 SURVEY_INFO_NOISE_DBM = 1<<0,
14 + SURVEY_INFO_IN_USE = 1<<1,
15 };
16
17 /**
18 --- a/include/linux/nl80211.h
19 +++ b/include/linux/nl80211.h
20 @@ -1400,6 +1400,7 @@ enum nl80211_reg_rule_flags {
21 * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
22 * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
23 * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
24 + * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used
25 * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
26 * currently defined
27 * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
28 @@ -1408,6 +1409,7 @@ enum nl80211_survey_info {
29 __NL80211_SURVEY_INFO_INVALID,
30 NL80211_SURVEY_INFO_FREQUENCY,
31 NL80211_SURVEY_INFO_NOISE,
32 + NL80211_SURVEY_INFO_IN_USE,
33
34 /* keep last */
35 __NL80211_SURVEY_INFO_AFTER_LAST,
36 --- a/net/wireless/nl80211.c
37 +++ b/net/wireless/nl80211.c
38 @@ -3491,6 +3491,8 @@ static int nl80211_send_survey(struct sk
39 if (survey->filled & SURVEY_INFO_NOISE_DBM)
40 NLA_PUT_U8(msg, NL80211_SURVEY_INFO_NOISE,
41 survey->noise);
42 + if (survey->filled & SURVEY_INFO_IN_USE)
43 + NLA_PUT_FLAG(msg, NL80211_SURVEY_INFO_IN_USE);
44
45 nla_nest_end(msg, infoattr);
46
This page took 0.039296 seconds and 5 git commands to generate.