From: Purushottam Kushwaha Date: Fri, 23 Aug 2024 13:23:08 +0000 (+0530) Subject: STA: Update driver roaming policy on connection completion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0935844724a8a5e03fe2a4f9dcaab5b962ea7eb;p=thirdparty%2Fhostap.git STA: Update driver roaming policy on connection completion When the network profile is configured with BSSID before connection, roaming policy in the driver (for driver-based BSS selection) doesn't get updated if the same BSSID is configured after connection. Update roaming policy to the driver on connection completion to cover this case. Signed-off-by: Purushottam Kushwaha --- diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 22b75d46b..24812ffbb 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -88,6 +88,8 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s, enum wpa_states new_state, enum wpa_states old_state) { + struct wpa_ssid *ssid = wpa_s->current_ssid; + if (wpa_s->p2p_mgmt) return; @@ -104,10 +106,14 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s, } #endif /* CONFIG_FST */ - if (new_state == WPA_COMPLETED) + if (new_state == WPA_COMPLETED) { wpas_p2p_notif_connected(wpa_s); - else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED) + if (ssid) + wpa_drv_roaming(wpa_s, !ssid->bssid_set, + ssid->bssid_set ? ssid->bssid : NULL); + } else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED) { wpas_p2p_notif_disconnected(wpa_s); + } sme_state_changed(wpa_s);