shill: only scan on select channels when waking on SSID
When we wake on SSID and have SSID match results, instead of launching a passive
scan on all channels, passive scan only on channels where SSID matches were
reported to have occured in. This should reduce scan time, thus decreasing the
amount of time required to scan and connect to a network in dark resume when
wake on SSID occurs.
Also, change wake on WiFi throttling log message slightly to reflect that
the feature is temporarily, not permanantly, disabled.
BUG=chrome-os-partner:32269, chrome-os-partner:36471
TEST=Compile shill and run unit tests using:
P2_TEST_FILTER="shill::*" FEATURES="test" \
USE="wake_on_wifi clang asan" emerge-samus shill
P2_TEST_FILTER="shill::*" FEATURES="test" \
USE="-wake_on_wifi clang asan" emerge-samus shill
Manual testing as follows:
1) Flash a samus with test image and boot into it.
2) Run
ff_debug +wifi; ff_debug --level -3
3) Run
echo 0 > /var/lib/power_manager/disable_dark_resume; restart \
powerd
4) Enable the wake on WiFi SSID feature with the following command:
dbus-send --system --print-reply --dest=org.chromium.flimflam \
/device/wlan0 org.chromium.flimflam.Device.SetProperty \
string:WakeOnWiFiFeaturesEnabled \
variant:string:packet_and_ssid
5) Set the net detect scan period to 30 seconds with the
following command:
dbus-send --system --print-reply --dest=org.chromium.flimflam \
/device/wlan0 org.chromium.flimflam.Device.SetProperty \
string:NetDetectScanPeriodSeconds variant:uint32:30
6) Connect samus to an AP (make sure AP is one that you can run ping from).
7) Run 'powerd_dbus_suspend' to suspend the system.
8) Wait 10 seconds, then disable the AP.
9) Wait 15 seconds, then re-enable the AP.
10) Wait, 80 seconds, then wake the samus by pressing any key.
11) Immediately upon waking the system, verify that the WiFi status icon is
in the connected state.
12) Run
grep 'BeforeSuspendActions.*connected' /var/log/net.log | tail -1
and verify that the line printed says "BeforeSuspendActions: connected".
Change-Id: Icef9d30a6ed239c9dd7af4b6c8ac42dd2269c5f7
Reviewed-on: https://chromium-review.googlesource.com/250550
Tested-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
7 files changed