[PATCH] Fix scan notification in case of canceling scan

Jouni Malinen j at w1.fi
Mon Apr 11 18:39:44 EDT 2011


On Mon, Apr 11, 2011 at 02:58:42PM -0700, Dmitry Shmidt wrote:
> >From this point of view - no, but here is the problem. You start scan
> (by command, for example)
> and it is not long - about several seconds. Meanwhile wpa_supplicant
> "decides" to associate.
> Command "join" (associate) has usually higher priority than scan for
> wlan driver and it cancels scan.

Wouldn't the driver indicate scan completed/aborted at that point? If
not, the many driver_*.c have a timeout that is used to recover from
unexpected driver behavior.

> So it makes sense to "clean" wpa_s->scanning flag and (maybe) notify
> network manager that scan was canceled.

So this is to address the case where association request is sent during
an ongoing scan? If so, it sounds like it would be useful to get the
scan notification handled somehow. This could be either through the
driver indicating that the scan was stopped (e.g., in case of nl80211
this is done with an NL80211_CMD_SCAN_ABORTED event). Alternatively,
wpa_supplicant could clear the scan notification whenever requesting
association. Either way, I don't think the correct place to do this
would be in wpa_supplicant_cancel_scan() (which should really be called
wpa_supplicant_cancel_scheduled_scan_req() from the view point of what
it is doing).

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list