Skip to content

Commit 80d1d23

Browse files
committed
modules: hostap: fix wifi roaming aborted in few cases
Add guard of supplicant state condition. Not send neighbor request in auth procedures. Signed-off-by: Fengming Ye <[email protected]>
1 parent 1f69b91 commit 80d1d23

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/hostap/src/supp_api.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,25 @@ int supplicant_11k_cfg(const struct device *dev, struct wifi_11k_params *params)
15281528

15291529
int supplicant_11k_neighbor_request(const struct device *dev, struct wifi_11k_params *params)
15301530
{
1531+
struct wpa_supplicant *wpa_s;
15311532
int ssid_len;
15321533

15331534
if (params == NULL) {
15341535
return -1;
15351536
}
15361537

1538+
wpa_s = get_wpa_s_handle(dev);
1539+
if (!wpa_s) {
1540+
wpa_printf(MSG_ERROR, "Device %s not found", dev->name);
1541+
return -1;
1542+
}
1543+
1544+
if (wpa_s->reassociate || (wpa_s->wpa_state >= WPA_AUTHENTICATING &&
1545+
wpa_s->wpa_state < WPA_COMPLETED)) {
1546+
wpa_printf(MSG_INFO, "Reassociation is in progress, skip");
1547+
return 0;
1548+
}
1549+
15371550
ssid_len = strlen(params->ssid);
15381551

15391552
if (ssid_len > 0) {

0 commit comments

Comments
 (0)