API can be used to query what modes (SAP, STA,
WFD Client, WFD Group Owner, TDLS, NAN) can be
supported on each channel for specified band.
Needs support from Wifi chip vendors.
Bug: 160212907
Test: VTS - VtsHalWifiV1_5TargetTest
Change-Id: Icf270b8c2ee14c794778421c9d988712c5c38380
Also fix the instances doesn't update after removing the instance
Cherry-pick from ag/13382534 which finished the review in master branch
Bug: 173999527
Test: atest -c VtsHalWifiApV1_5TargetTest
Change-Id: I439922d38c35b5367823f95f5f7d0e4c6ed05f57
This `if` is executed once, so using `legacy_status` from a prior
execution is nonsensical.
Caught by the static analyzer:
> hardware/interfaces/wifi/1.5/default/wifi_chip.cpp:1053:39: warning:
1st function call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]
Bug: 173999527
Test: atest -c VtsHalWifiApV1_5TargetTest
Merged-In: Ib81f1496be53e453d9c99ede129a77bdaf860de7
Change-Id: Ib81f1496be53e453d9c99ede129a77bdaf860de7
If Wi-Fi driver knows it's in scan-only mode, it can save more power
than connect mode.
This change adds setScanMode in IWifiStaIface to allow Wi-Fi framework
to notify scan-only mode change to Wi-Fi driver.
Bug: 177811719
Test: atest VtsHalWifiV1_5TargetTest
Change-Id: I1dfbc24a0a3272c1341223aff36656be4a6fd21b
Tested on S5 and O6.
Found VTS gets failure on wlan1
b/177389456 to track for O6
b/177483254 to track for S5
But both of O6 and S5 will get pass because it uses wlan0.
Bug: 162686273
Bug: 173999527
Test: atest -c VtsHalWifiHostapdV1_3TargetTest
Test: atest -c VtsHalWifiApV1_5TargetTest
Change-Id: Idbaa7fb2f95abc954fda8daf8670e4a57b453030
Country code is global setting across the Wifi chip
and not really Wifi interface (STA or AP) specific.
Framework should have the ability to set the country
code on a chip level without requiring supplicant
instance to be running. As long as there is at least
one active interface to communicate to kernel driver,
country code can be set and driver should apply the
setting globally.
Bug: 149936939
Test: VTS - VtsHalWifiV1_5TargetTest
Change-Id: I1be5dae34b216a6152d09605d055872d5345507c
The hal use first active wlan iface to get chip info.
It should should return active wlan instance in bridged mode.
Bug: 162686273
Test: Manual test.
1. Wifi Off (SAA off), make sure bridged AP is first wlan iface
2. Enable bridged mode
Change-Id: Id5a3d5ab53c6ed34d5633be22ad56070f5f0d0e2
Including the header inside a namespace leads to ODR violations,
which are normally benign but can cause problems if we want to use
something like CFI in the wifi HAL.
Change-Id: I80cc854632da7e18e5c208ba9210de44b31abbdb
Add custom enum for wifi coex restrictions since IfaceType is not
suitable for use as a bitmask flag since it does not represent bit
positions.
Bug: 153651001
Test: build
Change-Id: I15575ea12784a778a3b358eea1b05b75319aa95b
1. The concurrent property name over the limitation.
Rename the property name.
2. When allocate bridged iface name, it needs to increase the idx to
avoid two ifaces use the same name.
Bug: 162686273
Test: atest -c VtsHalWifiApV1_0TargetTest
Test: atest -c VtsHalWifiApV1_4TargetTest
Test: atest -c VtsHalWifiApV1_5TargetTest
Change-Id: I388cdd812bd0448c03ad5ae982547629c1e5eff9
Add HIDL APIs to convey a list of unsafe Wifi channels to the driver for
coex channel avoidance.
Bug: 153651001
Test: build
Change-Id: I8b14f0e2d8855c1f1e363d612617256d8e928f30
SAP Interface idx mechanism.
STA+STA support, AP+AP will use wlan2 & wlan3, single AP use wlan2
STA+STA doesn't support, AP+AP use wlan1 & wlan 2, single AP use
wlan 1
STA+AP doesn't support, AP + AP will take wlan0 & wlan 1 but single AP
use wlan0 (Ideally it should not happen)
Add predefine interface support for bridged AP interface.
(property: ro.vendor.sap.concurrent.interface)
PS: Rename: getApIfaceName to getPredefinedApIfaceName since it
duplicates public HAL API: getApIfaceName
AP+AP Part 4 includes:
1. Support API to indicate Bridged AP supported or not
2. SAP Interface idx mechanism.
Bug: 162686273
Bug: 173999527
Test: atest -c VtsHalWifiApV1_0TargetTest
Test: atest -c VtsHalWifiApV1_4TargetTest
Test: atest -c VtsHalWifiApV1_5TargetTest
Change-Id: I115e294ac2be201cfa3a58cfa0a8a98b481b29de
Support HAL API:resetToFactoryMacAddress to reset the MAC
to factory MAC on each instances in IWifiApIface.
AP+AP Part 3 includes:
1. Support resetToFactoryMac in IWifiApIface.Hal.
2. Vts support for non bridged API.
3. Framework support resetToFactoryMac in bridged Ap.
Test: atest -c VtsHalWifiApV1_5TargetTest
Test: atest -c VtsHalWifiApV1_4TargetTest
Test: atest -c VtsHalWifiApV1_0TargetTest
Bug: 162686273
Change-Id: Ic7f2c0d6f1d8bf46fabfbc874d5f2b74068e43cc
If dumpstate closes the reading end of the pipe (likely due to timeout)
and wifi vendor hal attempts to write to the fd it received from
dumpstate, it will receive sig 13 (SIGPIPE), and is then killed.
We should protect wifi vendor hal from the abnormally behaved clients.
Sync patch from ag/12321138. Reference from b/172972545 &
b/161336019#comment29
Bug: 161336019
Bug: 172972545
Test: Manuel Test, Wifi works normally
Change-Id: Ie7de040ac4320f83500c18e74e3c58d63b4df1b7
The bridge interface name will take "ap_br_" + ap interface name.
ex: The ap interface name is "wlan1".
The bridge interface name will be "ap_br_wlan1"
When OEM customize the ap interface name via property
"ro.vendor.wifi.sap.interface".
It will only apply on single AP mode.
i.e.
"ro.vendor.wifi.sap.interface" = "sap0"
Single AP mode: ap interface name = "sap0"
Dual AP mode:
bridge interface name = "ap_br_sap0"
first ap instance name: get from "getSupportedIfaceName" + idx
ex: sap0
second ap instance name: get from "getSupportedIfaceName" + idx + 1
ex: sap1
PS: The VtsHalWifiApV1_5TargetTest will be added in another CL which
will update another SAP related HAL:IWifiApIface.hal.
AP+AP Part 2 includes:
1. Support bridge in libwifi_system_iface
2. WifiHal API
a. createBridgedApIface (Support create bridge mode AP)
b. removeIfaceInstanceFromBridgedApIface (Support remove one of the instance in bridge)
3. Framework:
Create bridge AP when multi-bands configured.
Bug: 162686273
Test: Manual Test (SAP enable normally)
Test: atest -c VtsHalWifiApV1_0TargetTest
Test: atest -c VtsHalWifiApV1_4TargetTest
Change-Id: I8be510778e9772bcf1539e4915384949cbe13127
AP+AP Part 2 includes:
1. Support bridge in libwifi_system_iface
2. WifiHal
a. createApIface_1_5 (Support create bridge mode AP)
b. removeApIface_1_5 (Support remove one of the instance in bridge)
3. Framework:
Create bridge AP when multi-bands configured.
Bug: 162686273
Test: Manual Test (SAP enable normally)
Change-Id: I518417add566ce4780a7e2e83af14460e6e8a217
This will be useful for testing/debugging STA + STA & AP + AP feature.
Note: I originally planned to read the entire iface combination from the
property (i.e would be much more flexible), but that is way too complex
and error prone. So, instead pre-define some combinations that we would
want to switch between and use the property as an index.
Bug: 173044646
Test: Manual:
i) adb shell "/vendor/bin/sh -c '/vendor/bin/setprop
persist.vendor.debug.wifi.hal.preset_interface_combination_idx 0'"
ii) adb reboot
iii) Ensure that AP + AP was enabled.
Change-Id: Iea63835c39fce78307a056a5ed94efcbd35cdfb6
Add a new chip capability WIGIG, for chips that
can operate on the 60GHz band. This capability is
mapped to the vendor HAL feature WIFI_FEATURE_INFRA_60G.
Bug: 147522435
Test: atest VtsHalWifiV1_0TargetTest VtsHalWifiNanV1_0TargetTest VtsHalWifiApV1_0TargetTest \
VtsHalWifiV1_1TargetTest \
VtsHalWifiV1_2TargetTest VtsHalWifiNanV1_2TargetTest \
VtsHalWifiV1_3TargetTest \
VtsHalWifiApV1_4TargetTest VtsHalWifiNanV1_4TargetTest VtsHalWifiRttV1_4TargetTest
Change-Id: I37b1121c62acadb621dca5e38671c78817f592e1
The wifi hidl interfaces need apex_available: ["com.android.wifi"]
because the generated java interfaces are needed by the
com.android.wifi apex, but that causes the C interfaces to not
be available to the platform. The unavailability was hidden
by b/154888298. Explicitly mark them with "//apex_available:platform".
Bug: 154888298
Test: m checkbuild
Change-Id: I8959ec1454cce6817802bcc1785a34ba56adc99c
The file last modified time expressed in seconds from epoch is
attached to only the archived version of the file that is passed
to dumpstate.
Files stored on the device will still have no timestamp in their name.
Bug: 159808285
Test: manual verification
adb root
adb shell lshal debug android.hardware.wifi@1.5::IWifi >> archive.cpio
cpio -iv < archive.cpio
Verify that a timestamp is attached to the filename at the end:
connectivity_events_rbhOVjYpDdNY-1597364258
Change-Id: Iee0c2b37fc1d27cb979ec9125461416cd2d02549
The WIFI HAL API has support for multiple WIFI chips
(IWifiChip instances) however the implementation
is hard-coded to support only a single WIFI chip.
This change reworks the implementation so multiple
WIFI chips will be supported.
Support for multiple chips is based on the concept
that each chip is represented by its own vendor HAL
library.
The implementation will look for descriptor
files for vendor HAL libraries under
/vendor/etc/wifi/vendor_hals. It will parse
descriptors, dynamically load vendor HAL libraries
and create WifiLegacyHal and WifiChip objects for
each loaded vendor HAL library.
One of the descriptors should be marked with "primary"
flag. The implementation will create the first WifiChip
object for this library. Typically it is the one
providing the best WIFI functionality, which was
previously used as the only WIFI chip.
Additional support is added inside WifiChip and
WifiLegacyHal for getting available chip modes
and concurrency combinations from the vendor HAL
if available, and allowing the chip to override
network interface name when creating interfaces.
The mechanism for getting chip capabilities is
improved to allow getting chip-global capabilities,
which are independent of any created interfaces.
For example, if the framework needs to start
a SoftAP on the 60GHz band, it needs to find a
chip which supports this band, but before creating
any interface on the chip. The new mechanism allows
this.
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: Ibdff93ea56aff186d4b5361ac77f6f448a0dfd45
In WifiChip::invalidateAndRemoveDependencies, the
iterator was not implemented correctly as it was
deleting objects while iterating. This could cause
the entire WIFI HAL to be restarted when disabling
WIFI.
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: Id86f1a662684467d3b86a79b271144ac3055d0a0
Forces ringbuffer updates before writing zipped files to bugreport.
Also properly resets the ringbuffer callback when it's deregistered.
Bug: 161307741
Test: make vts -j64 && vts-tradefed run commandAndExit vts --module VtsHalWifiV1_0Target
Test: manual verification with triggering a bugreport
Test: manual verification with wifi toggles
Change-Id: I74deffda917054e20cfcf4f0dd90d778626c89d3