Prevent unintended roaming re-enablement after connection state
changes, even when user configuration disables it.
If user disables roaming, but after each state change post-connection,
wpa_supplicant re-enables roaming when bssid_set is false. This migh
cause the driver to send a roam enable configuration to the firmware,
overriding the user's intent.
Fix this by ensuring wpa_supplicant logic to check both bssid_set and
the user’s roaming configuration (`SET roaming`) after each connection
state change. Ensure roaming is only re-enabled if explicitly
configured, allowing the driver to maintain the intended roaming state
throughout the connection.
Fixes: e0935844724a ("STA: Update driver roaming policy on connection completion")
Signed-off-by: Shubham Joshi <shujosh@qti.qualcomm.com>
} else if (os_strcasecmp(cmd, "ric_ies") == 0) {
ret = wpas_ctrl_iface_set_ric_ies(wpa_s, value);
} else if (os_strcasecmp(cmd, "roaming") == 0) {
+ wpa_s->sta_roaming_disabled = atoi(value) ? false : true;
ret = wpa_drv_roaming(wpa_s, atoi(value), NULL);
#ifdef CONFIG_WNM
} else if (os_strcasecmp(cmd, "coloc_intf_elems") == 0) {
if (new_state == WPA_COMPLETED) {
wpas_p2p_notif_connected(wpa_s);
- if (ssid)
+ if (ssid && !wpa_s->sta_roaming_disabled)
wpa_drv_roaming(wpa_s, !ssid->bssid_set,
ssid->bssid_set ? ssid->bssid : NULL);
} else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED) {
} links[MAX_NUM_MLD_LINKS];
u8 *last_con_fail_realm;
size_t last_con_fail_realm_len;
+ bool sta_roaming_disabled;
/* Selected configuration (based on Beacon/ProbeResp WPA IE) */
int pairwise_cipher;