History log of /system/connectivity/apmanager/device.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f933540bb968efa2744ee48b40ab713ccd358d51 16-Nov-2015 Peter Qiu <zqiu@google.com> Refactor D-Bus adaptor for Device out of the Device class

This removes the RPC specific dependencies out of the Device class.
Device adaptors will now be created through the ControlInterface.

While there, make the D-Bus object registration for Device object to
be synchronous instead of asynchronous. Since the daemon will not
be doing anything anyway besides waiting for the registration to
complete. This avoids unnecessary complexity with the object
registration.

Currently for D-Bus, the property variables are being created/stored
in the generated adaptor code. This means that the property variables
will be stored in the adaptor instead of the Device class itself.
Even though this is not ideal, there is no good way around it. In the
ideal world, the Device would maintain its property variables, and
register them with the RPC specific adaptor.

So for the unittest, we will use FakeDeviceAdaptor, which provides the
storage for the property variables.

Also currently gmock doesn't support mocking of a function that returns
a unique_ptr, since it only supports copyable return value and unique_ptr
is not copyable. To work around this issue, I've created mock functions
that return a raw pointer, and override the proxy/adaptor creation
functions to use the mock function in MockControl.

Bug: 24194427
TEST=Start AP service on both Brillo and Chrome OS
TEST=Run unittests on both Brillo and Chrome OS

Change-Id: I8e9f736bb27fe6736f616dd752a37b9cc1be8dfe
/system/connectivity/apmanager/device.h
8d0c31bb481b712a3b2e6612390679e29053c620 13-Oct-2015 Alex Vakulenko <avakulenko@google.com> apmanager: Rename "chromeos" -> "brillo" in include paths and namespaces

libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.

Bug: 24872993
TEST=built for aosp and brillo, all unit tests pass on dragonboard
Change-Id: I4c6efbc5bbf80d251e5d91bc3db49f02bc0e4732
/system/connectivity/apmanager/device.h
1ec4e7e52faa8582d05be19dee0a4ca7b96c8976 18-Sep-2015 Peter Qiu <zqiu@google.com> Rename DBus definition files

Android build system expects DBus definition file name to end
with .dbus-xml extension. So rename DBus definition files
to make it consistent for both platforms.

Also update the output directory for adaptor headers, so that
it will be the same on both platforms.

Bug: 24164800
TEST=emerge-$BOARD --unmerge apmanager
TEST=sudo rm -rf /build/$BOARD/var/cache/portage/chromeos-base/apmanager
TEST=emerge-$BOARD apmanager

Change-Id: I808983591d0633fe37b83e54237575419476e2b5
/system/connectivity/apmanager/device.h
326b6cfba5ab73c9e41a7585d1bc95871631122a 02-Sep-2015 Peter Qiu <zqiu@google.com> Re-license apmanager 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, the NOTICE was replaced with a copy
of the Apache2 license and MODULE_LICENSE_* file was updated.

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

Change-Id: I4ade0a15ff18ab159d4a2f99525b62c780b13c89
/system/connectivity/apmanager/device.h
0ca183b004fbf56973ae82a59d776752ffa17ab0 09-Mar-2015 Peter Qiu <zqiu@chromium.org> apmanager: configurable device control for AP service

Add a Config property "FullDeviceControl" for controlling the wifi device
when starting an AP service on it. This property is set to true by default.

When it is set to true, apmanager will claim all interfaces resided on the
wifi device used for starting an AP service.

When it is set to false, apmanager will only claim the actual interface on
the wifi device used for starting an AP service. This will allow shill to
maintain the control of the managed mode interface when an AP service is
started on the same wifi device, which will allow the wifi device to support
both client mode and AP mode operation simultaneously (when dedicated interfaces
are created for each operation mode by the driver).

BUG=brillo:541
TEST=USE="asan clang" FEATURES=test emerge-$BOARD apmanager
Manual Test:
1. Grab a peach_pit device, which supports both client mode and AP
mode operation simultaneously with constraint of both needs to
operate on the same channel.
2. Start an AP service with default settings, verify shill is not
managing the managed mode interface "mlan0" anymore via
"./usr/local/lib/flimflam/test/list-devices".
3. Tear down the AP service, and then connect the device to a wifi
network ("ChromeOS-Test-AP").
4. Start an AP service with "FullDeviceControl" set to false and
"Channel" set to the same channel number as the client connection,
verify shill is still in control of the managed mode interface
"mlan0" via "./usr/local/lib/flimflam/test/list-devices" and "ifconfig".
5. Verify another client device can connect to that AP with IP connectivity.

