Commit graph

1177 commits

Author SHA1 Message Date
Kumar Anand
da62c38e58 Wifi: Chip level API to set the country code
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
2021-01-12 18:12:53 -08:00
Les Lee
3ee69a6186 Merge "wifi: Fix VTS error" 2020-12-23 03:30:21 +00:00
lesl
143575a10c wifi: Fix VTS error
The current hostapd use channelParams1_3.bandMask
(changed on ag/13001575), but VTS doesn't
prepare test data:channelParams1_3.bandMask.

Test: atest VtsHalWifiHostapdV1_3TargetTest
Test: atest VtsHalWifiHostapdV1_2TargetTest
Test: atest VtsHalWifiHostapdV1_1TargetTest
Test: atest VtsHalWifiHostapdV1_0TargetTest
Bug: 176139512
Change-Id: Ibdc08acb55b673b464b5c59ae714157941487a5b
2020-12-22 15:19:58 +08:00
TreeHugger Robot
254b3632a9 Merge "Add voip optimization HAL API" 2020-12-22 01:29:34 +00:00
Kai Shi
2ca7a11810 Add voip optimization HAL API
Test: compilation and halutil test
Bug: 166311728
Change-Id: I3173e733abe158e1b009ed8378d1963ca3b8b8e8
2020-12-17 14:15:12 -08:00
TreeHugger Robot
e898720840 Merge changes from topic "fixCoexRestrictions"
* changes:
  Add VTS test for IWifiChip::setCoexUnsafeChannels
  [WifiCoex] Add enum for wifi coex restrictions
2020-12-17 00:16:11 +00:00
Sunil Ravi
de9e202ef2 Merge "wifi: Added 2 seconds wait time in RTT tests" 2020-12-16 16:22:56 +00:00
Quang Luong
26cd156744 Add VTS test for IWifiChip::setCoexUnsafeChannels
Bug: 153651001
Test: atest VtsHalWifiV1_5TargetTest
Change-Id: Iaffbff3cf68b00572674ca423587387ef6569302
2020-12-16 05:05:57 +00:00
Sunil Ravi
4c7c64e7fd wifi: Added 2 seconds wait time in RTT tests
Added 2 seconds delay in RTT tests. This helps drivers finish the
current test and process the next test.

Bug: 175605811
Test: VTS test - VtsHalWifiRttV1_4TargetTest
Change-Id: I3bb719b5b75ba960913bd405b2c8a41047689682
2020-12-15 16:57:29 -08:00
Quang Luong
ab70a83b05 [WifiCoex] Add enum for wifi coex restrictions
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
2020-12-15 09:43:36 -08:00
lesl
5a46c958e2 wifi: Fix bridged interface property and allociation
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
2020-12-14 17:17:44 +08:00
Jimmy Chen
ed0d49d277 Merge "hostapd: add 60GHz(WiGig) support" 2020-12-12 04:26:03 +00:00
Quang Luong
94bcce5ec2 [WifiCoex] Add WifiChip HIDL APIs for coex
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
2020-12-08 00:31:11 +00:00
Les Lee
334057470d Merge "wifi: Add AP interface idx mechanism & predefine interface support." 2020-12-04 06:43:34 +00:00
Colin Cross
b0a9ef07bb resolve merge conflicts of 9e1ee9bb30 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: Iad05fce7dfa8832ed7c62326a908ab52b05268e0
2020-12-03 14:35:26 -08:00
Roshan Pius
3e6084c05d Merge "wifi: Prevent returning an invalid factory MAC address" am: 6119f16921
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1496341

Change-Id: Ic8ad496bdee5d96f46bf3de63e1131bf84ee7581
2020-12-03 20:05:19 +00:00
Roshan Pius
6119f16921 Merge "wifi: Prevent returning an invalid factory MAC address" 2020-12-03 18:51:08 +00:00
lesl
261818bfaf wifi: Add AP interface idx mechanism & predefine interface support.
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
2020-12-03 15:17:45 +08:00
Xin Li
8ac301f5f1 Merge "Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855" into stage-aosp-master 2020-12-03 03:19:13 +00:00
Les Lee
9135ee103e Merge "wifi: Add resetFactoryMac support (AP+AP Part 3)" 2020-12-03 03:09:38 +00:00
Ye Jiao
bf8f310071 DO NOT MERGE: Tune up kMaxStopCompleteWaitMs to fix NE
On a low-end device which does not support STA-SAP concurrency, if STA
is currently enabled and user/app tries to enable SAP, then Wi-Fi needs
to reconfigure and stop Wi-Fi HAL first. Among other stopping actions,
HAL needs to set global_handle_ to nullptr and send "Exit" to
wifi_event_loop then waits no more than kMaxStopCompleteWaitMs. If the
wait times out, then reconfiguration fails and causes Wi-Fi controller
returns to STA mode and creates new STA iface indirectly. In this
process, HAL needs to access global_handle_, but since it was cleared,
we can only get a Native Exception.

