Commit graph

1244 commits

Author SHA1 Message Date
Roshan Pius
e3a02b07b6 wifi(interface): Add wifi debug ring buffer related interface
The debug ring buffers is a purely debug mechanism to let the driver
report debug info like connection events, power events, etc to the
framework.
The framework used to previously dump out the raw byte stream in
the bugreport and the vendors had some tools to parse out the data.
This is now being changed to provide the framework with the
internal ring buffer structs to ease parsing this data in framework
itself. This will eventually be used in the new wifilogd daemon.

Bug: 32221997
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I2c90662cfa9d07ae6fc72198a286338dbaacbfc2
2016-11-16 11:05:16 -08:00
Roshan Pius
5e25466ebf wifi(interface): Move all StaIface types to types.hal
Some of these structs are used in the debug framework and hence needs to
live in types.hal. Add a |Sta| prefix to differentiate them from other
types similar to what is done for Nan and Rtt types.

Bug: 31991459
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Idc49b28447609c4334b0a086481c404c06a63fea
2016-11-16 11:05:16 -08:00
Roshan Pius
e03f736ca0 wifi(interface): Fix compilation failure
Changes in the CL:
a) Unions are not allowed in the HIDL generated code that is going to be
used in java.
b) Few RTT constants were defined twice in the legacy rtt.h. One set
as enums, the other set as #define's. Remove the duplicated values in
the HIDL interface.

Bug: 31991076
Bug: 31991232
Test: mmm -j32 hardware/interfaces/wifi/1.0/
Change-Id: I03db70c7b89c0be53a7754ab8b34a19ad2c6e536
2016-11-16 11:05:16 -08:00
Roshan Pius
18eec81adc wifi(interface): Rtt controller HIDL interface
Bug: 31991232
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I53b95e85ee8a71bcb0494420913c9511f87908c0
2016-11-16 11:05:16 -08:00
Roshan Pius
120f94c594 wifi(interface): NAN HIDL interface
Interface is mostly a replication of the wifi_nan.h HAL header file.
1. All the methods are in |IWifiNanIface|.
2. Moved all the callbacks to |IWifiNanIfaceEventCallback.hal|.
2. Moved all the data types to |types.hal|.
3. Changed all the variable size arrays to vecs.

Bug: 31991076
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I2af0b0003cf30a0f2bfdcb56b69c492cf831745b
2016-11-16 11:05:16 -08:00
Roshan Pius
18680b7aff wifi(interface): Link layer stats collection
Add HIDL methods for STA iface link layer stats.

While there,
Add the missing gscan API for fetching a list of channels for a given
band.

Bug:31991459
Test: Compiles
Change-Id: I5d448eb823faae4e8f5c25f746cf59e70df454cf
2016-11-16 11:05:16 -08:00
Roshan Pius
a52dc7322d wifi(interface): Make methods synchronous
Having all the HIDL methods asynchronous, makes it hard for the
calling code to keep track of the operation status/result.
There are some operations which will generate asynchronous results (like
bgscan), convert all the other methods to synchronous methods.

The |EventCallback| objects will now just broadcast important events
(needed for other clients to listen for state changes). This will no
longer be used to send responses to every command sent to the HAL.

Bug: 32061909
Test: `./hardware/interfaces/update-makefiles.sh`
Change-Id: Id2433f4c8e028268dd027cdeb239ba4082b157b5
2016-11-16 11:05:16 -08:00
Roshan Pius
1f9073cfcb wifi(interface): Add status for every method
Add a status parameter for every HIDL interface object method which can
possibly become invalid. This should help inform the caller that the
object being used is stale/invalid now.

While there,
Rename |CommandFailureReson| to |FailureReasonCode|.

NOTE: |FailureReason| will continue to indicate any errors during the
processing of the command via the corresponding |onFailure| callback.

Bug: 32056230
Test: Compiles
Change-Id: I2ec5af3075221e483579410f344bcedd6bf17a93
2016-11-16 11:05:16 -08:00
Roshan Pius
7b77747bb5 wifi(interface): Add gscan/apf related API's
Changes in the CL:
1. Add gscan/APF related API's to |IWifiStaIface|.
2. Add a new callback HIDL interface (|IWifiStaIfaceEventCallback)
for all callbacks received from |IWifiStaIface|.

Bug: 31991459
Test: Compiles
Change-Id: Id9f2ded9e20bee393ab53d84efa814d52704cd2c
2016-11-16 11:05:16 -08:00
Roshan Pius
9e01c51793 supplicant(interface): Fix compilation failure
The generated code uses the variable |code| internally.

Bug: 31116047
Test: mmm -j32 hardware/interfaces/wifi/supplicant/1.0/
Change-Id: Ic6d0c9a198a026460f67fa4920b8003a304f6727
2016-11-16 10:29:37 -08:00
Roshan Pius
b76dbbef4f supplicant(interface): Add support for Hotspot 2.0
HIDL interface to
a) Initiate ANQP queries & icon queries for hotspot 2.0
b) Add callbacks for the reception of WNM frames (hotspot
remediation, deauth imminent notice).

Bug: 31116047
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Ib3353f04b493f50c6415d1f3475efa957d921540
2016-11-10 15:16:28 -08:00
Roshan Pius
849d24ccbf Merge "supplicant(interface): Support P2P operations" 2016-11-09 18:01:55 +00:00
Roshan Pius
756ad991af supplicant(interface): Support P2P operations
Add methods for all the P2P related operations. This is a subset of P2P
functionalities exposed by wpa_supplicant used in the Android codebase
currently.

While there,
Add missing |FAILURE_ARGS_INVALID| status code in the setter methods in
ISupplicantStaNetwork.hal

Bug: 31497295
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I657ef6deaa6203bcf890c43f98a32f6230962d04
2016-11-08 09:14:07 -08:00
Colin Cross
5222c47773 Merge "Support genrules with multiple tools" 2016-11-07 20:28:26 +00:00
Colin Cross
8f084e00d6 Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.

Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
(cherry picked from commit b785f5b82e)
2016-11-07 10:54:59 -08:00
Roshan Pius
8c6a8772f7 supplicant(interface): Remove "wpa_supplicant"
sed -i "s/wpa_supplicant/the supplicant/g" *.hal

Bug: 32602594
Test: Compiles
Change-Id: Id905cabba29359db8727c131fb64357dfbb104cd
2016-11-03 09:37:57 -07:00
Roshan Pius
7c636f8149 wpa_supplicant(interface): Remove create/remove iface methods from HIDL
Use a new struct(IfaceInfo) to list and get iface objects from the root.

Bug: 32577464
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I912d37f62767980e7f88de5b4439425276de50f8
2016-11-02 10:19:30 -07:00
Roshan Pius
39f588f8ed wpa_supplicant(interface): Add iface/network type
Add separate types of Iface/Network object for STA (station mode) and
P2P mode ifaces and associated networks. These expose very different
functionality and exposing 2 different types of objects makes the
interface cleaner.
Although, they're still represented via the same struct for both types
in the wpa_supplicant core.

Bug: 32553421
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I41601a650709429c65014cb7adaf6cb9ab03787e
2016-11-02 08:54:26 -07:00
Steven Moreland
7982058699 Running update-makefiles for fixed spacing.
Test: pass
Change-Id: I4dcaf70b1c014f3ecf685d4884601be6f17ee51d
2016-11-01 20:06:29 +00:00
Steven Moreland
7a4f118c48 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:05:29 +02:00
Steven Moreland
ce9779412a Update headers (for export shared lib headers)
Test: mma -j64
Bug: 32337293
Change-Id: I93e7cab90efac407525a1a5f2ad30f816a530e17
2016-10-22 00:28:00 +00:00
Steven Moreland
fb8821066d wifi: Removing reference to IServiceManager.h.
Bug: 32313592
Test: make

Change-Id: If1b842c563b5934b58fb328c2f2315c42ae6fc06
2016-10-21 12:36:19 -07:00
Roshan Pius
f243631af8 wifi: Invoke failure callbacks
Invoke the failure callbacks for |requestChipDebugInfo|,
|requestDriverDebugDump| and |requestFirmwareDebugDump| methods.

Bug: 32014425
Test: Compiles
Change-Id: I49b8ae93fe846df6d9663b10d2a70eb89bd00931
2016-10-11 07:46:24 -07:00
Roshan Pius
5926828728 wifi: Add WifiRttController object
Create the WifiRttController object and add the createRttController
method in WifiChip.

Bug: 31991232
Test: Compiles
Change-Id: I34649097c96488c660bef5acceac1a6478f80dca
2016-10-11 07:46:24 -07:00
Roshan Pius
35d958c43f wifi: Add Iface related method implementations in WifiChip
Add the iface creation/retrieval/list method implementations in WifiChip.
WifiChip does not yet support the chip mode configuration. So, all
|createIface| method calls succeed today. Once the mode configuration
changes are in place, we will deny iface creation requests depending on
the iface combination supported in the current mode.

