From: Jouni Malinen Date: Fri, 11 Jun 2010 18:15:16 +0000 (-0700) Subject: Fix scan_runs counting X-Git-Tag: hostap-1-bp~1280 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d902a9c1bcee67e2f2df2f0b80c85c10e8bd865d;p=thirdparty%2Fhostap.git Fix scan_runs counting Addition of the background scanning mechanism in commit 60b94c9819199c0427e623080ebae27fe44be6b5 moved the scan trigger into a new function that was also incrementing the scan_runs counter, but the removal of the previous scan_runs incrementation was forgotten from that patch. This counter should only be updated into a single location, so remove the old one. This improves AP selection for WPS provisioning by not skipping some of the initial scans. --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index efbc3478e..fd01bb8fa 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -431,8 +431,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx) if (prev_state != wpa_s->wpa_state) wpa_supplicant_set_state(wpa_s, prev_state); wpa_supplicant_req_scan(wpa_s, 1, 0); - } else - wpa_s->scan_runs++; + } }