shill: retry frequency-specific passive scans in dark resume
Retry frequency-specific passive scans launched in dark resume up to
5 times since we may fail to receive AP beacons on some passive scans. This
will improve the reliability of frequency-specific passive scans in dark
resume.
Also, change log messages on suspend, dark resume, and full resume functions
in WiFi so that the WiFi device's connectivity status is logged by default
on these events.
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: Ic2e4096a7cfabec2c16fc2d27bd114372ab8795b
Reviewed-on: https://chromium-review.googlesource.com/261337
Tested-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
7 files changed