]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SME: Fix OBSS scan result processing for 20/40 MHz co-ex report
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 23 Mar 2014 21:54:50 +0000 (23:54 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 23 Mar 2014 21:54:50 +0000 (23:54 +0200)
The 40 MHz intolerant bit needs to be checked before skipping the BSS
based on the channel already being in the lost (which could have
happened due to another BSS that does not indicate 40 MHz intolerant).
This fixed the 20/40 MHz co-ex report to indicate 20 MHz request
properly if there are both 40 MHz tolerant and intolerant BSSes on the
same channel.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/sme.c

index 63beaefabd058e6da3570b9d0239c7be65b10904..0732769ea2da08d946085d44eeb02226bc020a84 100644 (file)
@@ -1053,6 +1053,9 @@ int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
                ht_cap = (ie && (ie[1] == 26)) ? WPA_GET_LE16(ie + 2) : 0;
 
                if (!ht_cap || (ht_cap & HT_CAP_INFO_40MHZ_INTOLERANT)) {
+                       if (ht_cap & HT_CAP_INFO_40MHZ_INTOLERANT)
+                               num_intol++;
+
                        /* Check whether the channel is already considered */
                        for (i = 0; i < num_channels; i++) {
                                if (channel == chan_list[i])
@@ -1061,9 +1064,6 @@ int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
                        if (i != num_channels)
                                continue;
 
-                       if (ht_cap & HT_CAP_INFO_40MHZ_INTOLERANT)
-                               num_intol++;
-
                        chan_list[num_channels++] = channel;
                }
        }