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
2443 * in KHz. This is not a center a frequency but an actual regulatory2443 * in KHz. This is not a center a frequency but an actual regulatory
2444 * band edge.2444 * band edge.
2445 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this2445 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
2446 * frequency range, in KHz. If not present or 0, maximum available2446 * frequency range, in KHz.
2447 * bandwidth should be calculated base on contiguous rules and wider
2448 * channels will be allowed to cross multiple contiguous/overlapping
2449 * frequency ranges.
2450 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain2447 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
2451 * for a given frequency range. The value is in mBi (100 * dBi).2448 * for a given frequency range. The value is in mBi (100 * dBi).
2452 * If you don't have one then don't send this.2449 * If you don't have one then don't send this.
@@ -2517,6 +2514,9 @@ enum nl80211_sched_scan_match_attr { · 64 unmodified lines
2517 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,2514 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
2518 * this includes probe requests or modes of operation that require2515 * this includes probe requests or modes of operation that require
2519 * beaconing.2516 * 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.
2520 */2520 */
2521enum nl80211_reg_rule_flags {2521enum nl80211_reg_rule_flags {
2522 NL80211_RRF_NO_OFDM = 1<<0,2522 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2528,6 +2528,7 @@ enum nl80211_reg_rule_flags { · 5 unmodified lines
2528 NL80211_RRF_PTMP_ONLY = 1<<6,2528 NL80211_RRF_PTMP_ONLY = 1<<6,
2529 NL80211_RRF_NO_IR = 1<<7,2529 NL80211_RRF_NO_IR = 1<<7,
2530 __NL80211_RRF_NO_IBSS = 1<<8,2530 __NL80211_RRF_NO_IBSS = 1<<8,
2531 NL80211_RRF_AUTO_BW = 1<<11,
2531};2532};
2532 2533
2533#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR2534#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR