History

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.

Luis R. Rodriguez committed 13 years ago

Commit 8fe02e11 parent c17bff837 files · +197 −230Browse files

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

Unified · Split

include/uapi/linux/nl80211.h+20−10
@@ -2231,10 +2231,9 @@ enum nl80211_band_attr { · 2230 unmodified lines
22312231 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
22322232 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
22332233 * 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.
22382237 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
22392238 * on this channel in current regulatory domain.
22402239 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
@@ -2261,8 +2260,8 @@ enum nl80211_frequency_attr { · 20 unmodified lines
22612260 __NL80211_FREQUENCY_ATTR_INVALID,
22622261 NL80211_FREQUENCY_ATTR_FREQ,
22632262 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,
22662265 NL80211_FREQUENCY_ATTR_RADAR,
22672266 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
22682267 NL80211_FREQUENCY_ATTR_DFS_STATE,
@@ -2278,6 +2277,9 @@ enum nl80211_frequency_attr { · 9 unmodified lines
22782277 };
22792278
22802279 #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
22812283
22822284 /**
22832285 * enum nl80211_bitrate_attr - bitrate attributes
@@ -2420,8 +2422,9 @@ enum nl80211_sched_scan_match_attr { · 136 unmodified lines
24202422 * @NL80211_RRF_DFS: DFS support is required to be used
24212423 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links
24222424 * @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.
24252428 */
24262429 enum nl80211_reg_rule_flags {
24272430 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2431,10 +2434,17 @@ enum nl80211_reg_rule_flags { · 3 unmodified lines
24312434 NL80211_RRF_DFS = 1<<4,
24322435 NL80211_RRF_PTP_ONLY = 1<<5,
24332436 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,
24362439 };
24372440
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+
24382448 /**
24392449 * enum nl80211_dfs_regions - regulatory DFS regions
24402450 *