Re: Flush scan list on resume

On Tue, 2009-02-03 at 22:38 -0800, Howard Chu wrote:
> I haven't gone looking for this in the code yet, does NM get a DBUS event on 
> standby/suspend and/or resume? It would be nice if it would flush its AP list 
> at (one of) these points. I frequently set my laptop to sleep before going 
> elsewhere; when I wake up its scan list shows all the APs in the new location 
> but it also still shows the AP I was last associated with (even though it's 
> not in the present location) and tries (fruitlessly) to reassociate with it. 
> It should just forget the old info and only use the new scan results.

It does flush the scan list [1].  I looked into this a long time ago
(should probably do so again), and the actual problem wasn't in NM, but
in the supplicant or the driver, which had results left over from before
the suspend.  NM got those results when requesting the latest results
from the supplicant.  That's not to say that we can't do something fun
with "last_beacon" IE of the results, if we can get that from the


[1] the "sleep" call sets the device state to UNMANAGED, which ends up
in nm-device-wifi.c:device_state_changed(), which tells wpa_supplicant
to forget about this wifi interface, then at the bottom calls
nm-device-wifi.c:remove_all_aps().  This clears the device's scan list.
APs also get cleared when the device enters UNAVAILABLE state, which is
does on wake before it's started talking to the supplicant yet.

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