On Wed, 2016-06-08 at 16:24 -0400, Tony Espy wrote:
> It's possible for wpa_supplicant to transition to INACTIVE
> state 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-goes-INACTIVE.patch
> ---
>  src/devices/wifi/nm-device-wifi.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-
> device-wifi.c
> index bacd5e6..f6325a6 100644
> --- a/src/devices/wifi/nm-device-wifi.c
> +++ b/src/devices/wifi/nm-device-wifi.c
> @@ -1903,6 +1903,21 @@ 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:
> 

I'd say we make this simpler; if the supplicant enters inactive state
that usually means either RFKILL or no enabled networks.  So we can
just do all this unconditionally:

    priv->requested_scan = FALSE;
    nm_clear_g_source (&priv->pending_scan_id);
    request_wireless_scan (self, NULL);

Do you think that would work?

Also it looks like these patches are against 0.9.10;
cancel_pending_scan() got removed and we just use the
nm_clear_g_source(..) now.

Dan


> +             if (old_state ==
> NM_SUPPLICANT_INTERFACE_STATE_SCANNING) {
> +                     nm_log_warn (LOGD_HW | LOGD_WIFI, "(%s):
> supplicant state: SCANNING -> INACTIVE",
> +                                              nm_device_get_iface
> (NM_DEVICE (self)));
> +
> +                     if (priv->requested_scan) {
> +                             nm_log_dbg (LOGD_WIFI_SCAN, "(%s):
> clearing requested_scan",
> +                                                     nm_device_ge
> t_iface (NM_DEVICE (self)));
> +
> +                             priv->requested_scan = FALSE;
> +                     }
> +
> +                     cancel_pending_scan (self);
> +                     request_wireless_scan (self, NULL);
> +             }
>       default:
>               break;
>       }
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to