History log of /system/connectivity/shill/wifi/wifi_provider.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a62e235646ec19bee71e8dbee5208282dcd13b5 20-Jan-2016 Alex Vakulenko <avakulenko@google.com> shill: Update libchrome APIs to r369476

The new libchrome has been ported from Chromium and some APIs have
changed. Make necessary changes at call sites.

Change-Id: Ib4c4b5438a2e249777c9c1b6509f085ad5d00049
/system/connectivity/shill/wifi/wifi_provider.cc
c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 03-Sep-2015 Peter Qiu <zqiu@google.com> License shill to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi, the NOTICE was added with a copy
of the Apache2 license and MODULE_LICENSE_* file was added.

BUG=23587594
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/wifi/wifi_provider.cc
2b363903f38a515001c5edc7202403fcddb15a01 16-Jun-2015 Paul Stewart <pstew@chromium.org> shill: wifi: Switch pointer/ref spacing

Switch to Chrome style spacing.

BUG=chromium:501026
TEST=Unit tests

Change-Id: Ieff88b00706ed7c57049531a21427d9ea84b0a71
Reviewed-on: https://chromium-review.googlesource.com/278081
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
ccab3f9f460312262f6153db8246b100d1362ba8 15-Jun-2015 Alex Vakulenko <avakulenko@chromium.org> platform2: Fix issues with new version of libchrome

libchrome r334380 has the following breaking changes that need to be fixed:
- base::JSONWriter::Write() and base::JSONWriter::WriteWithOptions() take
"const base::Value&" instead of "const base::Value*"
- base::JSONReader::Read() and base::JSONReader::ReadAndReturnError()
return a scoped_ptr<base::Value> instead of base::Value*
- base/safe_strerror_posix.h is moved to base/posix/safe_strerror.h
- safe_strerror() is now in "base" namespace
- StartsWithASCII(), EndsWith(), StringToUpperASCII(), LowerCaseEqualsASCII()
are now in "base" namespace
- ObserverList<T> is now in "base" namespace
- base::PrintTo(base::FilePath) used in gtest is now moved to libchrome-test
library and as such, unit test runners need to link to this library now.
- crypto::RSAPrivateKey::CreateSensitive() is now removed from //crypto, so
some of tests in chromeos-login that used that function had to be changed
to use crypto::GenerateRSAKeyPairNSS() directly.
- UnixDomanSocket class is now in "base" namespace
- Pickle class is now in "base" namespace

BUG=chromium:496469
TEST=`./build_packages`
CQ-DEPEND=CL:277662

Change-Id: I36e5fbf2e36a92068873ffbd44020c862a3ed9e3
Reviewed-on: https://chromium-review.googlesource.com/277671
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
18213652e2ce4c6e4354951e5b665097b7a7aa6b 22-Apr-2015 Peter Qiu <zqiu@chromium.org> shill: remove dependency for ProfileDBusPropertyExporter

Currently, Profile.GetEntry uses ProfileDBusPropertyExporter to
retrieve entry settings for a service entry that's not registered to the
manager or loaded from a different profile. ProfileDBusPropertyExporter
duplicates logics from Service and its subclasses for loading settings
from the profile.

Instead, create a temporary service for profile to load entry settings
into for such service entry, and then retrieve the service settings
(properties) directly. When creating a temporary service, the profile entry
will be validated for fields required by the corresponding service type.

Also added couple test scripts for testing purpose.

BUG=chromium:208736
TEST=USE="asan clang wimax" FEATURES=test emerge-$BOARD shill
Manual Test:
1. Bootup a DUT (wolf) without logging in, connect to a wifi network
WiFi-A.
2. Logged in with an user account, connect to a different managed wifi
network WiFi-B.
3. Invoke command "/usr/local/lib/flimflam/test/list-profiles", verify
there is an entry in both default profile "/profile/default" and
user profile "/profile/chronos/shill".
3. Use the get-profile-entry command to retrieve entry from both default
and user profile, verify entries are retrieved successfully.
"/usr/local/lib/flimflam/test/get-profile-entry default <entry_name>"
"/usr/local/lib/flimflam/test/get-profile-entry shill <entry_name>"

Change-Id: If6c22fbca0e4e47dd42761b047d57fff14c2e658
Reviewed-on: https://chromium-review.googlesource.com/266751
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
d70ecdf36c94516b71cca8212caeb71da8c63d02 12-Jan-2015 Samuel Tan <samueltan@chromium.org> shill: configure NIC to wake on SSID

Enable shill to program the NIC to wake the system
from suspend on the appearance of whitelisted SSIDs.

BUG=chrome-os-partner:32269
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) Run
echo disabled > /sys/bus/i2c/devices/i2c-ATML0000\:01/power/wakeup
5) 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:ssid
6) Set the net detect scan period to 60 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:60
7) Connect samus to an AP.
8) Disable the AP. Verify that the samus is fully disconnected by the
WiFi icon state (a cross over empty WiFi bars).
9) Run 'powerd_dbus_suspend' to suspend the system.
10) 10 seconds after step 9, re-enable the AP.
11) Wait 120 seconds (start counting right after performing step 9).
12) Wake the samus by pressing any key.
13) Verify that the samus is connected to WiFi immediately after waking
by ensuring that it wakes up with the WiFi icon in the connected
state.

Change-Id: Ibfe5fa810770c0faa292c1f9fe423e3ee61668cf
Reviewed-on: https://chromium-review.googlesource.com/240579
Reviewed-by: Samuel Tan <samueltan@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
34f424e672439bdf237a755f85245ebd7b66e8e2 17-Jan-2015 Paul Stewart <pstew@chromium.org> shill: Error: Attribute source from PopulateAndLog

Have callers pass the source file/line of PopulateAndLog calls so
the log message can disambiguate the ultimate source of the error.

BUG=chromium:449528
TEST=Unit tests + manual: restart shill and "grep error.cc /var/log/net.log"

Change-Id: I7bb54e966b047025a3ec7ef18acce5b8bed3d031
Reviewed-on: https://chromium-review.googlesource.com/241522
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
402bf2959e8b2c68627a7b66203ec84760bf2e03 23-Dec-2014 Samuel Tan <samueltan@chromium.org> shill: report done early in dark resume after scan

Report done early in dark resume after scanning for networks if
we do not find any networks that are available for auto-connect.

Also:
- rename the |have_service_configured_for_autoconnect| to
|has_service_configured_for_autoconnect| to match the
naming of the corresponding function in WiFiProvider.

BUG=chromium:444652
TEST=Compile shill 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 as follows:
1) Boot into a samus test image.
2) Run 'ff_debug +wifi; ff_debug --level -3'
3) Run 'echo 0 > /var/lib/power_manager/disable_dark_resume; restart \
powerd'
4) Enable all wake on WiFi features 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 wake-to-scan frequency to 60 seconds with the
following command:
dbus-send --system --print-reply --dest=org.chromium.flimflam \
/device/wlan0 org.chromium.flimflam.Device.SetProperty \
string:WakeToScanFrequency variant:uint32:60
6) To work around a trackpad wakeup bug, disable trackpad wakeup using
the following command:
echo disabled > /sys/bus/i2c/devices/i2c-ATML0000\:01/power/wakeup
7) Connect samus to an AP.
8) Disable the AP. Verify that the samus is fully disconnected by the WiFi
icon state (a cross over empty WiFi bars).
9) Run 'powerd_dbus_suspend' to suspend the system.
10) Wait ~60 seconds and verify that the samus wakes on dark resume
by observing that light bar turns on while the screen is off.
11) Verify that the samus exits dark resume and suspends again after ~5 seconds
by observing that the lightbar turns off ~5 seconds after turning on.
12) Repeat steps 10-11 one more time.
13) Re-enable the AP immediately after the last dark resume cycle finishes
(i.e. right after light bar turns off).
14) Wait ~60 seconds for the next dark resume cycle to begin.
15) Verify that this dark resume cycle lasts for at least 2-3 more seconds than
the previous dark resume cycles observed in steps 10-12.
16) Wake the samus by pressing any key.
17) Verify that the samus is connected by verifying that the WiFi icon in the
bottom right corner is solid and filled (i.e. not crossed out or animating).

Note: these instructions assume that the AP can be fully re-enabled in
60 seconds, and that the DUT can scan and connect to this AP within 8.5 seconds.
The D-Link DGL-5500 is an example of such an AP that is appropriate for
this test.

Change-Id: I8a3c00e49dacf9e8580e24f9a0d84efb9e28b99c
Reviewed-on: https://chromium-review.googlesource.com/237494
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
c420dd27964a85c8dec8f09d9049287ccba5f95a 15-Dec-2014 Samuel Tan <samueltan@chromium.org> shill: check for auto-connectable service before starting wake to scan timer

Check whether shill has any services configured for auto-connect before
starting a wake to scan timer when suspending in a disconnected state
(when wake on SSID is supported and enabled).

BUG=chromium:441502
TEST=Compile shill 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 as follows:
1) Boot into a samus test image.
2) Run 'ff_debug +wifi; ff_debug --level -3'
3) Run 'echo 0 > /var/lib/power_manager/disable_dark_resume; restart \
powerd'
4) Enable all wake on WiFi features 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 wake-to-scan frequency to 15 seconds with the
following command:
dbus-send --system --print-reply --dest=org.chromium.flimflam \
/device/wlan0 org.chromium.flimflam.Device.SetProperty \
string:WakeToScanFrequency variant:uint32:15
6) Connect samus to an AP.
7) Disable the AP. Verify that the samus is fully disconnected by the WiFi
icon state (a cross over empty WiFi bars).
8) Run 'powerd_dbus_suspend' to suspend the system.
9) Wait ~15 seconds and verify that the samus wakes on dark resume
by observing that light bar turns on while the screen is off.
10) Wake the samus by pressing any key.
11) Open Settings UI, select the WiFi service the samus is currently
connected to, and uncheck the "Automatically connect to this
network" checkbox.
12) Repeat step 8.
13) Wait ~15 seconds and verify that the samus does not wake up in
dark resume.

Change-Id: I1c5fe8196cbb9f3d1c7a6f509e14460611854a32
Reviewed-on: https://chromium-review.googlesource.com/235816
Reviewed-by: Samuel Tan <samueltan@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
Commit-Queue: Eric Caruso <ejcaruso@chromium.org>
Trybot-Ready: Eric Caruso <ejcaruso@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
7116093da00d83a9b2a2200e5501fe138cbdd11e 12-Dec-2014 mukesh agrawal <quiche@chromium.org> shill: allow configuring wifi services with kSecurityClassProperty

We want Chrome to use kSecurityClassProperty, instead of
kSecurityProperty. To do so cleanly, Chrome needs to be able to
configure WiFi networks using the kSecurityClassProperty. So update
shill to support that.

While there: fix a buglet in WiFiService::SetPassphrase. (It was
logging the pointer to the error, rather than the error's message.)

BUG=chromium:441904
TEST=unit tests

Change-Id: I26957dbb7610381372044e3178a37b7b074764af
Reviewed-on: https://chromium-review.googlesource.com/235451
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
0951ccbfca977a9cf218b2e4308aa26fb4d06ef9 10-Dec-2014 Alex Vakulenko <avakulenko@chromium.org> Update libchrome to r307740 and fix build errors

Updated libchrome, libchrome_crypto, metrics, feedback to the
latest revisions from Chrome (r307740).

Fixed build breaks due to the changes in upstream code:

- scope_ptr no longer needs explicit PassAs<T>() calls.
- scope_ptr<T> no longer has implicit conversion to T*.
Must use scope_ptr<T>::get() instead.
- base/file_util.h moved to base/files/file_util.h
- ARRAYSIZE_UNSAFE() removed in favor of arraysize()
- base::AppendToFile() and base::WriteFileDescriptor() now
return bool instead of the number of bytes written.
- dbus::Bus::AddFilterFunction() now returns void.
- C++11 features are enabled in libchromeos, so all targets
linking with it now have to support C++11
- OVERRIDE macro is removed in favor of native C++11
'override' keyword.

BUG=chromium:416628, chromium:411508
TEST=Build the world on x86, x64, ARM. The following builders
were tried:
x86-generic-full amd64-generic-full arm-generic-full
amd64-generic-asan daisy-full nyan-full pre-cq-group
daisy-release-group sandybridge-release-group
pineview-release-group
CQ-DEPEND=CL:234450,CL:234980

Change-Id: I374bebe2211d533c4431c82efb8be1cdcb1f405d
Reviewed-on: https://chromium-review.googlesource.com/234440
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc
d6a8b519e3057f52313e502f502a4819a942e089 18-Nov-2014 Ben Chan <benchan@chromium.org> shill: wifi: Move wifi code to its own sub-directory.

This CL is part of a series of CLs, which aim to reorganzie shill's flat
source code structure into a more modular form by moving technology
specific code into their own sub-directories.

BUG=chromium:433419
TEST=`FEATURES=test emerge-$BOARD shill`
TEST=`USE='clang asan' FEATURES=test emerge-$BOARD shill`

Change-Id: Ic6bf64e7fe263fd0b2277877d78cf776f179e7d7
Reviewed-on: https://chromium-review.googlesource.com/230460
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/connectivity/shill/wifi/wifi_provider.cc