[PATCH] Fix scanning state when sched_scan is stopped explicitly

Jouni Malinen j
Fri Apr 11 09:09:07 PDT 2014


On Wed, Apr 09, 2014 at 03:48:07PM -0700, Dmitry Shmidt wrote:
> --- a/wpa_supplicant/scan.c
> +++ b/wpa_supplicant/scan.c
> @@ -261,6 +261,9 @@ int wpa_supplicant_stop_sched_scan(struct wpa_supplicant *wpa_s)
>  		wpa_dbg(wpa_s, MSG_DEBUG, "stopping sched_scan failed!");
>  		/* TODO: what to do if stopping fails? */
>  		return -1;
> +	} else {
> +		wpa_s->sched_scanning = 0;
> +		wpa_supplicant_notify_scanning(wpa_s, 0);
>  	}

It looks like the current implementation assumes that there will be a
driver event to indicate that sched_scan was stopped and
wpa_s->sched_scanning is cleared to 0 when that event is processed. Is
there a driver that does not end up indicating that event?

I would assume there was a reason for postponing, but then again, I now
remember that there were open questions on a related area.. I think
there was a request to revert commit
cf70d2981df1be7005fb90c2532e737ab39bc119 and handle some of the changes
in mac80211 to make operations synchronous. I guess we should get open
item resolved as well.. I'm not completely sure whether these two
changes have any dependencies to each other, though.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list