]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Put upper bound on initial scan time delay
authorBen Greear <greearb@candelatech.com>
Thu, 6 Mar 2014 00:19:49 +0000 (16:19 -0800)
committerJouni Malinen <j@w1.fi>
Tue, 11 Mar 2014 17:23:17 +0000 (19:23 +0200)
This makes stations associate much faster when using lots of stations.
In addition, this avoids delaying the initial scan continuously for
dynamic interface removal/addition cases.

Signed-hostap: Ben Greear <greearb@candelatech.com>

wpa_supplicant/wpa_supplicant.c

index 561099cb9ad468c32af2d482e6ff7b410531c356..6a04e5acc49143f9a670bc5bc70db419bf2e5418 100644 (file)
@@ -2687,9 +2687,10 @@ int wpa_supplicant_driver_init(struct wpa_supplicant *wpa_s)
                        interface_count = 0;
                }
                if (!wpa_s->p2p_mgmt &&
-                   wpa_supplicant_delayed_sched_scan(wpa_s, interface_count,
+                   wpa_supplicant_delayed_sched_scan(wpa_s,
+                                                     interface_count % 3,
                                                      100000))
-                       wpa_supplicant_req_scan(wpa_s, interface_count,
+                       wpa_supplicant_req_scan(wpa_s, interface_count % 3,
                                                100000);
                interface_count++;
        } else