Commit graph

25 commits

Author SHA1 Message Date
TreeHugger Robot
84a51275b5 Merge "move ringbuffer interactions to wifi hal" 2018-01-24 03:36:38 +00:00
xshu
5899e8e9a1 move ringbuffer interactions to wifi hal
Shallow copy of ringbuffer is stored inside the hal.
The maximum ringbuffer size is configured by the
framework.

overrides IBase::debug to:
1. write ringbuffers in memory to flash (wifi tombstones)
2. write wifi tombstones to lshal debug fd in archived format

Bug: 70171481
Test: compile, run on device
Test: run "lshal debug android.hardware.wifi@1.2::IWifi >>
archive.cpio" and compared archived files with originals using diff command
Change-Id: I33c30e37f245cfa36e005ba8cdc46e91f6de9237
2018-01-23 13:54:19 -08:00
Etan Cohen
4f5bc6cc53 [AWARE] Add global NAN RTT enable/disable flag
Add a HAL flag to globally enable or disable NAN RTT negotiations.

Bug: 70218295
Test: integration tests
Change-Id: I1460dd94ba12991e8324cabc88cd3a6ddcf8ed55
2018-01-18 19:51:22 +00:00
Etan Cohen
c7bd0f718c [AWARE] Add NDP channel info to HAL 1.2
Enhance HAL 1.2 to include NDP channel info:
- NDP confirmation message update
- New event (indication) on NDP channel change

Results in a new event callback registration API.

Bug: 37007030
Test: integration tests
Change-Id: If9dee4eca9d6774b03fc295ad239a6a4e7397cba
2018-01-18 19:33:14 +00:00
Etan Cohen
9e7a405733 [AWARE] Add power confriguration parameters to HAL 1.2
Add configuration parameters (power optimization) to NAN HAL 1.2.

Bug: 67745737
Test: integration tests
Change-Id: I65524c05c6861d7b54e441572b3be918bc6bb5ab
2018-01-18 19:29:59 +00:00
Roshan Pius
876220fe51 wifi(implementation): Fix IWifiChip.getCapabilities()
Some non-pixel devices don't support the logger API's, bypass the error
check for these devices. This is already done for
IWifiStaIface.getCapabilities(), but was missing in
IWifiChip.getCapabilities().

Bug: 69094019
Test: Compiles
Change-Id: I1c5be66b9f22461a957321a83332152ec2cd0c6d
2017-12-28 16:19:06 -08:00
Etan Cohen
9649e54d6c [WIFI][TREBLE] Uprev IWifiChip to 1.2
The IWifiChip HAL was uprev'ed to 1.2 but the C++ code did not reflect
it.

Bug: 65647646
Test: builds/runs
Change-Id: I2b4524e8a1fcbfd162919c183367959fbaf68f09
2017-12-21 08:41:34 -08:00
Etan Cohen
e262f8cecd Merge "[AWARE] Update cm HIDL to use mm HAL" 2017-12-15 16:53:50 +00:00
Roshan Pius
220d98c193 Merge changes I017d3528,Ie5444041,Iff873784,I1049176a,I8575df02, ...
* changes:
  wifi(implementation): Load wifi driver on IWifi.start()
  wifi(implementation): Different names for concurrent ifaces
  wifi(implementation): Add iface combo for 2018
  wifi(implementation): Unit tests for V1 & V2 iface combos
  wifi(implementation): Add unit test framework
  wifi(implementation): Support multiple ifaces of same type
2017-12-15 04:02:13 +00:00
Etan Cohen
7b8c5d78c8 [AWARE] Update cm HIDL to use mm HAL
Legacy HAL updated to use mm. The current HIDL is (still at) cm.
Add conversions.

Bug: 69428593
Test: integration tests passing (but ranging is still pending fw)
Change-Id: Ia431fcebedf5a1c66847c2f1627923b5704fece0
2017-12-14 18:12:04 -08:00
Etan Cohen
d4020eaa27 Merge "[AWARE] Add legacy code wrapper for NDP channel indication" 2017-12-13 18:38:05 +00:00
Roshan Pius
8fc6d17071 wifi(implementation): Load wifi driver on IWifi.start()
The current implementation loads the wifi driver only when the chip is
configured, but the HAL is initialized on IWifi.start(). This seems to
be wrong semantically. The driver needs to be loaded before the HAL is
initialized.

This may have worked previously because the driver was loaded in
init.rc, but may stop working when we move to proper DLKM model in 2018.

Bug: 65671875
Test: Device boots up and connects to wifi networks.
Change-Id: I017d3528bf0b42a6a59af43203ecc9d0d027f60d
2017-12-13 10:35:50 -08:00
Roshan Pius
8e3c7ef134 wifi(implementation): Different names for concurrent ifaces
Allocate different iface names (wlan0, wlan1) for concurrent ifaces.

Bug: 65671875
Test: ./hardware/interfaces/wifi/1.2/default/tests/runtests.sh
Change-Id: Ie544404183dbb616a20f88f4fb3ce71795cf89af
2017-12-13 10:35:50 -08:00
Roshan Pius
cc338202ef wifi(implementation): Add iface combo for 2018
Changes in the CL:
a) Added iface combo for 2018 using a new feature flag.
b) Added a generic algorithm to determine if an iface can be created or
not based on the iface combos supported. This is needed because we now
have to support 3 different combos (2016, 2017, 2018) in the HAL.
The current iface creation logic is hard to adapt to these 3 varying combos.

