]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow OBSS scan and 20/40 coex reports to non-SME drivers
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 24 Nov 2012 16:08:48 +0000 (18:08 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Nov 2012 16:08:48 +0000 (18:08 +0200)
We enable this feature for non-SME drivers as well if
they explicitly indicate need for it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
src/drivers/driver.h
src/drivers/driver_nl80211.c
wpa_supplicant/sme.c

index ccc5a0e038a710fca5b89336120224cd8cc36614..7ee71aaac0579b386395e51b2d709efeaf66ba6f 100644 (file)
@@ -840,6 +840,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_AP_MLME                       0x01000000
 /* Driver supports SAE with user space SME */
 #define WPA_DRIVER_FLAGS_SAE                           0x02000000
+/* Driver makes use of OBSS scan mechanism in wpa_supplicant */
+#define WPA_DRIVER_FLAGS_OBSS_SCAN                     0x04000000
        unsigned int flags;
 
        int max_scan_ssids;
index 8ee8482a7aa8b1ef07d3e50c286d5e2e652809a6..297f67767c33f2b8896bf04e73613ca89eff8d38 100644 (file)
@@ -2661,6 +2661,9 @@ broken_combination:
 
                if (flags & NL80211_FEATURE_SAE)
                        capa->flags |= WPA_DRIVER_FLAGS_SAE;
+
+               if (flags & NL80211_FEATURE_NEED_OBSS_SCAN)
+                       capa->flags |= WPA_DRIVER_FLAGS_OBSS_SCAN;
        }
 
        if (tb[NL80211_ATTR_PROBE_RESP_OFFLOAD]) {
index f6e106c88d12438e3c56b49d515defdc5ec27954..a5f60d322de443a5822c08142eb89351f02878f0 100644 (file)
@@ -1033,9 +1033,14 @@ void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable)
        if (!enable)
                return;
 
-       if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) || ssid == NULL ||
-           ssid->mode != IEEE80211_MODE_INFRA)
-               return; /* Not using station SME in wpa_supplicant */
+       /*
+        * Schedule OBSS scan if driver is using station SME in wpa_supplicant
+        * or it expects OBSS scan to be performed by wpa_supplicant.
+        */
+       if (!((wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) ||
+             (wpa_s->drv_flags & WPA_DRIVER_FLAGS_OBSS_SCAN)) ||
+           ssid == NULL || ssid->mode != IEEE80211_MODE_INFRA)
+               return;
 
        if (!wpa_s->hw.modes)
                return;