Skip to contentSkip to conversation

Enable additional channels for use

PATCH Superseded Ilan Peer 3 participants 16 messages Feb 19, 2014 – Feb 20, 2014

Subsystems (3)

v4 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Ilan Peer

author
#0 lore raw

v4 cover Enable additional channels for use

This set addresses additional comments from Luis:

------

As before, this series addresses the option of enabling additional channels for use based on the following relaxations:

1. Indoor operation, where a device can use channels requiring indoor operation, subject to that it can guarantee indoor operation.
2. Concurrent GO operation, where devices may instantiate a P2P GO while they are under the guidance of an authorized master.

The series includes:

* Some clarification (mainly in documentation) about the intended usage of channels marked as INDOOR_ONLY and CONCURRENT GO.
* Mapping of NL80211_RFF_NO_OUTDOOR to NL80211_CHAN_INDOOR_ONLY
* Support for a user hint that the platform is operating in an indoor environment, i.e., channel marked as INDOOR_ONLY can be used.
* Allow initiating radiation on channel marked with INDOOR_ONLY also for scanning an frame injection in monitor mode.
* Some additional fixes for comments I got.

Following is an example of a possible channel map that can be used to allow the INDOOR_ONLY and CONCURRENT_GO relaxations. Note that:

* Channels 12,13 are marked as Concurrent GO, so even in the lack of exact information about the current regulatory domain, these channels can be used for GO instantiation based on the concurrent GO relaxation.
* The above is also true for channels 149-165 (a.k.a U-NII 3).
* Channels 36-48 (a.k.a thee U-NII 1), are marked both with Concurrent GO and indoor only. While the Concurrent GO can be used as described above, the indoor only setting allows to use these channels given the platform is identified as an indoor one, i.e., media server.

2412 MHz [1] (16.0 dBm)
2417 MHz [2] (16.0 dBm)
2422 MHz [3] (16.0 dBm)
2427 MHz [4] (16.0 dBm)
2432 MHz [5] (16.0 dBm)
2437 MHz [6] (16.0 dBm)
2442 MHz [7] (16.0 dBm)
2447 MHz [8] (16.0 dBm)
2452 MHz [9] (16.0 dBm)
2457 MHz [10] (16.0 dBm)
2462 MHz [11] (16.0 dBm)
2467 MHz [12] (16.0 dBm) (no IR, Concurrent GO) 2472 MHz [13] (16.0 dBm) (no IR, Concurrent GO) 5180 MHz [36] (16.0 dBm) (no IR, Indoor Only, Concurrent GO) 5200 MHz [40] (16.0 dBm) (no IR, Indoor Only, Concurrent GO) 5220 MHz [44] (16.0 dBm) (no IR, Indoor Only, Concurrent GO) 5240 MHz [48] (16.0 dBm) (no IR, Indoor Only, Concurrent GO) 5260 MHz [52] (16.0 dBm) (no IR, radar detection) 5280 MHz [56] (16.0 dBm) (no IR, radar detection) 5300 MHz [60] (16.0 dBm) (no IR, radar detection) 5320 MHz [64] (16.0 dBm) (no IR, radar detection) 5500 MHz [100] (16.0 dBm) (no IR, radar detection) 5520 MHz [104] (16.0 dBm) (no IR, radar detection) 5540 MHz [108] (16.0 dBm) (no IR, radar detection) 5560 MHz [112] (16.0 dBm) (no IR, radar detection) 5580 MHz [116] (16.0 dBm) (no IR, radar detection) 5600 MHz [120] (16.0 dBm) (no IR, radar detection) 5620 MHz [124] (16.0 dBm) (no IR, radar detection) 5640 MHz [128] (16.0 dBm) (no IR, radar detection) 5660 MHz [132] (16.0 dBm) (no IR, radar detection) 5680 MHz [136] (16.0 dBm) (no IR, radar detection) 5700 MHz [140] (16.0 dBm) (no IR, radar detection) 5720 MHz [144] (16.0 dBm) (no IR, radar detection) 5745 MHz [149] (16.0 dBm) (no IR, Concurrent GO) 5765 MHz [153] (16.0 dBm) (no IR, Concurrent GO) 5785 MHz [157] (16.0 dBm) (no IR, Concurrent GO) 5805 MHz [161] (16.0 dBm) (no IR, Concurrent GO) 5825 MHz [165] (16.0 dBm) (no IR, Concurrent GO)

Thanks in advance,

Ilan.

David Spinadel (1):
cfg80211: Add indoor only and GO concurrent channel attributes

Ilan Peer (5):
cfg80211: Add Kconfig option for cellular BS hints
cfg80211: Enable GO operation on additional channels
cfg80211: Add an option to hint indoor operation
cfg80211: Enable GO operation on indoor channels
mac80211: Enable initiating radiation on indoor channels

 include/net/cfg80211.h       |   41 ++++++++++++++++++++-
 include/net/regulatory.h     |    4 ++
 include/uapi/linux/nl80211.h |   10 +++++
 net/mac80211/ibss.c          |    9 +++--
 net/mac80211/scan.c          |   15 +++++---
 net/mac80211/tx.c            |    3 +-
 net/wireless/Kconfig         |   21 +++++++++++
 net/wireless/chan.c          |   74 +++++++++++++++++++++++++++++++++++--
 net/wireless/mesh.c          |    3 +-
 net/wireless/nl80211.c       |   35 +++++++++++-------
 net/wireless/reg.c           |   84 ++++++++++++++++++++++++++++++++++++++++--
 net/wireless/reg.h           |   13 +++++++
 net/wireless/trace.h         |   11 ++++--
 13 files changed, 286 insertions(+), 37 deletions(-)
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH v4 1/5 cfg80211: Add indoor only and GO concurrent channel attributes

From: David Spinadel <[email protected]>

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.

---
 include/net/cfg80211.h       |   22 ++++++++++++++++++++++
 include/uapi/linux/nl80211.h |    8 ++++++++
 net/wireless/nl80211.c       |    6 ++++++
 net/wireless/reg.c           |    2 ++
 4 files changed, 38 insertions(+)