Bug: 65671875
Bug: 69863101
Test: ./hardware/interfaces/wifi/1.2/default/tests/runtests.sh
Change-Id: Iff8737843abee3d03567930e9faba775eaa82e07
2017-12-13 10:35:50 -08:00
Roshan Pius
3312801aa5 wifi(implementation): Unit tests for V1 & V2 iface combos
Unit tests for all the iface combos supported in V1 (2016 devices) & V2
(2017 devices).

Bug: 68775880
Test: ./hardware/interfaces/wifi/1.2/default/tests/runtests.sh
Change-Id: I1049176aabdf936d442d022b5915129010ce7387
2017-12-13 10:35:37 -08:00
Etan Cohen
1bf15f1c57 [AWARE] Add legacy code wrapper for NDP channel indication
Integrate legacy HAL code mods to add an NDP channel indication.

Note: This CL is just the integration - not the HIDL usage of the
new API.

Bug: 37007030
Test: builds + integration tests passing
Change-Id: I59da1fb7e225a5038e436b793bc66b892786c238
2017-12-12 16:15:16 -08:00
Roshan Pius
200a17db77 wifi(implementation): Add unit test framework
We're going to add some non-trivial logic in wifi chip to handle
multiple chip configurations (to support devices with different
capabilities). So, adding a unit test framework in preparation
for testing those changes.

The mocks only mock legacy HAL methods which are in use during chip
configuration & interface creation/deletion.

Bug: 68775880
Test: Compiles
Change-Id: I8575df02f54656f77077d14ac9535ccc974bdff3
2017-12-12 15:01:15 -08:00
Roshan Pius
675609baa6 wifi(implementation): Support multiple ifaces of same type
Making all of the iface object fields in WifiChip to vectors to support
multiple ifaces of the same type.

Bug: 65671875
Test: Device boots up and connects to wifi networks.
Change-Id: I4c0c927c0269e54210cc1f81203c1797d72e969c
2017-12-12 15:01:15 -08:00
Roshan Pius
ba38d9ce76 wifi(implementation): Allow chip reconfiguration
This was previously disallowed because WifiLegacyHal.stop() was non blocking.
WifiLegacyHal.stop() was made blocking using ag/2715673, so reconfiguration
should be supportable now.
Note: This is a partial revert of ag/2125543.

Bug: 65671875
Bug: 70411703
Test: Will send for regression tests.
Test: Reverted the VTS CL: ag/2139830 and ensured that the test works
now. Can't check-in that revert because it would not be backward
compatible.
Change-Id: Ia5f9ccaf5403d171b0def7740d2adece7eb3c157
2017-12-11 23:47:43 +00:00
Roshan Pius
abcf78fe90 wifi(implementation): Fix formatting
Use the top level clang-format setup by the HIDL team to format the
entire implementation.

clang-format -i --style file wifi/1.2/default/*

Bug: 32287573
Test: Compiles
Change-Id: I336c21fd9bfdc560117aa7212f92ab5f01df4b8e
2017-12-04 08:14:11 -08:00
Roshan Pius
acededbcd1 wifi(implementation): Dual interface support
Add support for concurrent interfaces in the WifiLegacyHal class:
a) Removed the hardcoded "wlan0" interface handle in WifiLegacyHal.
b) Modified all the interface specific functions to accept the |iface_name|
argument on which the operation needs to be performed.

Each IWifiIface object will hold the name of the underlying network
interface (wlan0, wlan1 or p2p0) which it is representing.
All IWifiChip operations which needs an iface name will continue to use
the default "wlan0".

Bug: 65671875
Test: Device boots up and connects to wifi networks.
Test: Will send for regression tests.
Change-Id: I9bd9c2a9ba33ac1ea5677fc5d7c261d8eac08e1d
2017-12-04 08:14:11 -08:00
Roshan Pius
9377a0d285 wifi(implementation): Use real iface names
Currently the HAL shim uses fake names to ensure that each type of
IWifiIface has a unique name. This is not a true reflection of the
network interfaces exposed by the wifi driver. So, change the HIDL shim
to use the corresponding interfaces names.

IWifiStaIface, IWifiApIface & IWifiNanIface all use the same "wlan0"
network interface.
IWifiP2pIface uses the "p2p0" network interface.

In the future, we'll be extending this to create a second IWifiStaIface
or IWifiApIface using "wlan1" network interface.

IWifiRttController does not need to be associated with an iface object.
So, it will just default to using "wlan0" always.
TODO(b/34702983): Need to deprecate the bound iface from the HIDL interface.

Bug: 65671875
Test: Device boots up and connects to wifi networks.
Test: Will send for regression tests.
Change-Id: I33fef1332f2fe2da3f48ee87ef06660844699253
2017-12-04 08:14:11 -08:00
Martijn Coenen
b6fa3ae638 Fix library loading order in .mk files.
Test: angler boots again
Bug: 69180318
Change-Id: Id71e2348eabf5101d1fd286bbc0076154703d159
2017-11-13 19:59:54 +01:00
Roshan Pius
aac0f48dbe Merge "wifi(implementation): Increase stop timeout" into oc-mr1-dev am: 558d53cc61
am: b537ec5d6f

Change-Id: I6e9a1f36d85b9e9f421873e79e5df9214bf053a0
2017-10-04 00:02:03 +00:00
Etan Cohen
6ce5090854 [WIFI][TREBLE] Uprev Wi-Fi HAL 1.2
In preparation for new feature development - uprev the Wi-Fi Treble HAL
revision from 1.1 to 1.2.

This CL does not contain any functional changes to the HAL itself. Only
updating the revision.

Bug: 65647646
Test: builds and Wi-Fi runs
Change-Id: I8e80e866562a508bf481104a3dbcf2bd8f8015b4
2017-09-14 13:00:39 -07:00