The iface objects are all invalidated and deleted on mode switches and
when HAL is stopped.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 31943042
Test: Compiles
Change-Id: Ic94864c8b11aabbe569b5157d68d6056364a3c4c
2016-10-11 07:46:24 -07:00
Roshan Pius
3e2d671a4c wifi: Add the various iface object implementation
This CL adds the implementation classes for the various iface HIDL
interfaces defined. These classes implement the
|getName| & |getType| methods in the Iface HIDL interface.

Integration of these objects with WifiChip class is implemented in the
next CL.

Bug: 31943042
Test: Compiles
Change-Id: I219afd6441e15c76cf7c61f7bcd2b3568dba2b98
2016-10-11 07:46:24 -07:00
Roshan Pius
ab5c471b0b wifi: Remove "Wlan" prefix from wifi_legacy_hal public methods
All the legacy HAL API's in the function table uses the "wlan0"
interface handle for the various operations. But, this is an internal
detail that should be abstracted inside WifiLegacyHal class. So, rename
the public methods to remove the "Wlan" prefix from them.

Also, add methods to fetch the iface names to use for the various types
of HAL.

Bug: 31943042
Test: Compiles
Change-Id: I35a6cdea0ad7cff295d33c0245953258129fba43
2016-10-11 07:46:24 -07:00
Roshan Pius
cd566bddd7 wifi: Add support for multiple chips in IWifi
The modified HIDL interface supports multiple chip instances on the
device. Modify the |IWifi| interface implementation to support the new
methods.

NOTE: The legacy HAL implementation will continue to only expose 1 chip.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 32003988
Test: Compiles
Change-Id: I31e704100f716e223095890279bdf93d2a04377e
2016-10-11 07:46:24 -07:00
Roshan Pius
fcbf923d3a wifi(interface): Add RTT Controller object
Create a RTT controller object to use for initiating all the RTT related
HAL opertations.
Since we don't want to fix the iface on which to initiate RTT operations,
these methods will be rooted in a new standalone object |RttController|.
Framework can decide to intiate an instance of |RttController| on a
specified iface or let the implementation pick one.

Bug: 31991232
Test: Interface compiles.
Change-Id: I65f7a7babd72db26ce6549f572abd9ef73700c82
2016-10-11 07:46:24 -07:00
Roshan Pius
adcfba4b09 wifi(interface): Add Iface objects
Create a child object under IWifiChip to represent each interface
within the chip. Each iface object has a |type| & |ifname| which should
help us uniquely identify them. This should help us expose methods that
are applicable only to a specific interface type.

While there,
Assign a unique id to every chip on the device.
Add IWifi.listChipIds() to retrieve the list of chip Id's avaiable on the
device. IWifi.getChip() will now use the provided Id to retrieve the
corresponding IWifiChip object(because HIDL language doesn't support
vec<HIDL objects>).

Bug: 31943042
Bug: 32003988
Test: Interface compiles (not implementation)
Change-Id: I723007566ca4220362c02d0f452753fee4e31fce
2016-10-11 07:46:24 -07:00
Roshan Pius
271f2c2d9c wifi(interface): Rename interface to iface
The HIDL objects are called "interface", so rename the wifi interface to
iface to distinguish between them better.

This is especially needed in the follow up CL.

Bug: 31943042
Test: mmm -j32 hardware/interfaces/wifi/1.0/
Change-Id: I3bc34930f75159d26321c0e071af9084d0585508
2016-10-05 10:30:24 -07:00
Roshan Pius
6f31d92e59 wifi(interface): Add/Correct docstring params
Changes in the CL:
1. Add missing docstring params in the HIDL interface.
2. Reword some method docs. Occurences of "will" is replaced
by "must" (based on comments received on supplicant HIDL interface:
go/aog/275115).
3. Add onFailure callbacks for all the methods and added docstrings for
them.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0
Change-Id: Ib7152625851023d6244f742bb77a8fdc0829e00d
2016-10-05 10:30:15 -07:00
Roshan Pius
cdb77f3cf2 wifi: Add implementation of driver/firmware memory dumps
Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I25d42cfd4c2b1ea7e63bdc036f37f81aed93c565
2016-10-05 09:22:06 -07:00
Roshan Pius
4b26c832ed wifi: Add Implementation of IWifiChip.requestChipDebugInfo
Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: Id0c02e37dac66de6f830785881cb67f113c0fb19
2016-10-05 09:21:07 -07:00
Roshan Pius
908a69a53a wifi: Use hal_tool & if_tool
Changes in the CL:
1. Currently |WifiNative.cpp|, uses |hal_tool| to initialize the
function table and |if_tool| to set the interface up when |startHAL|
method is invoked. Use the same sequence in the HIDL'ized HAL.
2. Remove the assertion if the function table initialization fails. This
will result in a failure indication on starting the HAL now.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I268845ed62158b6a2ff36659f0bb15c4100a7222
2016-10-04 18:36:25 -07:00
Roshan Pius
aabe575536 wifi: Restructure wifi legacy HAL implementation
Restructured the existing code to create a new class called
|WifiLegacyHal|. This class will be used as a wrapper to invoke
all the legacy HAL functions and handle the "C" style callbacks.

