Clear previous BSSID on explicit disconnection request
There is no need to use reassociation instead of association in a case the previous connection was explicitly disconnected. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
0e28de0d2b
commit
83df814946
1 changed files with 9 additions and 0 deletions
|
@ -1757,6 +1757,9 @@ static int wpa_supplicant_ctrl_iface_remove_network(
|
||||||
}
|
}
|
||||||
eapol_sm_invalidate_cached_session(wpa_s->eapol);
|
eapol_sm_invalidate_cached_session(wpa_s->eapol);
|
||||||
if (wpa_s->current_ssid) {
|
if (wpa_s->current_ssid) {
|
||||||
|
#ifdef CONFIG_SME
|
||||||
|
wpa_s->sme.prev_bssid_set = 0;
|
||||||
|
#endif /* CONFIG_SME */
|
||||||
wpa_sm_set_config(wpa_s->wpa, NULL);
|
wpa_sm_set_config(wpa_s->wpa, NULL);
|
||||||
eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
|
eapol_sm_notify_config(wpa_s->eapol, NULL, NULL);
|
||||||
wpa_supplicant_disassociate(wpa_s,
|
wpa_supplicant_disassociate(wpa_s,
|
||||||
|
@ -1779,6 +1782,9 @@ static int wpa_supplicant_ctrl_iface_remove_network(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ssid == wpa_s->current_ssid || wpa_s->current_ssid == NULL) {
|
if (ssid == wpa_s->current_ssid || wpa_s->current_ssid == NULL) {
|
||||||
|
#ifdef CONFIG_SME
|
||||||
|
wpa_s->sme.prev_bssid_set = 0;
|
||||||
|
#endif /* CONFIG_SME */
|
||||||
/*
|
/*
|
||||||
* Invalidate the EAP session cache if the current or
|
* Invalidate the EAP session cache if the current or
|
||||||
* previously used network is removed.
|
* previously used network is removed.
|
||||||
|
@ -3938,6 +3944,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||||
reply_len = wpa_supplicant_ctrl_iface_list_networks(
|
reply_len = wpa_supplicant_ctrl_iface_list_networks(
|
||||||
wpa_s, reply, reply_size);
|
wpa_s, reply, reply_size);
|
||||||
} else if (os_strcmp(buf, "DISCONNECT") == 0) {
|
} else if (os_strcmp(buf, "DISCONNECT") == 0) {
|
||||||
|
#ifdef CONFIG_SME
|
||||||
|
wpa_s->sme.prev_bssid_set = 0;
|
||||||
|
#endif /* CONFIG_SME */
|
||||||
wpa_s->reassociate = 0;
|
wpa_s->reassociate = 0;
|
||||||
wpa_s->disconnected = 1;
|
wpa_s->disconnected = 1;
|
||||||
wpa_supplicant_cancel_sched_scan(wpa_s);
|
wpa_supplicant_cancel_sched_scan(wpa_s);
|
||||||
|
|
Loading…
Reference in a new issue