Message ID | F781B6216F70FE49AB7B89F25E2F80C0BF1681@HASMSX152.ger.corp.intel.com |
---|---|
State | Changes Requested |
Headers | show |
On Mon, Nov 05, 2012 at 01:53:01PM +0000, Spinadel, David wrote: > This one is buggy. Better way is just to add the > if (!ssid) > wpa_s->prev_sched_ssid = NULL; > Before the return, I think. Any suggestions? I'm not completely sure I've understood what this is trying to do. Anyway, since none of the patches sent so far apply cleanly or have some identified issues and this one here is not clear enough to handle manually, I'm dropping these patches for now. If there is a change needed here, please post a more complete patch and ideally with a comment describing why prev_sched_ssid is cleared.
I'll send these patches again after fixing some technic problems with my network. In this case, It just to avoid a bug: 1. You have < max_sched_scan_ssids networks, and you are starting sched scan. 2. You are adding a new network; the supplicant stops sched scan and starting a new one. 3. Since prev_sched_ssid is assigned, it tries to start sched scan from last scanned network, it scans only for the new one and drops other networks. 4. Since you added only one network, it won't set the timeout and will scan this one network forever. Here I'm cleaning prev_sched_scan after every sched scan that riches the end of the list. In these cases, we don't have a reason to save this network if we already scanned the whole list. David > -----Original Message----- > From: hostap-bounces@lists.shmoo.com [mailto:hostap- > bounces@lists.shmoo.com] On Behalf Of Jouni Malinen > Sent: Thursday, December 27, 2012 10:54 > To: hostap@lists.shmoo.com > Subject: Re: [RFC] wpa_supplicant: set prev_sched_ssid only if needed > > On Mon, Nov 05, 2012 at 01:53:01PM +0000, Spinadel, David wrote: > > This one is buggy. Better way is just to add the if (!ssid) > > wpa_s->prev_sched_ssid = NULL; Before the return, I think. Any > > suggestions? > > I'm not completely sure I've understood what this is trying to do. > Anyway, since none of the patches sent so far apply cleanly or have some > identified issues and this one here is not clear enough to handle manually, > I'm dropping these patches for now. If there is a change needed here, please > post a more complete patch and ideally with a comment describing why > prev_sched_ssid is cleared. > > -- > Jouni Malinen PGP id EFC895FA > _______________________________________________ > HostAP mailing list > HostAP@lists.shmoo.com > http://lists.shmoo.com/mailman/listinfo/hostap --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index df663bc..38af84c 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -880,7 +880,6 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s) wpa_s->sched_scan_timeout = max_sched_scan_ssids * 2; wpa_s->first_sched_scan = 1; ssid = wpa_s->conf->ssid; - wpa_s->prev_sched_ssid = ssid; } if (wildcard) { @@ -929,11 +928,12 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s) (wpas_network_disabled(wpa_s, ssid) || !ssid->scan_ssid)); break; + if (!ssid) + wpa_s->prev_sched_ssid = NULL; } } next: - wpa_s->prev_sched_ssid = ssid; ssid = ssid->next; }