[PATCH] Remove cached scan results earlier in Android

Ola Olsson ola1olsson
Sat Mar 21 04:47:56 PDT 2015

Android has a feature where wifi seems to be off
but the kernel module is still loaded (scanning always enabled).
This enables applications to scan for new SSID:s even when
the wifi components itself does not trigger any scan. Hence,
it might take a while between scan requests.

If a second scan is not made within 180 seconds, no matter how far
you have traveled, the scan result will be the union of
the new scan result and the last scan result. I might actually be able
to travel more than 3km (~2 miles) in this period of time and still
get the same SSID:s as I got in the last result. This is an extreme case
but enough to simplify the problematic situation. There are other real
world scenarios that will happen when RTT is enabled though.

The rationale behind the new value (25) is that I have noticed that a scan
can be made every 10 second by being in the wifi settings menu and
I want to be able to miss an AP one time without having it removed
from the cache. The reason why I did not choose 20 seconds sharp
is because the eloop_register_timeout that triggers
wpa_bss_flush_by_age method is not synced or restarted when the
scan result arrives.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150321/f203e178/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-cached-scan-results-earlier-in-Android.patch
Type: text/x-patch
Size: 2096 bytes
Desc: not available
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20150321/f203e178/attachment.bin>

More information about the Hostap mailing list