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>
This commit is contained in:
parent
bc4d7dfc5a
commit
a8391db7cf
1 changed files with 13 additions and 6 deletions
|
@ -4059,9 +4059,18 @@ static void wpas_event_assoc_reject(struct wpa_supplicant *wpa_s,
|
||||||
union wpa_event_data *data)
|
union wpa_event_data *data)
|
||||||
{
|
{
|
||||||
const u8 *bssid = data->assoc_reject.bssid;
|
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))
|
if (!bssid || is_zero_ether_addr(bssid))
|
||||||
bssid = wpa_s->pending_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)
|
if (data->assoc_reject.bssid)
|
||||||
wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_ASSOC_REJECT
|
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
|
#ifdef CONFIG_MBO
|
||||||
if (data->assoc_reject.status_code ==
|
if (data->assoc_reject.status_code ==
|
||||||
WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
|
WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS &&
|
||||||
wpa_s->current_bss && data->assoc_reject.bssid &&
|
reject_bss && data->assoc_reject.resp_ies) {
|
||||||
data->assoc_reject.resp_ies) {
|
|
||||||
const u8 *rssi_rej;
|
const u8 *rssi_rej;
|
||||||
|
|
||||||
rssi_rej = mbo_get_attr_from_ies(
|
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,
|
wpa_printf(MSG_DEBUG,
|
||||||
"OCE: RSSI-based association rejection from "
|
"OCE: RSSI-based association rejection from "
|
||||||
MACSTR " (Delta RSSI: %u, Retry Delay: %u)",
|
MACSTR " (Delta RSSI: %u, Retry Delay: %u)",
|
||||||
MAC2STR(data->assoc_reject.bssid),
|
MAC2STR(reject_bss->bssid),
|
||||||
rssi_rej[2], rssi_rej[3]);
|
rssi_rej[2], rssi_rej[3]);
|
||||||
wpa_bss_tmp_disallow(wpa_s,
|
wpa_bss_tmp_disallow(wpa_s,
|
||||||
data->assoc_reject.bssid,
|
reject_bss->bssid,
|
||||||
rssi_rej[3],
|
rssi_rej[3],
|
||||||
rssi_rej[2] +
|
rssi_rej[2] + reject_bss->level);
|
||||||
wpa_s->current_bss->level);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_MBO */
|
#endif /* CONFIG_MBO */
|
||||||
|
|
Loading…
Reference in a new issue