include/net/cfg80211.h +22 -0
index 9f90554..5b2f275 100644
@@ -109,6 +109,26 @@ enum ieee80211_band {
  *	channel as the control or any of the secondary channels.
  *	This may be due to the driver or due to regulatory bandwidth
  *	restrictions.
+ * @IEEE80211_CHAN_INDOOR_ONLY: Only indoor use is permitted on this channel.
+ *	A channel marked with IEEE80211_CHAN_INDOOR_ONLY can only be used when
+ *	there is a clear assessment that the device is operating in an indoor
+ *	surroundings, i.e., it is connected to AC power (and not through
+ *	portable DC inverters) or is under the control of a master that is
+ *	acting as an AP and is connected to AC power.
+ * @IEEE80211_CHAN_GO_CONCURRENT: GO operation is allowed on this channel if
+ *	it's connected concurrently to a BSS on the same channel on the 2 GHz
+ *	band or to a channel in the same UNII band (on the 5 GHz band), and
+ *	IEEE80211_CHAN_RADAR is not set
+ *	Instantiating a GO on a channel marked with IEEE80211_CHAN_GO_CONCURRENT
+ *	can be done when there is a clear assessment that the device is
+ *	operating under the guidance of an authorized master, i.e., setting up a
+ *	GO while the device is also connected to an AP with DFS and radar
+ *	detection on the UNII band.
+ *
+ *	See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
+ *	for more information on the FCC description of the relaxations allowed
+ *	by IEEE80211_CHAN_INDOOR_ONLY and IEEE80211_CHAN_GO_CONCURRENT.
+ *
  */
 enum ieee80211_channel_flags {
 	IEEE80211_CHAN_DISABLED		= 1<<0,
@@ -120,6 +140,8 @@ enum ieee80211_channel_flags {
 	IEEE80211_CHAN_NO_OFDM		= 1<<6,
 	IEEE80211_CHAN_NO_80MHZ		= 1<<7,
 	IEEE80211_CHAN_NO_160MHZ	= 1<<8,
+	IEEE80211_CHAN_INDOOR_ONLY	= 1<<9,
+	IEEE80211_CHAN_GO_CONCURRENT	= 1<<10,
 };
 
 #define IEEE80211_CHAN_NO_HT40 \
include/uapi/linux/nl80211.h +8 -0
index a12e6ca..da27ca4 100644
@@ -2329,6 +2329,12 @@ enum nl80211_band_attr {
  * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
  *	using this channel as the primary or any of the secondary channels
  *	isn't possible
+ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Indoor only use is permitted
+ *	on this channel in current regulatory domain
+ * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
+ *      channel if it's connected concurrently to a BSS on the same channel on
+ *      the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
+ *      band), and NL80211_FREQUENCY_ATTR_RADAR is not set
  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  *	currently defined
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -2347,6 +2353,8 @@ enum nl80211_frequency_attr {
 	NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
 	NL80211_FREQUENCY_ATTR_NO_80MHZ,
 	NL80211_FREQUENCY_ATTR_NO_160MHZ,
+	NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
+	NL80211_FREQUENCY_ATTR_GO_CONCURRENT,
 
 	/* keep last */
 	__NL80211_FREQUENCY_ATTR_AFTER_LAST,
net/wireless/nl80211.c +6 -0
index 8e6b6a2..95a8c72 100644
@@ -608,6 +608,12 @@ static int nl80211_msg_put_channel(struct sk_buff *msg,
 		if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) &&
 		    nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ))
 			goto nla_put_failure;
+		if ((chan->flags & IEEE80211_CHAN_INDOOR_ONLY) &&
+		    nla_put_flag(msg, NL80211_FREQUENCY_ATTR_INDOOR_ONLY))
+			goto nla_put_failure;
+		if ((chan->flags & IEEE80211_CHAN_GO_CONCURRENT) &&
+		    nla_put_flag(msg, NL80211_FREQUENCY_ATTR_GO_CONCURRENT))
+			goto nla_put_failure;
 	}
 
 	if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
net/wireless/reg.c +2 -0
index 27c5253..eeccce3 100644
@@ -867,6 +867,8 @@ static u32 map_regdom_flags(u32 rd_flags)
 		channel_flags |= IEEE80211_CHAN_RADAR;
 	if (rd_flags & NL80211_RRF_NO_OFDM)
 		channel_flags |= IEEE80211_CHAN_NO_OFDM;
+	if (rd_flags & NL80211_RRF_NO_OUTDOOR)
+		channel_flags |= IEEE80211_CHAN_INDOOR_ONLY;
 	return channel_flags;
 }
 
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH v4 1/5] cfg80211: Add indoor only and GO concurrent channel attributes

Quoted 42 lines · Ilan Peer

From: David Spinadel <[email protected]>

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.

---
 include/net/cfg80211.h       |   22 ++++++++++++++++++++++
 include/uapi/linux/nl80211.h |    8 ++++++++
 net/wireless/nl80211.c       |    6 ++++++
 net/wireless/reg.c           |    2 ++
 4 files changed, 38 insertions(+)
include/net/cfg80211.h +5 -0
index 9f90554..5b2f275 100644
@@ -109,6 +109,26 @@ enum ieee80211_band {
  *	channel as the control or any of the secondary channels.
  *	This may be due to the driver or due to regulatory bandwidth
  *	restrictions.
+ * @IEEE80211_CHAN_INDOOR_ONLY: Only indoor use is permitted on this channel.
+ *	A channel marked with IEEE80211_CHAN_INDOOR_ONLY can only be used when
+ *	there is a clear assessment that the device is operating in an indoor
+ *	surroundings, i.e., it is connected to AC power (and not through
+ *	portable DC inverters) or is under the control of a master that is

include/net/cfg80211.h enum ieee80211_band { · line 126

Quoted 10 lines
include/net/cfg80211.h +10 -0
+ *	acting as an AP and is connected to AC power.
+ * @IEEE80211_CHAN_GO_CONCURRENT: GO operation is allowed on this channel if
+ *	it's connected concurrently to a BSS on the same channel on the 2 GHz
+ *	band or to a channel in the same UNII band (on the 5 GHz band), and
+ *	IEEE80211_CHAN_RADAR is not set
+ *	Instantiating a GO on a channel marked with IEEE80211_CHAN_GO_CONCURRENT
+ *	can be done when there is a clear assessment that the device is
+ *	operating under the guidance of an authorized master, i.e., setting up a
+ *	GO while the device is also connected to an AP with DFS and radar
+ *	detection on the UNII band.

Would make sense to add here a comment indicating what you mentioned on the other thread about userspace being responsible for this verification. In this case the supplicant (wpa_supplicant).

Quoted 22 lines
include/net/cfg80211.h +7 -0
+ *
+ *	See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
+ *	for more information on the FCC description of the relaxations allowed
+ *	by IEEE80211_CHAN_INDOOR_ONLY and IEEE80211_CHAN_GO_CONCURRENT.
+ *
  */
 enum ieee80211_channel_flags {
 	IEEE80211_CHAN_DISABLED		= 1<<0,
@@ -120,6 +140,8 @@ enum ieee80211_channel_flags {
 	IEEE80211_CHAN_NO_OFDM		= 1<<6,
 	IEEE80211_CHAN_NO_80MHZ		= 1<<7,
 	IEEE80211_CHAN_NO_160MHZ	= 1<<8,
+	IEEE80211_CHAN_INDOOR_ONLY	= 1<<9,
+	IEEE80211_CHAN_GO_CONCURRENT	= 1<<10,
 };
 
 #define IEEE80211_CHAN_NO_HT40 \
include/uapi/linux/nl80211.h +0 -0
index a12e6ca..da27ca4 100644

include/uapi/linux/nl80211.h enum nl80211_band_attr { · line 2333

Quoted 5 lines
include/uapi/linux/nl80211.h +2 -0
@@ -2329,6 +2329,12 @@ enum nl80211_band_attr {
  * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
  *	using this channel as the primary or any of the secondary channels
  *	isn't possible
+ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Indoor only use is permitted
+ *	on this channel in current regulatory domain

I'd prefer the more verbose documentation to go here as this is the userspace API. What you can do is on the IEEE80211_CHAN_INDOOR_ONLY documetnation refer for further information to %NL80211_FREQUENCY_ATTR_INDOOR_ONLY.

include/uapi/linux/nl80211.h enum nl80211_band_attr { · line 2337

Quoted 4 lines
include/uapi/linux/nl80211.h +4 -0
+ * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
+ *      channel if it's connected concurrently to a BSS on the same channel on
+ *      the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
+ *      band), and NL80211_FREQUENCY_ATTR_RADAR is not set

Same here.

Luis

#3 lore raw

Re: [PATCH v4 1/5] cfg80211: Add indoor only and GO concurrent channel attributes

Quoted 6 lines · Luis R. Rodriguez
Quoted 5 lines · Ilan Peer

From: David Spinadel <[email protected]>

The FCC are clarifying some soft configuration requirements, which among other include the following:

Quoted 9 lines
Quoted 9 lines

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.

So apparently FCC has another understanding than the WiFi Alliance (from section 2.3 in WFA P2P-TS):

"""
A P2P Device can operate concurrently with a WLAN (infrastructure network). Such a device is considered a P2P Concurrent Device. The concurrent operation requires a device to support multiple MAC entities.

	:
	:

A P2P Group may operate in the same or different operating class and channel as a concurrently operating WLAN BSS. For example, a WLAN BSS may operate in channel 36 in the 5.2 GHz band, while the P2P Group may operate in channel 6 in the 2.4 GHz band.
"""

Regards,
Arend

Quoted 89 lines
Quoted 27 lines

See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122

Add support for advertising Indoor-only and GO-Concurrent channel properties.

---
 include/net/cfg80211.h       |   22 ++++++++++++++++++++++
 include/uapi/linux/nl80211.h |    8 ++++++++
 net/wireless/nl80211.c       |    6 ++++++
 net/wireless/reg.c           |    2 ++
 4 files changed, 38 insertions(+)
include/net/cfg80211.h +5 -0
index 9f90554..5b2f275 100644
@@ -109,6 +109,26 @@ enum ieee80211_band {
  *	channel as the control or any of the secondary channels.
  *	This may be due to the driver or due to regulatory bandwidth
  *	restrictions.
+ * @IEEE80211_CHAN_INDOOR_ONLY: Only indoor use is permitted on this channel.
+ *	A channel marked with IEEE80211_CHAN_INDOOR_ONLY can only be used when
+ *	there is a clear assessment that the device is operating in an indoor
+ *	surroundings, i.e., it is connected to AC power (and not through
+ *	portable DC inverters) or is under the control of a master that is

include/net/cfg80211.h enum ieee80211_band { · line 126

Quoted 10 lines
include/net/cfg80211.h +10 -0
+ *	acting as an AP and is connected to AC power.
+ * @IEEE80211_CHAN_GO_CONCURRENT: GO operation is allowed on this channel if
+ *	it's connected concurrently to a BSS on the same channel on the 2 GHz
+ *	band or to a channel in the same UNII band (on the 5 GHz band), and
+ *	IEEE80211_CHAN_RADAR is not set
+ *	Instantiating a GO on a channel marked with IEEE80211_CHAN_GO_CONCURRENT
+ *	can be done when there is a clear assessment that the device is
+ *	operating under the guidance of an authorized master, i.e., setting up a
+ *	GO while the device is also connected to an AP with DFS and radar
+ *	detection on the UNII band.

Would make sense to add here a comment indicating what you mentioned on the other thread about userspace being responsible for this verification. In this case the supplicant (wpa_supplicant).

Quoted 22 lines
include/net/cfg80211.h +7 -0
+ *
+ *	See https://apps.fcc.gov/eas/comments/GetPublishedDocument.html?id=327&tn=528122
+ *	for more information on the FCC description of the relaxations allowed
+ *	by IEEE80211_CHAN_INDOOR_ONLY and IEEE80211_CHAN_GO_CONCURRENT.
+ *
  */
 enum ieee80211_channel_flags {
 	IEEE80211_CHAN_DISABLED		= 1<<0,
@@ -120,6 +140,8 @@ enum ieee80211_channel_flags {
 	IEEE80211_CHAN_NO_OFDM		= 1<<6,
 	IEEE80211_CHAN_NO_80MHZ		= 1<<7,
 	IEEE80211_CHAN_NO_160MHZ	= 1<<8,
+	IEEE80211_CHAN_INDOOR_ONLY	= 1<<9,
+	IEEE80211_CHAN_GO_CONCURRENT	= 1<<10,
 };
 
 #define IEEE80211_CHAN_NO_HT40 \
include/uapi/linux/nl80211.h +0 -0
index a12e6ca..da27ca4 100644

include/uapi/linux/nl80211.h enum nl80211_band_attr { · line 2333

Quoted 5 lines
include/uapi/linux/nl80211.h +2 -0
@@ -2329,6 +2329,12 @@ enum nl80211_band_attr {
  * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
  *	using this channel as the primary or any of the secondary channels
  *	isn't possible
+ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Indoor only use is permitted
+ *	on this channel in current regulatory domain

I'd prefer the more verbose documentation to go here as this is the userspace API. What you can do is on the IEEE80211_CHAN_INDOOR_ONLY documetnation refer for further information to %NL80211_FREQUENCY_ATTR_INDOOR_ONLY.

include/uapi/linux/nl80211.h enum nl80211_band_attr { · line 2337

Quoted 4 lines
include/uapi/linux/nl80211.h +4 -0
+ * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is allowed on this
+ *      channel if it's connected concurrently to a BSS on the same channel on
+ *      the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
+ *      band), and NL80211_FREQUENCY_ATTR_RADAR is not set

Same here.

Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: [PATCH v4 1/5] cfg80211: Add indoor only and GO concurrent channel attributes

Quoted 24 lines · Arend van Spriel
Quoted 6 lines · Luis R. Rodriguez
Quoted 5 lines · Ilan Peer

From: David Spinadel <[email protected]>

The FCC are clarifying some soft configuration requirements, which among other include the following:

Quoted 9 lines
Quoted 9 lines

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.

So apparently FCC has another understanding than the WiFi Alliance (from section 2.3 in WFA P2P-TS):

"""
A P2P Device can operate concurrently with a WLAN (infrastructure network). Such a device is considered a P2P Concurrent Device. The concurrent operation requires a device to support multiple MAC entities.

Quoted 7 lines
        :
        :

A P2P Group may operate in the same or different operating class and channel as a concurrently operating WLAN BSS. For example, a WLAN BSS may operate in channel 36 in the 5.2 GHz band, while the P2P Group may operate in channel 6 in the 2.4 GHz band.
"""

But can a WLAN BSS operate on channel 6 in the 2.4 GHz band and infer it can start GO on channel 36? This question seems not related to concurrent stuff but rather pure regulatory but I suppose that will depend on the definition that the FCC intended behind GO concurrency. Is the definition of concurrency GO thing supposed to *restrict* the number of interfaces a device can create (STA, GO), or simply define permissive rules which would have otherwise been blocked?

Luis

author
#5 lore raw

RE: [PATCH v4 1/5] cfg80211: Add indoor only and GO concurrent channel attributes

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogbGludXgtd2lyZWxlc3Mt b3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtd2lyZWxlc3MtDQo+IG93bmVyQHZn ZXIua2VybmVsLm9yZ10gT24gQmVoYWxmIE9mIEx1aXMgUi4gUm9kcmlndWV6DQo+IFNlbnQ6IFdl ZG5lc2RheSwgRmVicnVhcnkgMTksIDIwMTQgMTk6NTYNCj4gVG86IEFyZW5kIHZhbiBTcHJpZWwN Cj4gQ2M6IFBlZXIsIElsYW47IGxpbnV4LXdpcmVsZXNzOyBTcGluYWRlbCwgRGF2aWQNCj4gU3Vi amVjdDogUmU6IFtQQVRDSCB2NCAxLzVdIGNmZzgwMjExOiBBZGQgaW5kb29yIG9ubHkgYW5kIEdP IGNvbmN1cnJlbnQNCj4gY2hhbm5lbCBhdHRyaWJ1dGVzDQo+IA0KDQo+ID4gU28gYXBwYXJlbnRs eSBGQ0MgaGFzIGFub3RoZXIgdW5kZXJzdGFuZGluZyB0aGFuIHRoZSBXaUZpIEFsbGlhbmNlDQo+ ID4gKGZyb20gc2VjdGlvbiAyLjMgaW4gV0ZBIFAyUC1UUyk6DQoNCkkgZG8gbm90IHRoaW5rIHRo YXQgdGhlcmUgaXMgYSBjb250cmFkaWN0aW9uIGhlcmUsIGFzIHRoZSBXRkEgdXNlcyB0aGUgJ21h eScgbm90YXRpb24gYW5kIHRoZXkgYXJlIG5vdCByZWFsbHkgYWRkcmVzc2luZyByZWd1bGF0b3J5 IGxpbWl0YXRpb25zLg0KDQo+ID4NCj4gPiAiIiINCj4gPiBBIFAyUCBEZXZpY2UgY2FuIG9wZXJh dGUgY29uY3VycmVudGx5IHdpdGggYSBXTEFOIChpbmZyYXN0cnVjdHVyZQ0KPiA+IG5ldHdvcmsp LiBTdWNoIGEgZGV2aWNlIGlzIGNvbnNpZGVyZWQgYSBQMlAgQ29uY3VycmVudCBEZXZpY2UuIFRo ZQ0KPiA+IGNvbmN1cnJlbnQgb3BlcmF0aW9uIHJlcXVpcmVzIGEgZGV2aWNlIHRvIHN1cHBvcnQg bXVsdGlwbGUgTUFDIGVudGl0aWVzLg0KPiA+ICAgICAgICAgOg0KPiA+ICAgICAgICAgOg0KPiA+ IEEgUDJQIEdyb3VwIG1heSBvcGVyYXRlIGluIHRoZSBzYW1lIG9yIGRpZmZlcmVudCBvcGVyYXRp bmcgY2xhc3MgYW5kDQo+ID4gY2hhbm5lbCBhcyBhIGNvbmN1cnJlbnRseSBvcGVyYXRpbmcgV0xB TiBCU1MuIEZvciBleGFtcGxlLCBhIFdMQU4gQlNTDQo+ID4gbWF5IG9wZXJhdGUgaW4gY2hhbm5l bCAzNiBpbiB0aGUgNS4yIEdIeiBiYW5kLCB3aGlsZSB0aGUgUDJQIEdyb3VwIG1heQ0KPiA+IG9w ZXJhdGUgaW4gY2hhbm5lbCA2IGluIHRoZSAyLjQgR0h6IGJhbmQuDQo+ID4gIiIiDQoNCj4gDQo+ IEJ1dCBjYW4gYSBXTEFOIEJTUyBvcGVyYXRlIG9uIGNoYW5uZWwgNiBpbiB0aGUgMi40IEdIeiBi YW5kIGFuZCBpbmZlciBpdCBjYW4NCj4gc3RhcnQgR08gb24gY2hhbm5lbCAzNj8gVGhpcyBxdWVz dGlvbiBzZWVtcyBub3QgcmVsYXRlZCB0byBjb25jdXJyZW50IHN0dWZmDQo+IGJ1dCByYXRoZXIg cHVyZSByZWd1bGF0b3J5IGJ1dCBJIHN1cHBvc2UgdGhhdCB3aWxsIGRlcGVuZCBvbiB0aGUgZGVm aW5pdGlvbg0KPiB0aGF0IHRoZSBGQ0MgaW50ZW5kZWQgYmVoaW5kIEdPIGNvbmN1cnJlbmN5Lg0K DQpOby4gQXMgbWVudGlvbmVkIGluIHByZXZpb3VzbHksIHRoZSBVTklJIGJhbmRzIGFyZSBidW5k bGVzIG9mIGNoYW5uZWxzIHdoaWNoIHNoYXJlIHRoZSBzYW1lIHJ1bGVzLCBzbyBzaW5jZSBjaGFu bmVscyA2IGlzIG5vdCBpbiB0aGUgc2FtZSBVTklJIGJhbmQgYXMgY2hhbm5lbCAzNiBpdCBpcyBu b3QgYWxsb3dlZCB0byBpbnN0YW50aWF0ZSBhIEdPIG9uIGNoYW5uZWwgMzYgYmFzZWQgb24gdGhl IEdPIGNvbmN1cnJlbnQgcmVsYXhhdGlvbi4NCg0KPiBJcyB0aGUgZGVmaW5pdGlvbiBvZiBjb25j dXJyZW5jeSBHTyB0aGluZyBzdXBwb3NlZCB0byAqcmVzdHJpY3QqIHRoZSBudW1iZXINCj4gb2Yg aW50ZXJmYWNlcyBhIGRldmljZSBjYW4gY3JlYXRlIChTVEEsIEdPKSwgb3Igc2ltcGx5IGRlZmlu ZSBwZXJtaXNzaXZlIHJ1bGVzDQo+IHdoaWNoIHdvdWxkIGhhdmUgb3RoZXJ3aXNlIGJlZW4gYmxv Y2tlZD8NCj4gDQoNClRoZSBkZWZpbml0aW9ucyB0byBub3QgbGltaXQvcmVzdHJpY3QgdGhlIG51 bWJlciBvZiBjb25jdXJyZW50IGludGVyZmFjZSBidXQgYWxsb3cgcGVybWlzc2l2ZSBydWxlcyB0 byBhbGxvdyBjZXJ0YWluIG9wZXJhdGlvbnMgd2hpY2ggaW4gb3RoZXIgY2lyY3Vtc3RhbmNlcyB3 b3VsZCBiZSBibG9ja2VkLiANCg0KUmVnYXJkcywNCg0KSWxhbi4NCg0K

author
#6 lore raw

RE: [PATCH v4 1/5] cfg80211: Add indoor only and GO concurrent channel attributes

In reply to Luis R. Rodriguez

.

Quoted 18 lines
Quoted 1 line

+ * @IEEE80211_CHAN_INDOOR_ONLY: Only indoor use is permitted on

this channel.

Quoted 1 line

+ * A channel marked with IEEE80211_CHAN_INDOOR_ONLY can only be

used when

Quoted 5 lines

+ * there is a clear assessment that the device is operating in an indoor
+ * surroundings, i.e., it is connected to AC power (and not through
+ * portable DC inverters) or is under the control of a master that is
+ * acting as an AP and is connected to AC power.
+ * @IEEE80211_CHAN_GO_CONCURRENT: GO operation is allowed on this

channel if

Quoted 1 line

+ * it's connected concurrently to a BSS on the same channel on the 2

GHz

Quoted 3 lines

+ * band or to a channel in the same UNII band (on the 5 GHz band), and
+ * IEEE80211_CHAN_RADAR is not set
+ * Instantiating a GO on a channel marked with

IEEE80211_CHAN_GO_CONCURRENT

Quoted 2 lines

+ * can be done when there is a clear assessment that the device is
+ * operating under the guidance of an authorized master, i.e., setting

Quoted 8 lines

up a

Quoted 2 lines

+ * GO while the device is also connected to an AP with DFS and radar
+ * detection on the UNII band.

Would make sense to add here a comment indicating what you mentioned on the other thread about userspace being responsible for this verification. In this case the supplicant (wpa_supplicant).

Sure.

Quoted 11 lines
Quoted 3 lines

* using this channel as the primary or any of the secondary channels
* isn't possible
+ * @NL80211_FREQUENCY_ATTR_INDOOR_ONLY: Indoor only use is

permitted

Quoted 1 line

+ * on this channel in current regulatory domain

I'd prefer the more verbose documentation to go here as this is the userspace API. What you can do is on the IEEE80211_CHAN_INDOOR_ONLY documetnation refer for further information to %NL80211_FREQUENCY_ATTR_INDOOR_ONLY.

Done.

Quoted 8 lines
Quoted 1 line

+ * @NL80211_FREQUENCY_ATTR_GO_CONCURRENT: GO operation is

allowed on this

Quoted 1 line

+ * channel if it's connected concurrently to a BSS on the same channel

on

Quoted 2 lines

+ * the 2 GHz band or to a channel in the same UNII band (on the 5 GHz
+ * band), and NL80211_FREQUENCY_ATTR_RADAR is not set

Same here.

Done.

Regards,

Ilan.

author
#7 lore raw

PATCH v4 2/5 cfg80211: Add Kconfig option for cellular BS hints

In reply to Ilan Peer

Move the regulatory cellular base station hints support under a specific configuration option and make the option depend on CFG80211_CERTIFICATION_ONUS.

---
 net/wireless/Kconfig |   13 +++++++++++++
 net/wireless/reg.c   |    2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)
net/wireless/Kconfig +13 -0
index 16d08b3..2a891bc 100644
@@ -95,6 +95,19 @@ config CFG80211_CERTIFICATION_ONUS
 	  you are a wireless researcher and are working in a controlled
 	  and approved environment by your local regulatory agency.
 
+config CFG80211_REG_CELLULAR_HINTS
+	bool "cfg80211 regulatory support for cellular base station hints"
+	depends on CFG80211_CERTIFICATION_ONUS
+	---help---
+	  This option enables support for parsing regulatory hints
+	  from cellular base stations. If enabled and at least one driver
+	  claims support for parsing cellular base station hints the
+	  regulatory core will allow and parse these regulatory hints.
+	  The regulatory core will only apply these regulatory hints on
+	  drivers that support this feature. You should only enable this
+	  feature if you have tested and validated this feature on your
+	  systems.
+
 config CFG80211_DEFAULT_PS
 	bool "enable powersave by default"
 	depends on CFG80211
net/wireless/reg.c +1 -1
index eeccce3..096268f 100644
@@ -1109,7 +1109,7 @@ bool reg_last_request_cell_base(void)
 	return reg_request_cell_base(get_last_request());
 }
 
-#ifdef CONFIG_CFG80211_CERTIFICATION_ONUS
+#ifdef CONFIG_CFG80211_REG_CELLULAR_HINTS
 /* Core specific check */
 static enum reg_request_treatment
 reg_ignore_cell_hint(struct regulatory_request *pending_request)
Signature · 1 line
1.7.10.4
author
#8 lore raw

PATCH v4 3/5 cfg80211: Enable GO operation on additional channels

In reply to Ilan Peer

Allow GO operation on a channel marked with IEEE80211_CHAN_GO_CONCURRENT iff there is an active station interface that is associated to an AP operating on the same channel in the 2 GHz band or the same UNII band (in the 5 GHz band). This relaxation is not allowed if the channel is marked with IEEE80211_CHAN_RADAR.

Note that this is a permissive approach to the FCC definitions, that require a clear assessment that the device operating the AP is an authorized master, i.e., with radar detection and DFS capabilities.

It is assumed that such restrictions are enforced by user space. Furthermore, it is assumed, that if the conditions that allowed for the operation of the GO on such a channel change, i.e., the station interface disconnected from the AP, it is the responsibility of user space to evacuate the GO from the channel.

---
 include/net/cfg80211.h   |    4 ++-
 include/net/regulatory.h |    6 ++++
 net/mac80211/ibss.c      |    9 ++++--
 net/wireless/Kconfig     |   20 ++++++++++++++
 net/wireless/chan.c      |   69 ++++++++++++++++++++++++++++++++++++++++++++--
 net/wireless/mesh.c      |    3 +-
 net/wireless/nl80211.c   |   11 +++++---
 net/wireless/reg.c       |   29 +++++++++++++++++++
 net/wireless/reg.h       |   12 ++++++++
 net/wireless/trace.h     |   11 +++++---
 10 files changed, 158 insertions(+), 16 deletions(-)
include/net/cfg80211.h +3 -1
index 5b2f275..0a69570 100644
@@ -4538,12 +4538,14 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
  * cfg80211_reg_can_beacon - check if beaconing is allowed
  * @wiphy: the wiphy
  * @chandef: the channel definition
+ * @iftype: interface type
  *
  * Return: %true if there is no secondary channel or the secondary channel(s)
  * can be used for beaconing (i.e. is not a radar channel etc.)
  */
 bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
-			     struct cfg80211_chan_def *chandef);
+			     struct cfg80211_chan_def *chandef,
+			     enum nl80211_iftype iftype);
 
 /*
  * cfg80211_ch_switch_notify - update wdev channel and notify userspace
include/net/regulatory.h +6 -0
index b07cdc9..0d96cd0 100644
@@ -131,6 +131,11 @@ struct regulatory_request {
  * 	all country IE information processed by the regulatory core. This will
  * 	override %REGULATORY_COUNTRY_IE_FOLLOW_POWER as all country IEs will
  * 	be ignored.
+ * @REGULATORY_ENABLE_RELAX_NO_IR: for devices that wish to allow the
+ *      NO_IR relaxation, which enables transmissions on channels on which
+ *      otherwise initiating radiation is not allowed. This will enable the
+ *      relaxations enabled under the CFG80211_REG_RELAX_NO_IR configuration
+ *      option
  */
 enum ieee80211_regulatory_flags {
 	REGULATORY_CUSTOM_REG			= BIT(0),
@@ -138,6 +143,7 @@ enum ieee80211_regulatory_flags {
 	REGULATORY_DISABLE_BEACON_HINTS		= BIT(2),
 	REGULATORY_COUNTRY_IE_FOLLOW_POWER	= BIT(3),
 	REGULATORY_COUNTRY_IE_IGNORE		= BIT(4),
+	REGULATORY_ENABLE_RELAX_NO_IR           = BIT(5),
 };
 
 struct ieee80211_freq_range {
net/mac80211/ibss.c +6 -3
index 4453e27..a3b9561 100644
@@ -262,7 +262,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	/* make a copy of the chandef, it could be modified below. */
 	chandef = *req_chandef;
 	chan = chandef.chan;
-	if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
+	if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef,
+				     NL80211_IFTYPE_ADHOC)) {
 		if (chandef.width == NL80211_CHAN_WIDTH_5 ||
 		    chandef.width == NL80211_CHAN_WIDTH_10 ||
 		    chandef.width == NL80211_CHAN_WIDTH_20_NOHT ||
@@ -274,7 +275,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 		chandef.width = NL80211_CHAN_WIDTH_20;
 		chandef.center_freq1 = chan->center_freq;
 		/* check again for downgraded chandef */
-		if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
+		if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef,
+					     NL80211_IFTYPE_ADHOC)) {
 			sdata_info(sdata,
 				   "Failed to join IBSS, beacons forbidden\n");
 			return;
@@ -856,7 +858,8 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,
 		goto disconnect;
 	}
 
-	if (!cfg80211_reg_can_beacon(sdata->local->hw.wiphy, &params.chandef)) {
+	if (!cfg80211_reg_can_beacon(sdata->local->hw.wiphy, &params.chandef,
+				     NL80211_IFTYPE_ADHOC)) {
 		sdata_info(sdata,
 			   "IBSS %pM switches to unsupported channel (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n",
 			   ifibss->bssid,
net/wireless/Kconfig +20 -0
index 2a891bc..1db53df 100644
@@ -108,6 +108,26 @@ config CFG80211_REG_CELLULAR_HINTS
 	  feature if you have tested and validated this feature on your
 	  systems.
 
+config CFG80211_REG_RELAX_NO_IR
+	bool "cfg80211 support for NO_IR relaxation"
+	depends on CFG80211_CERTIFICATION_ONUS
+	---help---
+	 This option enables support for relaxation of the NO_IR flag for
+	 situations that certain regulatory bodies have provided clarifications
+	 on how relaxation can occur. This feature has an inherent dependency on
+	 userspace features which must have been properly tested and as such is
+	 not enabled by default.
+
+	 A relaxation feature example is allowing the operation of a P2P group
+	 owner (GO) on channels marked with NO_IR if there is an additional BSS
+	 interface which associated to an AP which userspace assumes or confirms
+	 to be an authorized master, i.e., with radar detection support and DFS
+	 capabilities.
+
+	 The regulatory core will apply these relaxations only for drivers that
+	 support this feature by declaring the appropriate channel flags and
+	 capabilities in their registration flow.
+
 config CFG80211_DEFAULT_PS
 	bool "enable powersave by default"
 	depends on CFG80211
net/wireless/chan.c +66 -3

81 lines not on this page · raw message

net/wireless/mesh.c +2 -1
index d42a3fc..45c2c85 100644
@@ -175,7 +175,8 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
 							       scan_width);
 	}
 
-	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))
+	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef,
+				     NL80211_IFTYPE_MESH_POINT))
 		return -EINVAL;
 
 	err = cfg80211_chandef_dfs_required(wdev->wiphy, &setup->chandef);
net/wireless/nl80211.c +7 -4
index 95a8c72..2270d9b 100644
@@ -1933,7 +1933,7 @@ static int __nl80211_set_channel(struct cfg80211_registered_device *rdev,
 			result = -EBUSY;
 			break;
 		}
-		if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef)) {
+		if (!cfg80211_reg_can_beacon(&rdev->wiphy, &chandef, iftype)) {
 			result = -EINVAL;
 			break;
 		}
@@ -3259,7 +3259,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
 	} else if (!nl80211_get_ap_channel(rdev, &params))
 		return -EINVAL;
 
-	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef))
+	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef,
+				     wdev->iftype))
 		return -EINVAL;
 
 	err = cfg80211_chandef_dfs_required(wdev->wiphy, &params.chandef);
