wifi: fix stalls in scanning

https://mail.gnome.org/archives/networkmanager-list/2016-June/msg00055.html
This commit is contained in:
Thomas Haller 2016-06-25 10:33:24 +02:00
commit 8e07ea351d

View file

@ -247,6 +247,11 @@ supplicant_interface_release (NMDeviceWifi *self)
priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
if (priv->requested_scan) {
priv->requested_scan = FALSE;
nm_device_remove_pending_action (NM_DEVICE (self), "scan", TRUE);
}
nm_clear_g_source (&priv->pending_scan_id);
/* Reset the scan interval to be pretty frequent when disconnected */
@ -1954,6 +1959,11 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface,
else
_LOGI (LOGD_DEVICE | LOGD_WIFI, "supplicant interface keeps failing, giving up");
break;
case NM_SUPPLICANT_INTERFACE_STATE_INACTIVE:
priv->requested_scan = FALSE;
nm_clear_g_source (&priv->pending_scan_id);
request_wireless_scan (self, NULL);
break;
default:
break;
}