History

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.

David Spinadel committed 12 years ago

Commit 570dbde1 parent babd3a24 files · +36 −0Browse files

Unified · Split

4 files
  1. include/net/cfg80211.h +5 −0
  2. include/uapi/linux/nl80211.h +23 −0
  3. net/wireless/nl80211.c +6 −0
  4. net/wireless/reg.c +2 −0
include/net/cfg80211.h+5−0
@@ -109,6 +109,9 @@ enum ieee80211_band { · 108 unmodified lines
109109 * channel as the control or any of the secondary channels.
110110 * This may be due to the driver or due to regulatory bandwidth
111111 * restrictions.
112+ * @IEEE80211_CHAN_INDOOR_ONLY: see %NL80211_FREQUENCY_ATTR_INDOOR_ONLY
113+ * @IEEE80211_CHAN_GO_CONCURRENT: see %NL80211_FREQUENCY_ATTR_GO_CONCURRENT
114+ *
112115 */
113116 enum ieee80211_channel_flags {
114117 IEEE80211_CHAN_DISABLED = 1<<0,
@@ -120,6 +123,8 @@ enum ieee80211_channel_flags { · 5 unmodified lines
120123 IEEE80211_CHAN_NO_OFDM = 1<<6,
121124 IEEE80211_CHAN_NO_80MHZ = 1<<7,
122125 IEEE80211_CHAN_NO_160MHZ = 1<<8,
126+ IEEE80211_CHAN_INDOOR_ONLY = 1<<9,
127+ IEEE80211_CHAN_GO_CONCURRENT = 1<<10,
123128 };
124129
125130 #define IEEE80211_CHAN_NO_HT40 \
include/uapi/linux/nl80211.h+23−0
@@ -2342,9 +2342,30 @@ enum nl80211_band_attr { · 2341 unmodified lines
23422342 * using this channel as the primary or any of the secondary channels
23432343 * isn't possible
23442344 * @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)
23452361 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
23462362 * currently defined
23472363 * @__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.
23482369 */
23492370 enum nl80211_frequency_attr {
23502371 __NL80211_FREQUENCY_ATTR_INVALID,
@@ -2361,6 +2382,8 @@ enum nl80211_frequency_attr { · 10 unmodified lines
23612382 NL80211_FREQUENCY_ATTR_NO_80MHZ,
23622383 NL80211_FREQUENCY_ATTR_NO_160MHZ,
23632384 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
2385+ NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
2386+ NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
23642387
23652388 /* keep last */
23662389 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
net/wireless/nl80211.c+6−0
@@ -614,6 +614,12 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, · 613 unmodified lines
614614 if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
615615 nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
616616 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;
617623 }
618624
619625 if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
net/wireless/reg.c+2−0
@@ -873,6 +873,8 @@ static u32 map_regdom_flags(u32 rd_flags) · 872 unmodified lines
873873 channel_flags |= IEEE80211_CHAN_RADAR;
874874 if (rd_flags & NL80211_RRF_NO_OFDM)
875875 channel_flags |= IEEE80211_CHAN_NO_OFDM;
876+ if (rd_flags & NL80211_RRF_NO_OUTDOOR)
877+ channel_flags |= IEEE80211_CHAN_INDOOR_ONLY;
876878 return channel_flags;
877879 }
878880