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>
Showing the changes to include/uapi/linux (1 of 4 files). Show all
Unified · Split
| @@ -2443,10 +2443,7 @@ enum nl80211_reg_type { · 2442 unmodified lines | ||
| 2443 | 2443 | * in KHz. This is not a center a frequency but an actual regulatory |
| 2444 | 2444 | * band edge. |
| 2445 | 2445 | * @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. | |
| 2450 | 2447 | * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain |
| 2451 | 2448 | * for a given frequency range. The value is in mBi (100 * dBi). |
| 2452 | 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 | 2514 | * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed, |
| 2518 | 2515 | * this includes probe requests or modes of operation that require |
| 2519 | 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 | */ |
| 2521 | 2521 | enum nl80211_reg_rule_flags { |
| 2522 | 2522 | NL80211_RRF_NO_OFDM = 1<<0, |
| @@ -2528,6 +2528,7 @@ enum nl80211_reg_rule_flags { · 5 unmodified lines | ||
| 2528 | 2528 | NL80211_RRF_PTMP_ONLY = 1<<6, |
| 2529 | 2529 | NL80211_RRF_NO_IR = 1<<7, |
| 2530 | 2530 | __NL80211_RRF_NO_IBSS = 1<<8, |
| 2531 | + NL80211_RRF_AUTO_BW = 1<<11, | |
| 2531 | 2532 | }; |
| 2532 | 2533 | |
| 2533 | 2534 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR |