aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorAnkita Bajaj <bankita@codeaurora.org>2019-05-22 06:59:45 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-31 13:52:10 (GMT)
commita8391db7cfce796bea2acf6e64aad5c314da31b0 (patch)
tree43ca61f00251e3231f1c3c73060d6f89d91dc75a /wpa_supplicant/events.c
parentbc4d7dfc5a8992d83dcf074b25eccd7ec2ace89f (diff)
downloadhostap-a8391db7cfce796bea2acf6e64aad5c314da31b0.zip
hostap-a8391db7cfce796bea2acf6e64aad5c314da31b0.tar.gz
hostap-a8391db7cfce796bea2acf6e64aad5c314da31b0.tar.bz2
OCE: Use RSSI of actual BSS which rejected association
If an AP rejects association due to low RSSI, then RSSI of the BSS from which association reject is received shall be used for calculating RSSI threshold at which STA can try connecting back to that BSS later. In case of SME offload, the current_bss might not have been set before receiving association completion, so fetch the BSS entry based on the BSSID provided in the driver event. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index cab0a6d..ae2fc63 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -4059,9 +4059,18 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
{
const u8 *bssid = data->assoc_reject.bssid;
+#ifdef CONFIG_MBO
+ struct wpa_bss *reject_bss;
+#endif /* CONFIG_MBO */
if (!bssid || is_zero_ether_addr(bssid))
bssid = wpa_s->pending_bssid;
+#ifdef CONFIG_MBO
+ if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
+ reject_bss = wpa_s->current_bss;
+ else
+ reject_bss = wpa_bss_get_bssid(wpa_s, bssid);
+#endif /* CONFIG_MBO */
if (data->assoc_reject.bssid)
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT
@@ -4112,8 +4121,7 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_MBO
if (data->assoc_reject.status_code ==
WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
- wpa_s->current_bss && data->assoc_reject.bssid &&
- data->assoc_reject.resp_ies) {
+ reject_bss && data->assoc_reject.resp_ies) {
const u8 *rssi_rej;
rssi_rej = mbo_get_attr_from_ies(
@@ -4124,13 +4132,12 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG,
"OCE: RSSI-based association rejection from "
MACSTR " (Delta RSSI: %u, Retry Delay: %u)",
- MAC2STR(data->assoc_reject.bssid),
+ MAC2STR(reject_bss->bssid),
rssi_rej[2], rssi_rej[3]);
wpa_bss_tmp_disallow(wpa_s,
- data->assoc_reject.bssid,
+ reject_bss->bssid,
rssi_rej[3],
- rssi_rej[2] +
- wpa_s->current_bss->level);
+ rssi_rej[2] + reject_bss->level);
}
}
#endif /* CONFIG_MBO */