@@ -5914,7 +5915,8 @@ skip_beacons:
 	if (err)
 		return err;
 
-	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef))
+	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef,
+				     wdev->iftype))
 		return -EINVAL;
 
 	if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP ||
@@ -6685,7 +6687,8 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
 	if (err)
 		return err;
 
-	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef))
+	if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef,
+				     NL80211_IFTYPE_ADHOC))
 		return -EINVAL;
 
 	switch (ibss.chandef.width) {
net/wireless/reg.c +29 -0
index 096268f..8f5b460 100644
@@ -2597,6 +2597,35 @@ static void reg_timeout_work(struct work_struct *work)
 	rtnl_unlock();
 }
 
+/*
+ * See http://www.fcc.gov/document/5-ghz-unlicensed-spectrum-unii, for
+ * UNII band definitions
+ */
+int cfg80211_get_unii(int freq)
+{
+	/* UNII-1 */
+	if (freq >= 5150 && freq <= 5250)
+		return 0;
+
+	/* UNII-2A */
+	if (freq > 5250 && freq <= 5350)
+		return 1;
+
+	/* UNII-2B */
+	if (freq > 5350 && freq <= 5470)
+		return 2;
+
+	/* UNII-2C */
+	if (freq > 5470 && freq <= 5725)
+		return 3;
+
+	/* UNII-3 */
+	if (freq > 5725 && freq <= 5825)
+		return 4;
+
+	return -EINVAL;
+}
+
 int __init regulatory_init(void)
 {
 	int err = 0;
net/wireless/reg.h +12 -0
index 1852461..9c11e72 100644
@@ -105,4 +105,16 @@ void regulatory_hint_country_ie(struct wiphy *wiphy,
  */
 void regulatory_hint_disconnect(void);
 
+/**
+ * cfg80211_get_unii - get the U-NII band for the frequency
+ * @freq: the frequency for which we want to get the UNII band.
+
+ * Get a value specifying the U-NII band frequency belongs to.
+ * U-NII bands are defined by the FCC in C.F.R 47 part 15.
+ *
+ * Returns -EINVAL if freq is invalid, 0 for UNII-1, 1 for UNII-2A,
+ * 2 for UNII-2B, 3 for UNII-2C and 4 for UNII-3.
+ */
+int cfg80211_get_unii(int freq);
+
 #endif  /* __NET_WIRELESS_REG_H */
net/wireless/trace.h +7 -4
index 5eaeed5..6293e8d 100644
@@ -2189,18 +2189,21 @@ TRACE_EVENT(cfg80211_cqm_rssi_notify,
 );
 
 TRACE_EVENT(cfg80211_reg_can_beacon,
-	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
-	TP_ARGS(wiphy, chandef),
+	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef,
+		 enum nl80211_iftype iftype),
+	TP_ARGS(wiphy, chandef, iftype),
 	TP_STRUCT__entry(
 		WIPHY_ENTRY
 		CHAN_DEF_ENTRY
+		__field(enum nl80211_iftype, iftype)
 	),
 	TP_fast_assign(
 		WIPHY_ASSIGN;
 		CHAN_DEF_ASSIGN(chandef);
+		__entry->iftype = iftype;
 	),
-	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT,
-		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
+	TP_printk(WIPHY_PR_FMT ", " CHAN_DEF_PR_FMT ", iftype=%d",
+		  WIPHY_PR_ARG, CHAN_DEF_PR_ARG, __entry->iftype)
 );
 
 TRACE_EVENT(cfg80211_chandef_dfs_required,
Signature · 1 line
1.7.10.4
#9 lore raw

Re: [PATCH v4 3/5] cfg80211: Enable GO operation on additional channels

Quoted 9 lines · Ilan Peer

Allow GO operation on a channel marked with IEEE80211_CHAN_GO_CONCURRENT iff there is an active station interface that is associated to an AP operating on the same channel in the 2 GHz band or the same UNII band (in the 5 GHz band). This relaxation is not allowed if the channel is marked with IEEE80211_CHAN_RADAR.

Note that this is a permissive approach to the FCC definitions, that require a clear assessment that the device operating the AP is an authorized master, i.e., with radar detection and DFS capabilities.

Come to think of it, do we want to make this an FCC specific thing only? If so then the dfs_region could be checked prior to enablement. If the premise is that we'd trust to be associated to a non-GO type AP, that is a real AP, then we could likely consider a requirement that this real AP would be using a country IE as well. Please consider this.

Looks good otherwise.

Luis

author
#10 lore raw

RE: [PATCH v4 3/5] cfg80211: Enable GO operation on additional channels

Quoted 18 lines

-----Original Message-----
From: Luis R. Rodriguez [mailto:[email protected]] On Behalf Of Luis R. Rodriguez
Sent: Wednesday, February 19, 2014 18:24
To: Peer, Ilan
Cc: [email protected]
Subject: Re: [PATCH v4 3/5] cfg80211: Enable GO operation on additional channels

Quoted 6 lines · Ilan Peer

Allow GO operation on a channel marked with IEEE80211_CHAN_GO_CONCURRENT iff there is an active station interface that is associated to an AP operating on the same channel in the 2 GHz band or the same UNII band (in the 5 GHz band). This relaxation is not allowed if the channel is marked with IEEE80211_CHAN_RADAR.

Quoted 6 lines
Quoted 3 lines

Note that this is a permissive approach to the FCC definitions, that require a clear assessment that the device operating the AP is an authorized master, i.e., with radar detection and DFS capabilities.

Come to think of it, do we want to make this an FCC specific thing only? If so then the dfs_region could be checked prior to enablement.

The direction is set by the FCC but other regulatory bodies take similar approach. For example see page 27 in this ETSI standard where the same frequency ranges are mentioned (without specifically calling them UNII) and the same concept of channel bundles is defined for testing.

http://www.etsi.org/deliver/etsi_en/301800_301899/301893/01.07.01_60/en_301893v010701p.pdf

Quoted 3 lines

If the premise is that we'd trust to be associated to a non-GO type AP, that is a real AP, then we could likely consider a requirement that this real AP would be using a country IE as well. Please consider this.

Not sure that is needed. As I mentioned earlier it is the responsibility of user space to verify that this is not a GO, so it does not really make a difference if it tests for the P2P IEs or the country IE.

Regards,

Ilan.

author
#11 lore raw

PATCH v4 4/5 cfg80211: Add an option to hint indoor operation

In reply to Ilan Peer

Add the option to hint the wireless core that it is operating in an indoor environment.

---
 include/net/cfg80211.h       |    5 ++++
 include/uapi/linux/nl80211.h |    3 ++
 net/wireless/nl80211.c       |   18 +++++-------
 net/wireless/reg.c           |   62 +++++++++++++++++++++++++++++++++++++++++-
 net/wireless/reg.h           |    1 +
 5 files changed, 77 insertions(+), 12 deletions(-)
include/net/cfg80211.h +5 -0
index 0a69570..73651eb 100644
@@ -3643,6 +3643,11 @@ const struct ieee80211_reg_rule *freq_reg_info(struct wiphy *wiphy,
  */
 const char *reg_initiator_name(enum nl80211_reg_initiator initiator);
 
+/**
+ * regulatory_indoor_allowed - is indoor operation allowed
+ */
+bool regulatory_indoor_allowed(void);
+
 /*
  * callbacks for asynchronous cfg80211 methods, notification
  * functions and BSS handling helpers
include/uapi/linux/nl80211.h +3 -0
index da27ca4..4383047 100644
@@ -2568,10 +2568,13 @@ enum nl80211_dfs_regions {
  *	present has been registered with the wireless core that
  *	has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a
  *	supported feature.
+ * @NL80211_USER_REG_HINT_INDOOR: a user sent an hint indicating that the
+ *	platform is operating in an indoor environment.
  */
 enum nl80211_user_reg_hint_type {
 	NL80211_USER_REG_HINT_USER	= 0,
 	NL80211_USER_REG_HINT_CELL_BASE = 1,
+	NL80211_USER_REG_HINT_INDOOR    = 2,
 };
 
 /**
net/wireless/nl80211.c +7 -11
index 2270d9b..50826a9 100644
@@ -4659,7 +4659,6 @@ static int parse_reg_rule(struct nlattr *tb[],
 
 static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
 {
-	int r;
 	char *data = NULL;
 	enum nl80211_user_reg_hint_type user_reg_hint_type;
 
@@ -4672,11 +4671,6 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
 	if (unlikely(!rcu_access_pointer(cfg80211_regdomain)))
 		return -EINPROGRESS;
 
-	if (!info->attrs[NL80211_ATTR_REG_ALPHA2])
-		return -EINVAL;
-
-	data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]);
-
 	if (info->attrs[NL80211_ATTR_USER_REG_HINT_TYPE])
 		user_reg_hint_type =
 		  nla_get_u32(info->attrs[NL80211_ATTR_USER_REG_HINT_TYPE]);
@@ -4686,14 +4680,16 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
 	switch (user_reg_hint_type) {
 	case NL80211_USER_REG_HINT_USER:
 	case NL80211_USER_REG_HINT_CELL_BASE:
-		break;
+		if (!info->attrs[NL80211_ATTR_REG_ALPHA2])
+			return -EINVAL;
+
+		data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]);
+		return regulatory_hint_user(data, user_reg_hint_type);
+	case NL80211_USER_REG_HINT_INDOOR:
+		return regulatory_hint_indoor_user();
 	default:
 		return -EINVAL;
 	}
-
-	r = regulatory_hint_user(data, user_reg_hint_type);
-
-	return r;
 }
 
 static int nl80211_get_mesh_config(struct sk_buff *skb,
net/wireless/reg.c +61 -1

127 lines not on this page · raw message

net/wireless/reg.h +1 -0
index 9c11e72..b350a30 100644
@@ -25,6 +25,7 @@ enum nl80211_dfs_regions reg_get_dfs_region(struct wiphy *wiphy);
 
 int regulatory_hint_user(const char *alpha2,
 			 enum nl80211_user_reg_hint_type user_reg_hint_type);
+int regulatory_hint_indoor_user(void);
 
 int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env);
 void wiphy_regulatory_register(struct wiphy *wiphy);
Signature · 1 line
1.7.10.4
#12 lore raw

Re: [PATCH v4 4/5] cfg80211: Add an option to hint indoor operation

Quoted 9 lines · Ilan Peer
net/wireless/reg.c +1 -0
index 8f5b460..b3768c2 100644
@@ -65,11 +65,24 @@
 #define REG_DBG_PRINT(args...)
 #endif
 
+/**

net/wireless/reg.c line 78

Quoted 10 lines
net/wireless/reg.c +10 -0
+ * enum reg_request_treatment - regulatory request treatment
+ *
+ * @REG_REQ_OK: continue processing the regulatory request
+ * @REG_REQ_IGNORE: ignore the regulatory request
+ * @REG_REQ_INTERSECT: the regulatory domain resulting from this request should
+ *	be intersected with the current one.
+ * @REG_REQ_ALREADY_SET: the regulatory request will not change the current
+ *	regulatory settings, and no further processing is required.
+ * @REG_REQ_USER_HINT_HANDLED: a non alpha2  user hint was handled and no
+ *	further processing is required.

May be worth expanding on this to clarify why you mention non alpha2, that is: regulatory hints that are not providing an alpha2 hint can use this to let the regulatory core know it won't need to consider the updating the last_request.

Come to think of it, it gets me wondering if we can eventually just then move beacon hints to use this later.

Luis

author
#13 lore raw

PATCH v6 5/5 cfg80211: Enable GO operation on indoor channels

In reply to Ilan Peer

Allow GO operation on a channel marked with IEEE80211_CHAN_INDOOR_ONLY iff there is a user hint indicating that the platform is operating in an indoor environment, i.e., the platform is a printer or media center device.

---
 net/wireless/chan.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
net/wireless/chan.c +10 -2
index 1d8c990..b18367d 100644
@@ -611,6 +611,8 @@ EXPORT_SYMBOL(cfg80211_chandef_usable);
  * IEEE80211_CHAN_GO_CONCURRENT and there is an additional station interface
  * associated to an AP on the same channel or on the same UNII band
  * (assuming that the AP is an authorized master).
+ * In addition allow the GO to operate on a channel on which indoor operation is
+ * allowed, iff we are currently operating in an indoor environment.
  */
 static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
 					struct ieee80211_channel *chan)
@@ -621,8 +623,14 @@ static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
 	ASSERT_RTNL();
 
 	if (!config_enabled(CONFIG_CFG80211_REG_RELAX_NO_IR) ||
-	    !(wiphy->regulatory_flags & REGULATORY_ENABLE_RELAX_NO_IR) ||
-	    !(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
+	    !(wiphy->regulatory_flags & REGULATORY_ENABLE_RELAX_NO_IR))
+		return false;
+
+	if (regulatory_indoor_allowed() &&
+	    (chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
+		return true;
+
+	if (!(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
 		return false;
 
 	list_for_each_entry(wdev_iter, &rdev->wdev_list, list) {
Signature · 1 line
1.7.10.4
author
#14 lore raw

PATCH v4 5/5 cfg80211: Enable GO operation on indoor channels

Allow GO operation on a channel marked with IEEE80211_CHAN_INDOOR_ONLY iff there is a user hint indicating that the platform is operating in an indoor environment, i.e., the platform is a printer or media center device.

---
 net/wireless/chan.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
net/wireless/chan.c +10 -2
index 1d8c990..b18367d 100644
@@ -611,6 +611,8 @@ EXPORT_SYMBOL(cfg80211_chandef_usable);
  * IEEE80211_CHAN_GO_CONCURRENT and there is an additional station interface
  * associated to an AP on the same channel or on the same UNII band
  * (assuming that the AP is an authorized master).
+ * In addition allow the GO to operate on a channel on which indoor operation is
+ * allowed, iff we are currently operating in an indoor environment.
  */
 static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
 					struct ieee80211_channel *chan)
@@ -621,8 +623,14 @@ static bool cfg80211_go_permissive_chan(struct cfg80211_registered_device *rdev,
 	ASSERT_RTNL();
 
 	if (!config_enabled(CONFIG_CFG80211_REG_RELAX_NO_IR) ||
-	    !(wiphy->regulatory_flags & REGULATORY_ENABLE_RELAX_NO_IR) ||
-	    !(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
+	    !(wiphy->regulatory_flags & REGULATORY_ENABLE_RELAX_NO_IR))
+		return false;
+
+	if (regulatory_indoor_allowed() &&
+	    (chan->flags & IEEE80211_CHAN_INDOOR_ONLY))
+		return true;
+
+	if (!(chan->flags & IEEE80211_CHAN_GO_CONCURRENT))
 		return false;
 
 	list_for_each_entry(wdev_iter, &rdev->wdev_list, list) {
Signature · 1 line
1.7.10.4
Reviewed-by on v4 5/5
#15 lore raw

Re: [PATCH v4 5/5] cfg80211: Enable GO operation on indoor channels

Quoted 6 lines · Ilan Peer

Allow GO operation on a channel marked with IEEE80211_CHAN_INDOOR_ONLY iff there is a user hint indicating that the platform is operating in an indoor environment, i.e., the platform is a printer or media center device.

Luis