These two flags are used for the same purpose, just combine them into a no-ir flag to annotate no initiating radiation is allowed. Old userspace sending either flag will have it treated as the no-ir flag. To be considerate to older userspace we also send both the no-ir flag and the old no-ibss flags. Newer userspace will have to be aware of older kernels. Update all places in the tree using these flags with the following semantic patch: @@ @@ -NL80211_RRF_PASSIVE_SCAN +NL80211_RRF_NO_IR @@ @@ -NL80211_RRF_NO_IBSS +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_PASSIVE_SCAN +IEEE80211_CHAN_NO_IR @@ @@ -IEEE80211_CHAN_NO_IBSS +IEEE80211_CHAN_NO_IR @@ @@ -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR +IEEE80211_CHAN_NO_IR @@ @@ -(NL80211_RRF_NO_IR) +NL80211_RRF_NO_IR @@ @@ -(IEEE80211_CHAN_NO_IR) +IEEE80211_CHAN_NO_IR Along with some hand-optimisations in documentation, to remove duplicates and to fix some indentation.
Showing the changes to include/uapi/linux (1 of 37 files). Show all
Unified · Split
| @@ -2231,10 +2231,9 @@ enum nl80211_band_attr { · 2230 unmodified lines | ||
| 2231 | 2231 | * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz |
| 2232 | 2232 | * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current |
| 2233 | 2233 | * regulatory domain. |
| 2234 | − * @NL80211_FREQUENCY_ATTR_PASSIVE_SCAN: Only passive scanning is | |
| 2235 | − * permitted on this channel in current regulatory domain. | |
| 2236 | − * @NL80211_FREQUENCY_ATTR_NO_IBSS: IBSS networks are not permitted | |
| 2237 | − * on this channel in current regulatory domain. | |
| 2234 | + * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation | |
| 2235 | + * are permitted on this channel, this includes sending probe | |
| 2236 | + * requests, or modes of operation that require beaconing. | |
| 2238 | 2237 | * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory |
| 2239 | 2238 | * on this channel in current regulatory domain. |
| 2240 | 2239 | * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm |
| @@ -2261,8 +2260,8 @@ enum nl80211_frequency_attr { · 20 unmodified lines | ||
| 2261 | 2260 | __NL80211_FREQUENCY_ATTR_INVALID, |
| 2262 | 2261 | NL80211_FREQUENCY_ATTR_FREQ, |
| 2263 | 2262 | NL80211_FREQUENCY_ATTR_DISABLED, |
| 2264 | − NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, | |
| 2265 | − NL80211_FREQUENCY_ATTR_NO_IBSS, | |
| 2263 | + NL80211_FREQUENCY_ATTR_NO_IR, | |
| 2264 | + __NL80211_FREQUENCY_ATTR_NO_IBSS, | |
| 2266 | 2265 | NL80211_FREQUENCY_ATTR_RADAR, |
| 2267 | 2266 | NL80211_FREQUENCY_ATTR_MAX_TX_POWER, |
| 2268 | 2267 | NL80211_FREQUENCY_ATTR_DFS_STATE, |
| @@ -2278,6 +2277,9 @@ enum nl80211_frequency_attr { · 9 unmodified lines | ||
| 2278 | 2277 | }; |
| 2279 | 2278 | |
| 2280 | 2279 | #define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER |
| 2280 | +#define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR | |
| 2281 | +#define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR | |
| 2282 | +#define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR | |
| 2281 | 2283 | |
| 2282 | 2284 | /** |
| 2283 | 2285 | * enum nl80211_bitrate_attr - bitrate attributes |
| @@ -2420,8 +2422,9 @@ enum nl80211_sched_scan_match_attr { · 136 unmodified lines | ||
| 2420 | 2422 | * @NL80211_RRF_DFS: DFS support is required to be used |
| 2421 | 2423 | * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links |
| 2422 | 2424 | * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links |
| 2423 | − * @NL80211_RRF_PASSIVE_SCAN: passive scan is required | |
| 2424 | − * @NL80211_RRF_NO_IBSS: no IBSS is allowed | |
| 2425 | + * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed, | |
| 2426 | + * this includes probe requests or modes of operation that require | |
| 2427 | + * beaconing. | |
| 2425 | 2428 | */ |
| 2426 | 2429 | enum nl80211_reg_rule_flags { |
| 2427 | 2430 | NL80211_RRF_NO_OFDM = 1<<0, |
| @@ -2431,10 +2434,17 @@ enum nl80211_reg_rule_flags { · 3 unmodified lines | ||
| 2431 | 2434 | NL80211_RRF_DFS = 1<<4, |
| 2432 | 2435 | NL80211_RRF_PTP_ONLY = 1<<5, |
| 2433 | 2436 | NL80211_RRF_PTMP_ONLY = 1<<6, |
| 2434 | − NL80211_RRF_PASSIVE_SCAN = 1<<7, | |
| 2435 | − NL80211_RRF_NO_IBSS = 1<<8, | |
| 2437 | + NL80211_RRF_NO_IR = 1<<7, | |
| 2438 | + __NL80211_RRF_NO_IBSS = 1<<8, | |
| 2436 | 2439 | }; |
| 2437 | 2440 | |
| 2441 | +#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR | |
| 2442 | +#define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR | |
| 2443 | +#define NL80211_RRF_NO_IR NL80211_RRF_NO_IR | |
| 2444 | + | |
| 2445 | +/* For backport compatibility with older userspace */ | |
| 2446 | +#define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS) | |
| 2447 | + | |
| 2438 | 2448 | /** |
| 2439 | 2449 | * enum nl80211_dfs_regions - regulatory DFS regions |
| 2440 | 2450 | * |