Re: [PATCH 04/18] sched_scan: Restart pno/sched_scan on channel list update

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

 



On Mon, Sep 05, 2016 at 05:32:57PM +0300, andrei.otcheretianski@xxxxxxxxx wrote:
> As the scan channels might need to change when the channel list has
> been updated by the kernel.

> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -3223,14 +3223,22 @@ static void wpa_supplicant_update_channel_list(
>  		free_hw_features(ifs);
>  		ifs->hw.modes = wpa_drv_get_hw_feature_data(
>  			ifs, &ifs->hw.num_modes, &ifs->hw.flags);
> -	}
>  
> -	/* Restart sched_scan with updated channel list */
> -	if (wpa_s->sched_scanning) {
> -		wpa_dbg(wpa_s, MSG_DEBUG,
> -			"Channel list changed restart sched scan.");
> -		wpa_supplicant_cancel_sched_scan(wpa_s);
> -		wpa_supplicant_req_scan(wpa_s, 0, 0);
> +		/* Restart pno/sched_scan with updated channel list */
> +		if (ifs->pno) {
> +			wpas_stop_pno(ifs);
> +			wpas_start_pno(ifs);
> +		} else if (ifs->sched_scanning && !ifs->pno_sched_pending) {

OK.. So this part looks straightforward..

> +			/*
> +			 * simulate a timeout to restart it. reset the state
> +			 * to start from the beginning.
> +			 */
> +			wpa_dbg(ifs, MSG_DEBUG,
> +				"Channel list changed restart sched scan.");
> +			ifs->sched_scan_timed_out = 1;
> +			wpa_s->prev_sched_ssid = NULL;
> +			wpa_supplicant_cancel_sched_scan(ifs);

While this does something else than the previous code. Could you please
clarify why this uses a simulated timeout to restart sched_scan?

And is that "wpa_s->prev_sched_ssid = NULL" really supposed to use wpa_s
instead of ifs? I'd assume this was a missed change from moving to be
within the dl_list_for_each loop with ifs being the pointer to the
specific interface while wpa_s is pointing to the interface that
received the channel list update event.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux