commit | cb3ecf321c52de1e72cdf037a459cd893b7c51db | [log] [tgz] |
---|---|---|
author | Samuel Tan <samueltan@chromium.org> | Fri Oct 24 17:30:31 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Sun Oct 26 23:47:19 2014 +0000 |
tree | 497501746b2b6414cfafaee5550c7c5e2352f894 | |
parent | da8cbeef4735df05dd3a9a069c6ecccf37803e60 [diff] |
shill: allow wake on SSID and packet to be enabled/disabled Add and use flag that will allow wake on WiFi features (i.e. wake on packet and wake on SSID) to be individually enabled and disabled. This flag can be get or set via the Manager DBus API. The wake on SSID feature currently only enables wake on disconnect. Wake on SSID is currently enabled by default on boards that support wake on WiFi. On all other boards, wake on WiFi features are disabled by default. Also: - Modify wake_on_wifi.cc check this flag to determine which wake on WiFi features to enable before suspend. - Modify wake_on_wifi_unittest.cc to work with the new flag checks and to check if the flag correctly affects program behavior. CQ-DEPEND=CL:225484 BUG=chromium:426978 TEST=Compile and run unit tests using the following commands: 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 on samus as follows: 1) Build a test image for samus 2) Connect samus to an AP. Ensure that ethernet is not connected (i.e. only use WiFi). 3) Run the following command: dbus-send --system --print-reply --dest=org.chromium.flimflam \ / org.chromium.flimflam.Manager.AddWakeOnPacketConnection \ string:"1.2.3.4" 4) Verify that the following error is received in response to the dbus-send command: "Wake on Packet feature disabled, so do nothing" 5) Suspend the samus using the following command: powerd_dbus_suspend 6) Disable or turn off the AP. 7) Verify that the samus wakes upon disconnecting from the AP. 8) Run the following command: dbus-send --system --print-reply --dest=org.chromium.flimflam \ / org.chromium.flimflam.Manager.SetProperty \ string:WakeOnWiFiEnabled string:none 9) Re-enable or turn on the AP again and connect the samus to it. 10) Repeat steps 5-6 and verify that the samus does not wake up upon disconnecting from the AP. Change-Id: I8e00b48de743cdd5511fe483ddebc3814323388e Reviewed-on: https://chromium-review.googlesource.com/225515 Tested-by: Samuel Tan <samueltan@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Samuel Tan <samueltan@chromium.org>