2012-11-10 02:00:32

by Bing Zhao

[permalink] [raw]
Subject: [PATCH v2] nl/cfg80211: advertise OBSS scan offload capability

From: Amitkumar Karwar <[email protected]>

wpa_supplicant will do OBSS scan for drivers that implement
auth/assoc API. Drivers that implement nl80211 connect API
(rather than auth/assoc) may need wpa_supplicant to do this
as well.

New flag is added to inform userspace that this driver will
make use of wpa_supplicant's OBSS scan feature.

Signed-off-by: Amitkumar Karwar <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
---
v2: change flag documentation and commit log to be more specific
(Johannes Berg)

include/uapi/linux/nl80211.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index cbd2d6b..8ee60c8 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3057,6 +3057,9 @@ enum nl80211_ap_sme_features {
* @NL80211_FEATURE_SCAN_FLUSH: Scan flush is supported
* @NL80211_FEATURE_AP_SCAN: Support scanning using an AP vif
* @NL80211_FEATURE_VIF_TXPOWER: The driver supports per-vif TX power setting
+ * @NL80211_FEATURE_OBSS_SCAN_OFFLOAD: The driver expects user space to
+ * perform OBSS scan and generate 20/40 BSS coex reports. This flag is
+ * interested in only in the case of a driver that has connect API.
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3069,6 +3072,7 @@ enum nl80211_feature_flags {
NL80211_FEATURE_SCAN_FLUSH = 1 << 7,
NL80211_FEATURE_AP_SCAN = 1 << 8,
NL80211_FEATURE_VIF_TXPOWER = 1 << 9,
+ NL80211_FEATURE_OBSS_SCAN_OFFLOAD = 1 << 10,
};

/**
--
1.8.0



2012-11-12 11:42:02

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2] nl/cfg80211: advertise OBSS scan offload capability

On Mon, 2012-11-12 at 13:17 +0200, Jouni Malinen wrote:

> Sorry for being a bit late with my comments, but does this single flag
> really cover expected use cases? I would assume that number of more full
> MAC -like designs will have to move to separate auth/assoc commands
> instead of using connect API in the future (e.g., for FT and SAE).
> However, those drivers do not necessarily expect user space to take care
> of OBSS scans. I understand that this is not currently supported since
> wpa_supplicant assuming auth/assoc to mean user space SME, but it should
> be kept in mind that that may need to change in the future..
>
> I guess we can handle the auth/assoc without user space OBSS scan
> separately (a new feature flag for stopping OBSS scan?), so I'm fine
> with this patch moving ahead as-is.

Right, I don't see any other choice anyway given that we need to be
backward compatible. I kinda scratched the surface of this previously
when I said mac80211 could set the new flag, but then I don't see how to
detect that it's explicitly not set vs. being an older kernel.

johannes



2012-11-12 11:17:37

by Jouni Malinen

[permalink] [raw]
Subject: Re: [PATCH v2] nl/cfg80211: advertise OBSS scan offload capability

On Mon, Nov 12, 2012 at 10:31:37AM +0100, Johannes Berg wrote:
> On Fri, 2012-11-09 at 17:51 -0800, Bing Zhao wrote:
> > From: Amitkumar Karwar <[email protected]>
> >
> > wpa_supplicant will do OBSS scan for drivers that implement
> > auth/assoc API. Drivers that implement nl80211 connect API
> > (rather than auth/assoc) may need wpa_supplicant to do this
> > as well.

> Applied, but I changed a lot ;-)
>
> Notably, I reworded the constant name to be
> NL80211_FEATURE_NEED_OBSS_SCAN, since we typically use the term
> "offload" to mean that the *device* does something, not to mean that
> *userspace* does something.

Sorry for being a bit late with my comments, but does this single flag
really cover expected use cases? I would assume that number of more full
MAC -like designs will have to move to separate auth/assoc commands
instead of using connect API in the future (e.g., for FT and SAE).
However, those drivers do not necessarily expect user space to take care
of OBSS scans. I understand that this is not currently supported since
wpa_supplicant assuming auth/assoc to mean user space SME, but it should
be kept in mind that that may need to change in the future..

I guess we can handle the auth/assoc without user space OBSS scan
separately (a new feature flag for stopping OBSS scan?), so I'm fine
with this patch moving ahead as-is.

--
Jouni Malinen PGP id EFC895FA

2012-11-12 21:41:18

by Bing Zhao

[permalink] [raw]
Subject: RE: [PATCH v2] nl/cfg80211: advertise OBSS scan offload capability

SGkgSm9oYW5uZXMsDQoNCj4gPiBGcm9tO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xvYWQiIHRvIG1lYW4gdGhhdCB0aGUgKmRldmljZSogZG9lcyBzb21ldGhpbmcsIG5vdCB0byBt
ZWFuIHRoYXQNCj4gKnVzZXJzcGFjZSogZG9lcyBzb21ldGhpbmcuDQoNClRoaXMgbWFrZXMgYSBs
b3QgbW9yZSBzZW5zZS4gVGhhbmtzIQ0KDQpJIHdpbGwgcmUtcG9zdCB0aGUgd3BhX3MgcGF0Y2gg
dG8gdXNlIHRoZSBuZXcgY29uc3RhbnQgbmFtZS4NCg0KVGhhbmtzLA0KQmluZw0KDQo=

2012-11-12 09:31:05

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2] nl/cfg80211: advertise OBSS scan offload capability

On Fri, 2012-11-09 at 17:51 -0800, Bing Zhao wrote:
> From: Amitkumar Karwar <[email protected]>
>
> wpa_supplicant will do OBSS scan for drivers that implement
> auth/assoc API. Drivers that implement nl80211 connect API
> (rather than auth/assoc) may need wpa_supplicant to do this
> as well.
>
> New flag is added to inform userspace that this driver will
> make use of wpa_supplicant's OBSS scan feature.

> + * @NL80211_FEATURE_OBSS_SCAN_OFFLOAD: The driver expects user space to
> + * perform OBSS scan and generate 20/40 BSS coex reports. This flag is
> + * interested in only in the case of a driver that has connect API.

Applied, but I changed a lot ;-)

Notably, I reworded the constant name to be
NL80211_FEATURE_NEED_OBSS_SCAN, since we typically use the term
"offload" to mean that the *device* does something, not to mean that
*userspace* does something.

johannes