History

cfg80211: regulatory: introduce NL80211_RRF_AUTO_BW rule flag

Introduce NL80211_RRF_AUTO_BW rule flag. If this flag set maximum available bandwidth should be calculated base on contiguous rules and wider channels will be allowed to cross multiple contiguous/overlapping frequency ranges. In case of old kernels maximum bandwidth from regulatory rule will be used, while there is no NL80211_RRF_AUTO_BW flag. This fixes the previous commit 9752482083066af7ac18a5ca376f ("cfg80211: regulatory introduce maximum bandwidth calculation") which was found to be a problem for userspace API compatibility. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [edit commit log, use sizeof()] Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Janusz Dziedzic committed 12 years ago

Commit b0dfd2e1 parent 37e33084 files · +58 −43Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+5−4
@@ -2443,10 +2443,7 @@ enum nl80211_reg_type { · 2442 unmodified lines
24432443 * in KHz. This is not a center a frequency but an actual regulatory
24442444 * band edge.
24452445 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
2446− * frequency range, in KHz. If not present or 0, maximum available
2447− * bandwidth should be calculated base on contiguous rules and wider
2448− * channels will be allowed to cross multiple contiguous/overlapping
2449− * frequency ranges.
2446+ * frequency range, in KHz.
24502447 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
24512448 * for a given frequency range. The value is in mBi (100 * dBi).
24522449 * If you don't have one then don't send this.
@@ -2517,6 +2514,9 @@ enum nl80211_sched_scan_match_attr { · 64 unmodified lines
25172514 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
25182515 * this includes probe requests or modes of operation that require
25192516 * beaconing.
2517+ * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
2518+ * base on contiguous rules and wider channels will be allowed to cross
2519+ * multiple contiguous/overlapping frequency ranges.
25202520 */
25212521 enum nl80211_reg_rule_flags {
25222522 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2528,6 +2528,7 @@ enum nl80211_reg_rule_flags { · 5 unmodified lines
25282528 NL80211_RRF_PTMP_ONLY = 1<<6,
25292529 NL80211_RRF_NO_IR = 1<<7,
25302530 __NL80211_RRF_NO_IBSS = 1<<8,
2531+ NL80211_RRF_AUTO_BW = 1<<11,
25312532 };
25322533
25332534 #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR