[PATCH] Add wpa_supplicant_notify_scanning() if scan is canceled

Jouni Malinen j
Wed Mar 10 13:31:58 PST 2010

On Mon, Mar 08, 2010 at 10:16:05AM -0800, Dmitry Shmidt wrote:

> Network manager is issuing scan request through API (it does it periodically
> for different reasons).
> Meanwhile wpa_supplicant is in the "process" of association.
> Driver got scan request and immediately association request.
> Driver FW may (and in our case will) cancel previous scan request.
> Wlan will be associated, BUT wpa_s->scanning will be set to 1 and will be
> left as is.
> Network manager may be confused that it didn't get SCAN_RESULTS and didn't
> get wpa_s->scanning change
> notification.

OK, so this sounds driver specific.. As an example,
cfg80211/mac80211-based drivers would indicate aborted scans with an
nl80211 event. Anyway, the proposed patch does not look correct to me
because wpa_s->scanning was not set to 1 based on the scan request that
is being canceled in wpa_supplicant_cancel_scan(); it was set by an
earlier scan request.

If the driver does not indicate this type of canceling of a pending
scan on association request, wpa_supplicant should probably clear the
scanning state when requesting association instead of the proposed
location in wpa_supplicant_cancel_scan().

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list