aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-10-21 13:22:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-11-25 14:49:35 -0500
commit8fe02e167efa8ed4a4503a5eedc0f49fcb7e3eb9 (patch)
tree751497c11ae0b02cd90113a379e1fc35c84783ac /include
parentc17bff87bed4bda1835ee41dc908e926414d8d85 (diff)
cfg80211: consolidate passive-scan and no-ibss flags
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. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [do all the driver updates in one go] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h9
-rw-r--r--include/uapi/linux/nl80211.h30
2 files changed, 24 insertions, 15 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3eae46cb1acf..c1b887413234 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -91,9 +91,8 @@ enum ieee80211_band {
91 * Channel flags set by the regulatory control code. 91 * Channel flags set by the regulatory control code.
92 * 92 *
93 * @IEEE80211_CHAN_DISABLED: This channel is disabled. 93 * @IEEE80211_CHAN_DISABLED: This channel is disabled.
94 * @IEEE80211_CHAN_PASSIVE_SCAN: Only passive scanning is permitted 94 * @IEEE80211_CHAN_NO_IR: do not initiate radiation, this includes
95 * on this channel. 95 * sending probe requests or beaconing.
96 * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel.
97 * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. 96 * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel.
98 * @IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel 97 * @IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel
99 * is not permitted. 98 * is not permitted.
@@ -113,8 +112,8 @@ enum ieee80211_band {
113 */ 112 */
114enum ieee80211_channel_flags { 113enum ieee80211_channel_flags {
115 IEEE80211_CHAN_DISABLED = 1<<0, 114 IEEE80211_CHAN_DISABLED = 1<<0,
116 IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, 115 IEEE80211_CHAN_NO_IR = 1<<1,
117 IEEE80211_CHAN_NO_IBSS = 1<<2, 116 /* hole at 1<<2 */
118 IEEE80211_CHAN_RADAR = 1<<3, 117 IEEE80211_CHAN_RADAR = 1<<3,
119 IEEE80211_CHAN_NO_HT40PLUS = 1<<4, 118 IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
120 IEEE80211_CHAN_NO_HT40MINUS = 1<<5, 119 IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 3d8325bb50cd..7e25164adfe9 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2231,10 +2231,9 @@ enum nl80211_band_attr {
2231 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 2231 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
2232 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current 2232 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
2233 * regulatory domain. 2233 * regulatory domain.
2234 * @NL80211_FREQUENCY_ATTR_PASSIVE_SCAN: Only passive scanning is 2234 * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation
2235 * permitted on this channel in current regulatory domain. 2235 * are permitted on this channel, this includes sending probe
2236 * @NL80211_FREQUENCY_ATTR_NO_IBSS: IBSS networks are not permitted 2236 * requests, or modes of operation that require beaconing.
2237 * on this channel in current regulatory domain.
2238 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory 2237 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
2239 * on this channel in current regulatory domain. 2238 * on this channel in current regulatory domain.
2240 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm 2239 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
@@ -2261,8 +2260,8 @@ enum nl80211_frequency_attr {
2261 __NL80211_FREQUENCY_ATTR_INVALID, 2260 __NL80211_FREQUENCY_ATTR_INVALID,
2262 NL80211_FREQUENCY_ATTR_FREQ, 2261 NL80211_FREQUENCY_ATTR_FREQ,
2263 NL80211_FREQUENCY_ATTR_DISABLED, 2262 NL80211_FREQUENCY_ATTR_DISABLED,
2264 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, 2263 NL80211_FREQUENCY_ATTR_NO_IR,
2265 NL80211_FREQUENCY_ATTR_NO_IBSS, 2264 __NL80211_FREQUENCY_ATTR_NO_IBSS,
2266 NL80211_FREQUENCY_ATTR_RADAR, 2265 NL80211_FREQUENCY_ATTR_RADAR,
2267 NL80211_FREQUENCY_ATTR_MAX_TX_POWER, 2266 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
2268 NL80211_FREQUENCY_ATTR_DFS_STATE, 2267 NL80211_FREQUENCY_ATTR_DFS_STATE,
@@ -2278,6 +2277,9 @@ enum nl80211_frequency_attr {
2278}; 2277};
2279 2278
2280#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER 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 * enum nl80211_bitrate_attr - bitrate attributes 2285 * enum nl80211_bitrate_attr - bitrate attributes
@@ -2420,8 +2422,9 @@ enum nl80211_sched_scan_match_attr {
2420 * @NL80211_RRF_DFS: DFS support is required to be used 2422 * @NL80211_RRF_DFS: DFS support is required to be used
2421 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links 2423 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links
2422 * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links 2424 * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links
2423 * @NL80211_RRF_PASSIVE_SCAN: passive scan is required 2425 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
2424 * @NL80211_RRF_NO_IBSS: no IBSS is allowed 2426 * this includes probe requests or modes of operation that require
2427 * beaconing.
2425 */ 2428 */
2426enum nl80211_reg_rule_flags { 2429enum nl80211_reg_rule_flags {
2427 NL80211_RRF_NO_OFDM = 1<<0, 2430 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2431,10 +2434,17 @@ enum nl80211_reg_rule_flags {
2431 NL80211_RRF_DFS = 1<<4, 2434 NL80211_RRF_DFS = 1<<4,
2432 NL80211_RRF_PTP_ONLY = 1<<5, 2435 NL80211_RRF_PTP_ONLY = 1<<5,
2433 NL80211_RRF_PTMP_ONLY = 1<<6, 2436 NL80211_RRF_PTMP_ONLY = 1<<6,
2434 NL80211_RRF_PASSIVE_SCAN = 1<<7, 2437 NL80211_RRF_NO_IR = 1<<7,
2435 NL80211_RRF_NO_IBSS = 1<<8, 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 * enum nl80211_dfs_regions - regulatory DFS regions 2449 * enum nl80211_dfs_regions - regulatory DFS regions
2440 * 2450 *