Because there is no proper error recovery for UNKNOWN errors, I suggest
to simply set kMaxStopCompleteWaitMs to a higher value to circumvent
this timing issue.

Bug: 173760638
Change-Id: I1b5a0a7a554409704c017ffaf52a767b9424c61e
2020-12-02 17:44:49 +00:00
Xin Li
c026d3a0b6 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: If5afd00334e8b09250df1ae97dec9285e39ad930
Change-Id: Ic66bb1389f1bbecfdaa641e1fcdbf79044f55d23
2020-12-02 00:32:27 -08:00
TreeHugger Robot
d4f4cb8a82 Merge "wifi: ignore SIGPIPE when dumping stats to dumpstate" 2020-12-02 04:51:43 +00:00
lesl
420c4fc3a7 wifi: Add resetFactoryMac support (AP+AP Part 3)
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
2020-12-02 10:00:15 +08:00
Les Lee
9dffd373ea Merge "wifi: Add AP bridge operations support (AP+AP Part 2)" 2020-12-01 00:05:16 +00:00
Sunil Ravi
f14d9a0f8e Wifi: DPP STA Enrollee-Responder mode
Added below HIDL APIs for DPP STA Enrollee-Responder mode
1. API to start DPP in Enrollee-Responder mode
2. API to generate DPP bootstrap URI
3. API to stop DPP in Enrollee-Responder mode
which internally remove the bootstrap and stop listen.

Bug: 162686712
Test: VTS test
Change-Id: I979b6a7a2fe90f48d478f48da73269fd3f5cb347
2020-11-30 09:29:31 -08:00
lesl
75915c3134 wifi: ignore SIGPIPE when dumping stats to dumpstate
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
2020-11-30 19:09:31 +08:00
lesl
94d2824a66 wifi: Add AP bridge operations support (AP+AP Part 2)
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
2020-11-23 18:57:22 +08:00
Jimmy Chen
becd2f136b wifi: fix old vts tests on newer HAL
Older registerCallback is not deprecated until V1.4 HAL correctly.
As a result, their returning codes are still SUCCESS.

Bug: 173570755
Test: atest VtsHalWifiSupplicantV1_0TargetTest \
            VtsHalWifiSupplicantV1_1TargetTest \
            VtsHalWifiSupplicantV1_2TargetTest
Change-Id: Ib23821d64f53c144d74818fa3ed9aca06cd25a27
2020-11-20 01:45:55 +08:00
lesl
c92aa85a6e wiif: Add AP bridge operations support (AP+AP Part 2)
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
2020-11-17 14:12:01 +08:00
Jimmy Chen
a67701d0d0 hostapd: add 60GHz(WiGig) support
Extend the band with 60GHz constant to support starting
AP on the 60GHz band.
Add channel parameters for EDMG (802.11ay, 60GHz channel
bonding).

Bug: 147469374
Test: atest VtsHalWifiHostapdV1_3TargetTest
Change-Id: I8d3ca0c14766dfb4a79c1febcc2bb05f65ba311e
2020-11-15 00:37:06 +08:00
Treehugger Robot
f4c82a843f Merge "supplicant(vts): Skip p2p tests on non-p2p devices as intended" am: f19e282226 am: c9f4cc376d am: 119d863efa am: bfcb424813
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497700

Change-Id: Ie68f4455a82435d73f47af315237713e6c10511f
2020-11-14 07:29:53 +00:00
Treehugger Robot
bfcb424813 Merge "supplicant(vts): Skip p2p tests on non-p2p devices as intended" am: f19e282226 am: c9f4cc376d am: 119d863efa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497700

Change-Id: Ica406a4de8dfb04c093d3227a71e860e8727e720
2020-11-14 07:18:37 +00:00
Treehugger Robot
119d863efa Merge "supplicant(vts): Skip p2p tests on non-p2p devices as intended" am: f19e282226 am: c9f4cc376d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1497700

Change-Id: I2d5be618227828a815867144c1e29c826ba3c2ab
2020-11-14 07:04:59 +00:00
Roshan Pius
5c9ad33f9a Merge "wifi(hal): Use debug property to select one of preset HAL iface combination" 2020-11-13 19:32:16 +00:00
Roshan Pius
2272ff8942 wifi(hal): Use debug property to select one of preset HAL iface combination
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
2020-11-12 19:06:12 -08:00
Jerry Wong
a0e13d6060 supplicant(vts): Skip p2p tests on non-p2p devices as intended
The logic to skip the p2p tests on non-p2p devices appear to have
inadventently flipped since d6436731.

Bug: 173134041
Test: atest VtsHalWifiSupplicantV1_1TargetTest
Change-Id: I7945950e8483241e47e308a2c5ad97571d74a769
2020-11-12 15:01:24 -08:00
TreeHugger Robot
4c219071e8 Merge "wifi: fix old vts tests for deprecated APIs" 2020-11-12 20:55:49 +00:00
Alessandro Astone
40e57ca717 wifi: Prevent returning an invalid factory MAC address
This is the same error checking already done in wifi_ap_iface.cpp

Change-Id: I2183e6ec13a15141dc638dc8d68fda6b3afa5aa4
2020-11-11 18:41:35 +01:00
TreeHugger Robot
cfd0577486 Merge "wifi: Fix incorrect instance version" 2020-11-11 05:03:54 +00:00
Jimmy Chen
06c9863d80 wifi: fix old vts tests for deprecated APIs
Bug: 172865706
Test: atest VtsHalWifiSupplicantV1_0TargetTest \
            VtsHalWifiSupplicantP2pV1_0TargetTest \
            VtsHalWifiSupplicantV1_1TargetTest \
            VtsHalWifiSupplicantV1_2TargetTest \
            VtsHalWifiSupplicantP2pV1_2TargetTest \
            VtsHalWifiSupplicantV1_3TargetTest \
            VtsHalWifiSupplicantV1_4TargetTest \
            VtsHalWifiSupplicantP2pV1_4TargetTest
Change-Id: Icc502cae18338606a98ada312e9a66a5b11f51db
2020-11-11 11:06:20 +08:00
Oscar Shu
95ddd00d03 Merge "VTS - avoid same MAC for AP and STA" 2020-11-10 21:40:10 +00:00
xshu
a45dd5802a VTS - avoid same MAC for AP and STA
Having the AP and STA set the same MAC address in tests could cause
unintended failures when WifiApIfaceHidlTest and WifiStaIfaceHidlTest
are executed back to back.

Bug: 172528120
Test: atest VtsHalWifiApV1_4TargetTest VtsHalWifiV1_2TargetTest

Change-Id: I336d21cd896c46b064f16ecfa184a26dab67deaa
2020-11-09 18:37:36 -08:00
lesl
a6c5b8c573 wifi: Fix incorrect instance version
The vts use getAidlInstances to check current HIDL version whether or not
exist in the device manifests.
When there are no instances installed, the suite won't be instantiated

Test: atest -c VtsHalWifiHostapdV1_3TargetTest in S GSI + R build
Bug: 172539662
Change-Id: Ia268282eeeb53a092bb5f36ef0426ac213b45a9f
2020-11-09 17:54:16 +00:00
TreeHugger Robot
ccf7517de7 Merge "wifi: add enable SAE PK only mode API" 2020-11-06 20:04:15 +00:00
Roshan Pius
734be98c77 Merge "wifi: Add STA + STA HIDL API's" 2020-11-06 19:57:44 +00:00
Roshan Pius
e9d1e7d384 wifi: Add STA + STA HIDL API's
Add the HIDL API's + shim + VTS tests.

Bug: 170305665
Test: atest VtsHalWifiV1_3TargetTest VtsHalWifiV1_5TargetTest
Change-Id: I26ada11aebfe8082bfda251cf7e6990e0aa08a06
2020-11-06 11:54:51 -08:00
Jimmy Chen
7e792611bb wifi: add enable SAE PK only mode API
Bug: 160642415
Test: atest VtsHalWifiSupplicantV1_4TargetTest
Change-Id: I9e9fe69bf5ebc1127085b568f02f44a2ab1b08af
2020-11-06 11:04:53 +08:00
Hai Shalom
8bdc3db2d3 Merge "Add HAL support for Passpoint venue URL" 2020-11-05 22:57:36 +00:00
Hai Shalom
349bc58cb4 Add HAL support for Passpoint venue URL
Bug: 162783305
Test: atest VtsHalWifiSupplicantV1_4TargetTest
Change-Id: I46e8e6a97c860236129d6761a11946a174985787
2020-11-04 18:51:04 -08:00