Revert "STA OBSS: Add check for overlapping BSSs"
This reverts commit 3204795d7a
.
The commit adds an additional check that checks for overlapping BSSs in
addition to the existing 40 MHz intolerance subfield checks. The commit
cites IEEE Std 802.11-2016, 11.16.12, which defines the proper behavior
for a 20/40 MHz HT STA and AP, but the standard actually doesn't say
anything about overlapping BSSs. Specifically, the standard states that
the only BSSs that belong in the Intolerant channel report are those
that satisfy trigger event A, defined as channels with BSSs that don't
contain the HT capabilities element (which wpa_supplicant already did
before). Note that we also include channels with BSSs that have the 40
MHz intolerance bit set in the Intolerant channel report.
Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
This commit is contained in:
parent
f373c7b93f
commit
e480321f8c
3 changed files with 16 additions and 34 deletions
|
@ -2177,7 +2177,7 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
|
||||||
if (wnm_scan_process(wpa_s, 1) > 0)
|
if (wnm_scan_process(wpa_s, 1) > 0)
|
||||||
goto scan_work_done;
|
goto scan_work_done;
|
||||||
|
|
||||||
if (sme_proc_obss_scan(wpa_s, scan_res) > 0)
|
if (sme_proc_obss_scan(wpa_s) > 0)
|
||||||
goto scan_work_done;
|
goto scan_work_done;
|
||||||
|
|
||||||
if (own_request && data &&
|
if (own_request && data &&
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "common/ieee802_11_defs.h"
|
#include "common/ieee802_11_defs.h"
|
||||||
#include "common/ieee802_11_common.h"
|
#include "common/ieee802_11_common.h"
|
||||||
#include "common/ocv.h"
|
#include "common/ocv.h"
|
||||||
#include "common/hw_features_common.h"
|
|
||||||
#include "eapol_supp/eapol_supp_sm.h"
|
#include "eapol_supp/eapol_supp_sm.h"
|
||||||
#include "common/wpa_common.h"
|
#include "common/wpa_common.h"
|
||||||
#include "common/sae.h"
|
#include "common/sae.h"
|
||||||
|
@ -2380,14 +2379,13 @@ static void sme_send_2040_bss_coex(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
|
int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
|
||||||
struct wpa_scan_results *scan_res)
|
|
||||||
{
|
{
|
||||||
|
struct wpa_bss *bss;
|
||||||
const u8 *ie;
|
const u8 *ie;
|
||||||
|
u16 ht_cap;
|
||||||
u8 chan_list[P2P_MAX_CHANNELS], channel;
|
u8 chan_list[P2P_MAX_CHANNELS], channel;
|
||||||
u8 num_channels = 0, num_intol = 0, i;
|
u8 num_channels = 0, num_intol = 0, i;
|
||||||
size_t j;
|
|
||||||
int pri_freq, sec_freq;
|
|
||||||
|
|
||||||
if (!wpa_s->sme.sched_obss_scan)
|
if (!wpa_s->sme.sched_obss_scan)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2415,36 +2413,22 @@ int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
os_memset(chan_list, 0, sizeof(chan_list));
|
os_memset(chan_list, 0, sizeof(chan_list));
|
||||||
|
|
||||||
pri_freq = wpa_s->assoc_freq;
|
dl_list_for_each(bss, &wpa_s->bss, struct wpa_bss, list) {
|
||||||
|
|
||||||
switch (wpa_s->sme.ht_sec_chan) {
|
|
||||||
case HT_SEC_CHAN_ABOVE:
|
|
||||||
sec_freq = pri_freq + 20;
|
|
||||||
break;
|
|
||||||
case HT_SEC_CHAN_BELOW:
|
|
||||||
sec_freq = pri_freq - 20;
|
|
||||||
break;
|
|
||||||
case HT_SEC_CHAN_UNKNOWN:
|
|
||||||
default:
|
|
||||||
wpa_msg(wpa_s, MSG_WARNING,
|
|
||||||
"Undefined secondary channel: drop OBSS scan results");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j = 0; j < scan_res->num; j++) {
|
|
||||||
struct wpa_scan_res *bss = scan_res->res[j];
|
|
||||||
enum hostapd_hw_mode mode;
|
|
||||||
int res;
|
|
||||||
|
|
||||||
/* Skip other band bss */
|
/* Skip other band bss */
|
||||||
|
enum hostapd_hw_mode mode;
|
||||||
mode = ieee80211_freq_to_chan(bss->freq, &channel);
|
mode = ieee80211_freq_to_chan(bss->freq, &channel);
|
||||||
if (mode != HOSTAPD_MODE_IEEE80211G &&
|
if (mode != HOSTAPD_MODE_IEEE80211G &&
|
||||||
mode != HOSTAPD_MODE_IEEE80211B)
|
mode != HOSTAPD_MODE_IEEE80211B)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
res = check_bss_coex_40mhz(bss, pri_freq, sec_freq);
|
ie = wpa_bss_get_ie(bss, WLAN_EID_HT_CAP);
|
||||||
if (res) {
|
ht_cap = (ie && (ie[1] == 26)) ? WPA_GET_LE16(ie + 2) : 0;
|
||||||
if (res == 2)
|
wpa_printf(MSG_DEBUG, "SME OBSS scan BSS " MACSTR
|
||||||
|
" freq=%u chan=%u ht_cap=0x%x",
|
||||||
|
MAC2STR(bss->bssid), bss->freq, channel, ht_cap);
|
||||||
|
|
||||||
|
if (!ht_cap || (ht_cap & HT_CAP_INFO_40MHZ_INTOLERANT)) {
|
||||||
|
if (ht_cap & HT_CAP_INFO_40MHZ_INTOLERANT)
|
||||||
num_intol++;
|
num_intol++;
|
||||||
|
|
||||||
/* Check whether the channel is already considered */
|
/* Check whether the channel is already considered */
|
||||||
|
|
|
@ -37,8 +37,7 @@ void sme_disassoc_while_authenticating(struct wpa_supplicant *wpa_s,
|
||||||
void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s);
|
void sme_clear_on_disassoc(struct wpa_supplicant *wpa_s);
|
||||||
void sme_deinit(struct wpa_supplicant *wpa_s);
|
void sme_deinit(struct wpa_supplicant *wpa_s);
|
||||||
|
|
||||||
int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
|
int sme_proc_obss_scan(struct wpa_supplicant *wpa_s);
|
||||||
struct wpa_scan_results *scan_res);
|
|
||||||
void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable);
|
void sme_sched_obss_scan(struct wpa_supplicant *wpa_s, int enable);
|
||||||
void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
|
void sme_external_auth_trigger(struct wpa_supplicant *wpa_s,
|
||||||
union wpa_event_data *data);
|
union wpa_event_data *data);
|
||||||
|
@ -113,8 +112,7 @@ static inline void sme_deinit(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s,
|
static inline int sme_proc_obss_scan(struct wpa_supplicant *wpa_s)
|
||||||
struct wpa_scan_results *scan_res)
|
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue