mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-14 11:58:08 +02:00
wifi: don't fail first scan after supplicant interface is ready
If the supplicant interface became ready but the device was still UNAVAILABLE, requesting a scan before transitioning to DISCONNECTED would just fail because can_scan() returns FALSE when the device's state is not >= DISCONNECTED. Change device state first so that doesn't happen.
This commit is contained in:
parent
b94510e3b3
commit
92db663514
1 changed files with 4 additions and 4 deletions
|
|
@ -2245,10 +2245,6 @@ supplicant_iface_state_cb_handler (gpointer user_data)
|
|||
if (task->new_state == NM_SUPPLICANT_INTERFACE_STATE_READY) {
|
||||
priv->scan_interval = SCAN_INTERVAL_MIN;
|
||||
|
||||
/* Request a scan to get latest results */
|
||||
cancel_pending_scan (self);
|
||||
request_wireless_scan (self);
|
||||
|
||||
/* If the interface can now be activated because the supplicant is now
|
||||
* available, transition to DISCONNECTED.
|
||||
*/
|
||||
|
|
@ -2257,6 +2253,10 @@ supplicant_iface_state_cb_handler (gpointer user_data)
|
|||
nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED,
|
||||
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE);
|
||||
}
|
||||
|
||||
/* Request a scan to get latest results */
|
||||
cancel_pending_scan (self);
|
||||
request_wireless_scan (self);
|
||||
} else if (task->new_state == NM_SUPPLICANT_INTERFACE_STATE_DOWN) {
|
||||
cleanup_association_attempt (self, FALSE);
|
||||
supplicant_interface_release (self);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue