scan: Reset normal scan counter when a connection succeeds
authorLuciano Coelho <luciano.coelho@intel.com>
Thu, 24 Apr 2014 05:45:36 +0000 (08:45 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 24 Apr 2014 09:15:32 +0000 (12:15 +0300)
commit0cf24fdaed7cc0a1abdf83f3744e7fb9db0d83c3
tree6bda39e3b9b9b019013f9da3efd0bac49330e348
parentdcdce14741c613f64b0d94810c20961d134baa8b
scan: Reset normal scan counter when a connection succeeds

The normal scan counter is used to trigger a few normal scans before a
scheduled scan is issued. The reason for doing this is that we get
results faster and some drivers support more SSIDs per normal scan
than during sched scan. After 2 normal scans, we start using
sched_scan. But the problem is that when a connection succeeds, we do
not reset this counter, so we will keep using sched scans.

To fix this, now we reset the counter when we switch to WPA_COMPLETED
state.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
wpa_supplicant/wpa_supplicant.c