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



On 06/08/2016 05:36 PM, Dan Williams wrote:
On Wed, 2016-06-08 at 16:24 -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.

Oh, I see the fixup for cancel_pending_scan() now :)  That should go in
the last patch.

Yea, a bit sloppy... I'll clean that up too.

Other than that, I'd also remove the debug logging, I think we'll have
enough logging elsewhere (including the pending action remove and the
supplicant state change).  But I'm OK to keep it too.

The extra logging was important for actually catching/verifying that the condition could happen, so after the fact, I'm actually fine with removing it.

/tony





Dan

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

diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-
device-wifi.c
index f6325a6..b147409 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -246,6 +246,13 @@ supplicant_interface_release (NMDeviceWifi
*self)

        priv = NM_DEVICE_WIFI_GET_PRIVATE (self);

+       if (priv->requested_scan) {
+               nm_log_dbg (LOGD_WIFI_SCAN, "(%s): reset
requested_scan flag to FALSE",
+                                       nm_device_get_iface
(NM_DEVICE (self)));
+               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 */
@@ -1915,7 +1922,7 @@ supplicant_iface_state_cb
(NMSupplicantInterface *iface,
                                priv->requested_scan = FALSE;
                        }

-                       cancel_pending_scan (self);
+                       nm_clear_g_source (&priv->pending_scan_id);
                        request_wireless_scan (self, NULL);
                }
        default:



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