Skip to content

Fix/wifi 11k roaming fail #93570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions modules/hostap/src/supp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1528,13 +1528,26 @@ int supplicant_11k_cfg(const struct device *dev, struct wifi_11k_params *params)

int supplicant_11k_neighbor_request(const struct device *dev, struct wifi_11k_params *params)
{
struct wpa_supplicant *wpa_s;
int ssid_len;

if (params == NULL) {
wpa_s = get_wpa_s_handle(dev);
if (!wpa_s) {
wpa_printf(MSG_ERROR, "Device %s not found", dev->name);
return -1;
}

ssid_len = strlen(params->ssid);
if (wpa_s->reassociate || (wpa_s->wpa_state >= WPA_AUTHENTICATING &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just do below?

if (wpa_s->wpa_stats != WPA_COMPLETED) {
 return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just copy same guard as supplicant_11r_roaming here.
I don't want to block more roaming actions than which during auth, in case some of them are expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but this is 11k, which AFAIK is sent only after connection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most cases yes. But can we send 11k while WPA_SCANNING? I'm not sure. So I just copy 11r roaming entry condition here.

wpa_s->wpa_state < WPA_COMPLETED)) {
wpa_printf(MSG_INFO, "Reassociation is in progress, skip");
return 0;
}

if (params) {
ssid_len = strlen(params->ssid);
} else {
ssid_len = 0;
}

if (ssid_len > 0) {
if (ssid_len > WIFI_SSID_MAX_LEN) {
Expand Down
1 change: 0 additions & 1 deletion subsys/net/l2/wifi/wifi_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ static int wifi_connect(uint64_t mgmt_request, struct net_if *iface,
}

#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
memset(&roaming_params, 0x0, sizeof(roaming_params));
roaming_params.is_11r_used = params->ft_used;
#endif

Expand Down