Bug: 31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I63e8543f49886f8446101320a97d1e96e30d1035
2016-10-04 18:36:22 -07:00
Roshan Pius
79a9975d07 wifi: Change namespace
Move the implementation to "android::hardware::wifi:V1_0::implementation"
namespace.
This is following the style guidelines in NFC HIDL
implementation(go/aog/279421).

While there,
Run checkstyle to correct formatting issues.

Bug:31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5600a60a0041b3318ed9289823ec335a8ed8a83d
2016-10-04 13:23:20 -07:00
Roshan Pius
3c4e8a358c wifi: Move legacy HAL implementation
Changes in the CL:
1. Move the legacy HAL implementation from
"frameworks/opt/net/wifi/wifi_hal_legacy" to
"hardware/interfaces/wifi/1.0/default".
2. Renamed the .rc file and the module name in makefile to
conform to the HIDL style guide.

Files renamed from:
wifi_hal_service.cpp/h -> wifi.cpp/h
wifi_chip_service.cpp/h -> wifi_chip.cpp/h
main.cpp -> service

Bug: 31821133
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5e65e2fdb5596346bde6963588031dcea42d633a
2016-10-04 13:10:25 -07:00
Dan Willemsen
242b34edd5 Convert to Android.bp
See build/soong/README.md for more information.

Bug: 31742855
Test: mma -j
Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d
2016-09-30 10:31:54 -07:00
Roshan Pius
22ab8b2451 wifi: Move supplicant HIDL interfaces to subfolder
Move all the supplicant HIDL interfaces to a separate subfolder.

Bug: 31800508
Test: Compiles
Change-Id: I09bfb17b626312e8be819238ab2edbb83ca04322
2016-09-28 13:37:45 -07:00
Roshan Pius
9a3a84f5a3 wifi(hidl): Add supplicant HIDL interface
Convert the existing AIDL binder interface of wpa_supplicant to HIDL.

Summary of changes:
1. Every HIDL method returns an instance of |SupplicantStatus|
along with any others params (for getters). This is needed to return the
equivalent of |Binder::Status| to indicate errors in the args passed,
stale proxy, etc.
2. All constants are changed to enums. There were some constants which
should have been enums in the first place, but wasn't because AIDL did
not support enums. But, there are others which should be standalone
constants, but are enums now because constants are not supported in HIDL.
3. Conform to HIDL style guide.

Bug: 31365276
Test: `mmm -j32 hardware/interfaces/wifi/1.0/`
Change-Id: Iba753e279fd260788d8628ea2f5c2281b5844095
2016-09-28 11:03:17 -07:00
Yifan Hong
b0b5322e7d Updated indentation to 4 spaces for Android.mk.
Test: `cd system/tools/hidl && mma`
Change-Id: I088893c3c8b080239f0f32e3434faf3da3fefc7a
2016-09-26 16:02:39 -07:00
Andreas Huber
495391aad8 Updated makefiles that also add static java library targets.
Bug: 31684178
Test: hidl_test and hidl_test_java
Change-Id: Ib53d1be2b1535837ca97cb61796e335141fc7611
2016-09-23 09:21:15 -07:00
Mitchell Wills
5443a9fc9b Initial pieces of WiFi HAL interface definition
Test: make -j48 android.hardware.wifi@1.0 android.hardware.wifi@1.0-java
Bug: 31350762
Change-Id: I1b598be397e08165fc9fd607888e064b139e8007
2016-09-22 10:50:27 -07:00