Re: [PATCH v2 2/2] Clear WiFi requested_scan if suppl exits



On Thu, 2016-06-16 at 15:07 -0400, Tony Espy wrote:
It's possible for wpa_supplicant to exit with an
outstanding requested_scan pending.  This can lead
to a stall condition where scanning no longer occurs.

Gbp-Pq: Name Clear-WiFi-requested_scan-if-suppl-exits.patch
---
 src/devices/wifi/nm-device-wifi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-
device-wifi.c
index 053bc07..17372a8 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -246,6 +246,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 */

LGTM

Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]