aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2014-02-23 02:12:59 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 04:55:32 -0400
commit570dbde137d4604e4e682a5855b4425233344c19 (patch)
treedce280154449304b1e2be4e674a6d031a4131612
parentbabd3a272123da5b9bc1da943fad74c581a9df6c (diff)
cfg80211: Add indoor only and GO concurrent channel attributes
The FCC are clarifying some soft configuration requirements, which among other include the following: 1. Indoor operation, where a device can use channels requiring indoor operation, subject to that it can guarantee indoor operation, i.e., the device is connected to AC Power or the device is under the control of a local master that is acting as an AP and is connected to AC Power. 2. Concurrent GO operation, where devices may instantiate a P2P GO while they are under the guidance of an authorized master. For example, on a channel on which a BSS is connected to an authorized master, i.e., with DFS and radar detection capability in the UNII band. See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122 Add support for advertising Indoor-only and GO-Concurrent channel properties. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/cfg80211.h5
-rw-r--r--include/uapi/linux/nl80211.h23
-rw-r--r--net/wireless/nl80211.c6
-rw-r--r--net/wireless/reg.c2
4 files changed, 36 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6510ccf53a54..14d8d3417735 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -109,6 +109,9 @@ enum ieee80211_band {
109 * channel as the control or any of the secondary channels. 109 * channel as the control or any of the secondary channels.
110 * This may be due to the driver or due to regulatory bandwidth 110 * This may be due to the driver or due to regulatory bandwidth
111 * restrictions. 111 * restrictions.
112 * @IEEE80211_CHAN_INDOOR_ONLY: see %NL80211_FREQUENCY_ATTR_INDOOR_ONLY
113 * @IEEE80211_CHAN_GO_CONCURRENT: see %NL80211_FREQUENCY_ATTR_GO_CONCURRENT
114 *
112 */ 115 */
113enum ieee80211_channel_flags { 116enum ieee80211_channel_flags {
114 IEEE80211_CHAN_DISABLED = 1<<0, 117 IEEE80211_CHAN_DISABLED = 1<<0,
@@ -120,6 +123,8 @@ enum ieee80211_channel_flags {
120 IEEE80211_CHAN_NO_OFDM = 1<<6, 123 IEEE80211_CHAN_NO_OFDM = 1<<6,
121 IEEE80211_CHAN_NO_80MHZ = 1<<7, 124 IEEE80211_CHAN_NO_80MHZ = 1<<7,
122 IEEE80211_CHAN_NO_160MHZ = 1<<8, 125 IEEE80211_CHAN_NO_160MHZ = 1<<8,
126 IEEE80211_CHAN_INDOOR_ONLY = 1<<9,
127 IEEE80211_CHAN_GO_CONCURRENT = 1<<10,
123}; 128};
124 129
125#define IEEE80211_CHAN_NO_HT40 \ 130#define IEEE80211_CHAN_NO_HT40 \
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 5e405fd55a71..ac5b2d25f0fc 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2342,9 +2342,30 @@ enum nl80211_band_attr {
2342 * using this channel as the primary or any of the secondary channels 2342 * using this channel as the primary or any of the secondary channels
2343 * isn't possible 2343 * isn't possible
2344 * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds. 2344 * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
2345 * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Only indoor use is permitted on this
2346 * channel. A channel that has the INDOOR_ONLY attribute can only be
2347 * used when there is a clear assessment that the device is operating in
2348 * an indoor surroundings, i.e., it is connected to AC power (and not
2349 * through portable DC inverters) or is under the control of a master
2350 * that is acting as an AP and is connected to AC power.
2351 * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
2352 * channel if it's connected concurrently to a BSS on the same channel on
2353 * the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
2354 * band), and IEEE80211_CHAN_RADAR is not set. Instantiating a GO on a
2355 * channel that has the GO_CONCURRENT attribute set can be done when there
2356 * is a clear assessment that the device is operating under the guidance of
2357 * an authorized master, i.e., setting up a GO while the device is also
2358 * connected to an AP with DFS and radar detection on the UNII band (it is
2359 * up to user-space, i.e., wpa_supplicant to perform the required
2360 * verifications)
2345 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number 2361 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
2346 * currently defined 2362 * currently defined
2347 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use 2363 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
2364 *
2365 * See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
2366 * for more information on the FCC description of the relaxations allowed
2367 * by NL80211_FREQUENCY_ATTR_INDOOR_ONLY and
2368 * NL80211_FREQUENCY_ATTR_GO_CONCURRENT.
2348 */ 2369 */
2349enum nl80211_frequency_attr { 2370enum nl80211_frequency_attr {
2350 __NL80211_FREQUENCY_ATTR_INVALID, 2371 __NL80211_FREQUENCY_ATTR_INVALID,
@@ -2361,6 +2382,8 @@ enum nl80211_frequency_attr {
2361 NL80211_FREQUENCY_ATTR_NO_80MHZ, 2382 NL80211_FREQUENCY_ATTR_NO_80MHZ,
2362 NL80211_FREQUENCY_ATTR_NO_160MHZ, 2383 NL80211_FREQUENCY_ATTR_NO_160MHZ,
2363 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME, 2384 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
2385 NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
2386 NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
2364 2387
2365 /* keep last */ 2388 /* keep last */
2366 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 2389 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b25b5ce4076d..c5ead18ad3ab 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -614,6 +614,12 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
614 if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) && 614 if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
615 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ)) 615 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
616 goto nla_put_failure; 616 goto nla_put_failure;
617 if ((chan->flags & IEEE80211_CHAN_INDOOR_ONLY) &&
618 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_INDOOR_ONLY))
619 goto nla_put_failure;
620 if ((chan->flags & IEEE80211_CHAN_GO_CONCURRENT) &&
621 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_GO_CONCURRENT))
622 goto nla_put_failure;
617 } 623 }
618 624
619 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER, 625 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index e0a746d19061..1e9dc1cba335 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -873,6 +873,8 @@ static u32 map_regdom_flags(u32 rd_flags)
873 channel_flags |= IEEE80211_CHAN_RADAR; 873 channel_flags |= IEEE80211_CHAN_RADAR;
874 if (rd_flags & NL80211_RRF_NO_OFDM) 874 if (rd_flags & NL80211_RRF_NO_OFDM)
875 channel_flags |= IEEE80211_CHAN_NO_OFDM; 875 channel_flags |= IEEE80211_CHAN_NO_OFDM;
876 if (rd_flags & NL80211_RRF_NO_OUTDOOR)
877 channel_flags |= IEEE80211_CHAN_INDOOR_ONLY;
876 return channel_flags; 878 return channel_flags;
877} 879}
878 880