Change-Id: I71f58e4b50b3a8f92f1be339157850c37772e29a
Reviewed-on: https://chromium-review.googlesource.com/257611
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
3d95ac798b727425ad539e1fe03b6a74b0be5c6f 07-Dec-2014 Peter Qiu <zqiu@chromium.org> apmanager: parse ap mode support information

Parse AP mode support information from Wiphy capability message. And do
not set preferred AP mode interface if AP mode is not supported.

BUG=chromium:431763
TEST=USE="asan clang" FEATURES=test emerge-$BOARD apmanager
Manual Test:
1. Verify AP service can be started on a device that supports AP mode.
2. Verify AP service failed to start on a device that doesn't
support AP mode with a "No device available" error message.

Change-Id: Ia77fa3d74b944b978697afcb16aa71f27412fbdb
Reviewed-on: https://chromium-review.googlesource.com/233773
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Trybot-Ready: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
c9ce1f1d5db7773566ad68dda9db9906b0f54241 05-Dec-2014 Peter Qiu <zqiu@chromium.org> apmanager: fix/refactor dbus object registration

The original logic for DBusObject creation was incorrect, "object_manager"
can be null but "bus" object should not. So fix it by explicitly passing
the "bus" object from the DBusDaeomon to each RegisterAsync function.

Also fix the ShillProxy to not create a new Bus object for initializing
the proxy object, and use the same Bus object that's created in DBusDaemon.

BUG=chromium:439223
TEST=USE="asan clang" FEATURES="test" emerge-$BOARD apmanager
Manual Test:
Start an AP service using apmanager

Change-Id: Ie0518463b7ce3470e9200893806df7a193168d2c
Reviewed-on: https://chromium-review.googlesource.com/233493
Tested-by: Peter Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
7e0ffcf4e8d2fb05b2a57fc2127451ece8556cf5 02-Dec-2014 Peter Qiu <zqiu@chromium.org> apmanager: claim interfaces from shill

apmanager requires sole ownership of a device before it can successfully
start a hostapd on that device.

The support for reclaiming interfaces from shill when an instance of
shill is started/restarted is not in yet. It requires support for registering
DBusNameOwnerChanged callback to the dbus_object_proxy_ which is not possible
in the current generated proxy code.

BUG=chromium:435704
TEST=unittests and manual test using apmanager on stumpy router

Change-Id: I7f737d0bf55f31c1e4ed2a7e5ffe04943ea056db
Reviewed-on: https://chromium-review.googlesource.com/232752
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
8e785b9645b8d6f32f3e2cae8d7e2a7ec3c71e76 24-Nov-2014 Peter Qiu <zqiu@chromium.org> apmanager: add support for HT capability

Parse wiphy's HT capability and add it to the AP service's configuration
file to correctly support AP in 80211n mode.

BUG=chromium:431763
TEST=unittests and manual test by using python to invoke dbus calls
to start AP service in 802.11n mode.

Change-Id: I6c902136832eea6b38b806f733231d6cbe14e3f6
Reviewed-on: https://chromium-review.googlesource.com/231681
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
1ff67a70eb6dea94ba8a6a836add9810536bec31 22-Nov-2014 Peter Qiu <zqiu@chromium.org> apmanager: support on-demand device enumeration

Enumerate a new device when a new interface is detected but its
corresponding device has not been enumerated yet. This is possible
if apmanager starts before WiFi driver is loaded or a WiFi device
is plug-in during run time.

BUG=chromium:431763
TEST=unittests

Change-Id: I9df224ae8ed55f50d629c4386088c508ebffb223
Reviewed-on: https://chromium-review.googlesource.com/231476
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h
fb39ba4b2ef92f0c9d19f6910a350cd8a14405a0 21-Nov-2014 Peter Qiu <zqiu@chromium.org> apmanager: support for WiFi devices and interfaces

Added DeviceInfo for enumerating WiFi devices (PHYs) and detecting
WiFi interfaces. Also Created a Device class for abstracting WiFi PHYs,
which will maintain the device's capabilities and manage interfaces
created on the device.

Integrate Device with Manager and Config to allow user to start
an AP service without providing interface information.

Next up, will focus on parsing HT/VHT capabilities for each band and
integrate it into ap configuration. Also adding shill support for
claim/release interface.

BUG=chromium:431763
TEST=unittest

Change-Id: I62f4251064483b57e264d1278fde68022a737aea
Reviewed-on: https://chromium-review.googlesource.com/231257
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/apmanager/device.h