No description
Find a file
Jimmy Chen 28f471d3bf Wifi: enhanced API to support multiple WIFI chips
Enhance the API to support multiple WIFI chips.
Each WIFI chip is represented by a separate and independent
vendor HAL library providing its own function table
(wifi_hal_fn structure).
New functions added to the function table in order to
better support multiple WIFI chips:
1. In the existing hardware/interfaces/wifi implementation,
WIFI chip modes and concurrency combinations are hard-coded.
Since each WIFI chip can have its own concurrency
combinations, it is no longer possible to hard-code the
modes/combinations.
Add new function wifi_get_chip_modes for reporting
chip modes/concurrency combinations. For backward compatibility,
if the vendor HAL does not implement this function,
the previous hard-coded chip modes and concurrency combinations
will be used.
2. In the existing hardware/interfaces/wifi implementation,
when creating a new interface, it will use a fixed name
such as wlan0 or wlan1. This does not extend well to
multiple WIFI chips, as different WIFI chips may want
to use their own interface names, or the suggested interface
name may have been pre-created by another chip.
In order to better support interface creation on multiple
WIFI chips, add a function wifi_get_supported_interface_name
that allows the vendor HAL to specify its own interface
name for upcoming interface creation. If the vendor HAL returns
an interface name, it should be passed to
wifi_virtual_interface_create to create the interface
with the provided name.
3. In the existing hardware/interfaces/wifi implementation,
wifi_initialize is only called when creating the first
interface (typically when enabling WIFI). However some
chips may want to perform early initialization and provide
some functionality while WIFI is still disabled. One example
is reporting chip-global capabilities that may affect
the UI even before WIFI is enabled.
In order to support this, add a new function
wifi_early_initialize which will perform early initialization.
The function should be called as soon as possible after
loading the vendor HAL, and if it returns a failure, the vendor
HAL should not be considered usable and no WIFI chip should
be created based on it.
4. In some cases it is needed to query chip features before
creating any interfaces. For example, for trying to start
a SoftAP on the 60GHz band, it is needed to detect a chip
which supports the 60GHz band, and only if such chip was detected,
then an AP interface can be created on it.
The wifi_get_supported_feature_set function only works on
a created interface so it is not suitable for this scenario.
To support such scenarios, add a new function
wifi_get_chip_feature_set which returns a set of chip-global
features which are independent of any created interface.

Bug: 146922967
Test: atest VtsHalWifiV1_0TargetTest VtsHalWifiNanV1_0TargetTest VtsHalWifiApV1_0TargetTest \
            VtsHalWifiV1_1TargetTest \
            VtsHalWifiV1_2TargetTest VtsHalWifiNanV1_2TargetTest \
            VtsHalWifiV1_3TargetTest \
            VtsHalWifiApV1_4TargetTest VtsHalWifiNanV1_4TargetTest VtsHalWifiRttV1_4TargetTest
Change-Id: If0b4934002c5687024c9fc2e65e15c466f94acd2
2020-08-11 14:18:39 +08:00
audio libaudiohw_legacy needs libaudioclient_headers 2019-10-08 09:41:33 -07:00
include Wifi: enhanced API to support multiple WIFI chips 2020-08-11 14:18:39 +08:00
Android.bp block_suspend: test util to block suspend from shell 2019-11-11 12:32:59 -08:00
block_suspend.cpp block_suspend: test util to block suspend from shell 2019-11-11 12:32:59 -08:00
CleanSpec.mk Fix incremental builds by adding Cleanspec step 2011-07-22 16:23:43 -07:00
METADATA Add METADATA to libhardware_legacy: Apache2=NOTICE 2020-05-01 10:03:37 -07:00
NOTICE auto import from //depot/cupcake/@135843 2009-03-03 19:32:14 -08:00
OWNERS libhardware_legacy: add trong to OWNERS 2018-10-22 15:19:45 -07:00
power.cpp libpower: RAII wake lock implementation 2019-06-26 13:01:39 -07:00
power_test.cpp libpower: RAII wake lock implementation 2019-06-26 13:01:39 -07:00
TEST_MAPPING DO NOT MERGE Demote libpower_test to postsubmit 2019-07-19 18:27:56 +00:00
uevent.c libhardware_legacy: Android.mk -> Android.bp 2017-04-14 16:05:25 +00:00