Commit graph

52 commits

Author SHA1 Message Date
Gabriel Biren
cd6da07327 Add a new utility class wifi_hidl_test_utils_1_6
for the Wifi VTS tests.

Main method is getBridgedWifiApIface_1_6, which
allows us to configure the chip based on the
Bridged AP IfaceConcurrencyType, rather than
the AP IfaceType like in getBridgedWifiApIface_1_5.

Implementations were largely copied from
wifi_hidl_test_utils and wifi_hidl_test_utils_1_5.

Bug: 283402709
Test: atest VtsHalHostapdTargetTest
       # tested on a Bluejay device that supports
       # the AddAccessPointWithDualBandConfig test
Change-Id: I2571876149fc14c8de02e1cec9934dd052cada5c
2023-06-05 22:52:52 +00:00
Gabriel Biren
6eafc23dcf Skip HIDL v1.6 RTT responder VTS tests if the
capabilities do not indicate responder support.

Bug: 280550766
Test: atest VtsHalWifiRttV1_6TargetTest
Change-Id: I4e76a874837c6199b2bef65b3f0c138260972b4a
2023-05-08 18:29:10 +00:00
Gabriel Biren
7b65166e33 Remove HIDL implementation for the WiFi
Vendor HAL.

Bug: 274964641
Test: Treehugger builds.
Change-Id: I0198870790077f1ca03c663d58aac53eb4a64b83
2023-04-06 21:01:59 +00:00
Ye Jiao
2dc47ca925 Add config to skip state toggle off/on for Wi-Fi NAN
If STA and NAN share the same iface wlan0, Wi-Fi vendor HAL service
sends eventDisabled to NAN framework when STA setMacAddress to wlan0.
This disables NAN when STA is turned on.

Since NAN always uses its own random MAC instead of using MAC of STA,
this action is not necessary and gets NAN kicked off for no benefits.

We add a build time configuration to optionally disable this behavior.

Bug: 273426515
Test: manually test

Change-Id: Ifc71b7e8d09eac1b66b9e18c70e0e6d202683ff6
2023-03-21 18:13:18 +00:00
dheda.shin
4e64494db1 Patch for VTS am: 93945c1d25 am: f21272df98 am: fa18198274
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2473685

Change-Id: Iacf79dbb5321a9ba21b96f797d1647e7b0017324
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 03:06:43 +00:00
dheda.shin
93945c1d25 Patch for VTS
we changed to store event information in bitmap format
so that overlapping events can be handled.

Bug: 270650316
Test: startPublishRequest_1_6
Change-Id: I6f3cb8026d54dfa692bfd6eb64b24005ba663a1f
Signed-off-by: dheda.shin <dheda.shin@samsung.com>
2023-03-07 13:45:47 +09:00
Nate Jiang
7a7fd84ce2 Create a snapshot of the hardware_legacy
Create a snapshot of hardware_legacy for legacy HIDL, to avoid any build breakage due to new hardware_legacy for the new AIDL. Should be removed with the HIDL when we finish the switch

Bug: 205044134
Test: build and CtsWifiTest

Change-Id: Ib1068112f6c90f2a41b68e20027d959c95798120
2022-12-08 09:38:52 -08:00
Gabriel Biren
631a8118d7 Revert "Convert vendor HAL service to use new AIDL interface."
This reverts commit e58e263bce.

Reason for revert: Blocking Wembley team

Change-Id: I3cf471e88b880a95a0a2c39f47fb0804deee65cf
2022-12-01 22:29:32 +00:00
Gabriel Biren
e58e263bce Convert vendor HAL service to use new AIDL interface.
Bug: 205044134
Test: Pass AIDL VTS tests and regression tests.
Change-Id: I286ffbf67efddc6c34d34ebd9e9bd9f36139c962
2022-11-28 18:29:23 +00:00
kensun
a7e0a83c0e Add HAL APIs to query cached scan results
Add HAL API to retrieve the on-chip scan results.

Bug: 232030878
Test: New API works fine
Change-Id: I159aec819959e4ad020ee0d44c8110fe34d451b0
2022-11-10 02:26:50 +00:00
Etan Cohen
742354a2a4 Merge "Coalesce OWNERS" am: c1c823a9c1 am: 01c4d7fc07 am: d84cfa698b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2260625

Change-Id: I6f97891fbf8069fdbe3f65be1f2848f6ec648ce3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-22 19:54:55 +00:00
Etan Cohen
b65ff31684 Coalesce OWNERS
Bug: N/A
Test: N/A
Change-Id: Ia603a0cc323e65903f8de6a04ce1dd82407f012d
2022-10-19 04:06:09 +00:00
Kenn Frankel
22f5a24b17 Merge "AOSP counterpart of wifi hal apex" am: 2b49939f33 am: fad5dead0f am: 763c1896ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2239855

Change-Id: I35e09988ea1a8fceb6de20e31e731261e0d4c4c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-14 02:56:05 +00:00
Kenn Frankel
e85de1d957 AOSP counterpart of wifi hal apex
Bug: 247018693
Test: CtsWifiTestCases
Change-Id: I5deb95b4cc0c1075f65bc809ca256df91ce9a9bb
2022-10-07 22:13:38 +00:00
Les Lee
3ba02e052b wifi: Two AP instances use the same interface name
When device supports two AP interfaces (i.e. {AP, 2}. not a bridged case),
the AP interface name might be observed from the getPredefinedApIfaceNames.
Check if the interface name is used or not when creating a new interface.

Bug: 244387442
Test: Manual test by commands
adb shell cmd wifi start-softap tetheredAp open -b 2
adb shell cmd wifi start-lohs lohs open -b 5

Change-Id: I59b3796895ee09452a9650c4dc138ad9e143282e
2022-09-08 02:02:22 +00:00
Treehugger Robot
08f3ea9e97 Merge changes from topic "cp-libwifihal-soong"
* changes:
  Build libwifi-hal-* modules only for the first arch
  android.hardware.wifi@1.0-service in soong
2022-08-22 02:30:56 +00:00
donghongweng
3e559f9c05 Fix unqualified-std-cast-call compiler warning am: f533ccb14e am: e3b2140f84 am: 930c93ed76 am: 599f7c0175 am: fd470c4c62
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2184585

Change-Id: I37a50edec8e523ca4ed68e8b5534248670de72f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 07:45:20 +00:00
donghongweng
f533ccb14e Fix unqualified-std-cast-call compiler warning
Test: m
Change-Id: I403ce701846a3d3582e1dfa5557fe981e86f2140
2022-08-17 15:49:59 +08:00
Jiyong Park
46afe63eaf Build libwifi-hal-* modules only for the first arch
Previously, the build rules assumed that the target supports both 64 and
32 bit architectures, which isn't true for 32-bit-only targets. That
caused build breakage on such targets. Fixing that by building the
modules only for the first architecture (64 on 64-only or 64/32 target,
and 32 on 32-only target).

Bug: 241916304
Test: build the 32-bit-only target
Merged-In: I5353ab1561622eae12e2dff87eb0f17b47c3773d
Change-Id: I5353ab1561622eae12e2dff87eb0f17b47c3773d
(cherry picked from commit 3ab5c90104)
2022-08-17 16:41:19 +09:00
Jooyung Han
1e6cdac0bc android.hardware.wifi@1.0-service in soong
As libwifi-hal is migrated to soong, the service is migrated to soong as
well.

Bug: 240099735
Test: CtsWifiTestCases
Merged-In: Ie5a4ec6658d5f6aa3d4902c9c3c4b3bef9ff1cde
Change-Id: Ie5a4ec6658d5f6aa3d4902c9c3c4b3bef9ff1cde
(cherry picked from commit c4ac3355a6)
2022-08-17 16:41:10 +09:00
Jiyong Park
3ab5c90104 Build libwifi-hal-* modules only for the first arch
Previously, the build rules assumed that the target supports both 64 and
32 bit architectures, which isn't true for 32-bit-only targets. That
caused build breakage on such targets. Fixing that by building the
modules only for the first architecture (64 on 64-only or 64/32 target,
and 32 on 32-only target).

Bug: 241916304
Test: build the 32-bit-only target
Change-Id: I5353ab1561622eae12e2dff87eb0f17b47c3773d
2022-08-12 13:42:56 +09:00
Jooyung Han
c4ac3355a6 android.hardware.wifi@1.0-service in soong
As libwifi-hal is migrated to soong, the service is migrated to soong as
well.

Bug: 240099735
Test: CtsWifiTestCases
Change-Id: Ie5a4ec6658d5f6aa3d4902c9c3c4b3bef9ff1cde
2022-07-25 17:53:35 +09:00
Sunil Ravi
07ef191b5a wifi: Clear ring bufffers on detecting buffer corruption
While appending the newly received buffer to ring buffer list,
check the size of the first buffer in the ring buffer list.
If it is invalid(zero size or exceeding the max allowed size),
return failure & clear all the ring buffers.

Bug: 232477451
Test: vts test - 1.6/default/tests/runtests.sh
Test: Manual - Ran basic wifi tests & checked bugreports

Change-Id: Iaa41262f534914b971fe178053f1974248a46e70
2022-05-23 11:20:57 -07:00
TreeHugger Robot
1fd86d9b89 Merge "Check and catch the callback transaction error" into tm-dev 2022-04-28 02:10:35 +00:00
Nate Jiang
95939ed300 Check and catch the callback transaction error
Bug: 230277359
Test: vts VtsHalWifiRttV1_6TargetTest
Change-Id: Ibcccd0d60d6907c95cfa95c0e55501248bc65e4b
2022-04-25 13:08:38 -07:00
Isaac Chiou
52afeb68e3 Add HAL APIs for TX power limits
To lower the instantaneous battery current draw of WiFi, we provide
a way to allow PowerManager to enable/disable Tx power limits.
In the legacy HAL, we call the API in Broadcom HAL to
enable/disable WiFi TX power limits.

Bug: 215193418
Test: New APIs work fine
Change-Id: I1fbe71c3380514e2eba96adc5902d2028a55e006
2022-04-21 11:20:44 +08:00
Les Lee
3adf36824f Merge "wifi: Fix single AP iface isn't deleted" into tm-dev 2022-04-15 01:23:55 +00:00
Les Lee
5f29a4d847 wifi: Fix single AP iface isn't deleted
Bug: 222599182
Test: Manual Test, the AP iface is deleted.
Change-Id: I07faf0afcd1f69af4ef57204ceac02c2572453f2
2022-04-12 07:35:53 +00:00
Sunil Ravi
b51d11fb6d Merge "wifi: Fix for returning wrong radio combinations matrix" into tm-dev 2022-04-07 03:03:58 +00:00
Sunil Ravi
25c8c53725 wifi: Fix for returning wrong radio combinations matrix
Allocate memory in heap for carrying radio combinations matrix
from driver/firmware to wifi HAL.

Bug: 225764376
Bug: 225762955
Test: atest WifiChipHidlTest

Change-Id: I1049f7ab9f16a35a87b7cda34ba31797fde046e3
2022-04-06 05:32:27 -07:00
Gabriel Biren
11d4ab8f61 Replace instances of strncpy and sprintf in the wifi
vendor HAL with strlcpy and snprintf.

Bug: 218897284
Test: m
Change-Id: I0a62d1c5043cabcf6a513b8b082ad1d7a1ea451c
2022-03-31 00:10:29 +00:00
Nate Jiang
76dd9336ad [VTS] test new API with success result
Bug: 222654265
Test: atest VtsHalWifiNanV1_6TargetTest
Change-Id: I2e25ddafa4bf9caf0110a35f328330329fab8581
2022-03-15 16:41:21 -07:00
Sunil Ravi
5cfd323e13 wifi: VTS test for getSupportedRadioCombinationsMatrix
This change added,
1. VTS test for getSupportedRadioCombinationsMatrix()
2. Skip test for getUsableChannels_1_6 if vendor doesn't
support

Bug: 220201314
Bug: 221389141
Bug: 220225758
Test: atest WifiChipHidlTest
Change-Id: I5ddbd4be68d74f1fa26584c94d5b10211261cc1a
2022-03-01 20:42:23 +00:00
Nate Jiang
d7bad8cf80 [VTS] Add test for new HAL API
Bug: 220222961
Test: vts VtsHalWifiNanV1_6TargetTest
Change-Id: Ibcc4cc00c21e553a68bb69946497acad79b273f3
2022-02-28 15:57:13 -08:00
Quang Luong
25dc0afe39 Merge "Add VTS test for V1_6::IWifiChip::getAvailableModes_1_6" into tm-dev 2022-02-25 15:51:02 +00:00
Chris Ye
89b3de718d Change the expected AP iface index when dual STAs supported.
When the HAL support dual STAs, AP should start with idx 2.

Bug: 220338166
Test: atest -c android.hardware.wifi@1.0-service-tests
Change-Id: Ic3780ea346417cf878b94e4ead8fc3eff22baf8f
2022-02-23 15:54:06 -08:00
Quang Luong
6bdc75249b Add VTS test for V1_6::IWifiChip::getAvailableModes_1_6
Bug: 220222963
Test: atest VtsHalWifiV1_6TargetTest
Change-Id: I76908ae0e69f8e1b07a654062b1bd0122e0dd910
2022-02-23 11:27:31 -08:00
Jimmy Chen
1cfe081491 wifi: fix NULL pointer in unit tests
getSupportedIfaceName() should be mocked to avoid
NULL pointer exception.

Bug: 217267980
Test: atest android.hardware.wifi@1.0-service-tests
Change-Id: I97a9cb8430ea77a6fe068f20586ab27df9291400
2022-02-18 09:21:48 -08:00
Ahmed ElArabawy
b2c8852cba Wifi: Add VTS tests for Vendor HAL 1.6
This commit adds the VTS tests for the Wifi Vendor HAL 1.6

Bug: 220014236
Test: atest VtsHalWifiV1_6TargetTest
Test: atest VtsHalWifiNanV1_6TargetTest
Test: atest VtsHalWifiRttV1_6TargetTest
Change-Id: Id9f034c25029ef7a7f437185082abef67776ac8f
2022-02-18 08:54:31 -08:00
Quang Luong
6d66167031 Reinstate functionality of IWifiChip.getAvailableModes()
IWifiChip.getAvailableModes() is needed as a dependency for VTS tests.
Reinstate the API to avoid breaking old tests, ignoring the new
AP_BRIDGED concurrency type.

Bug: 219617823
Test: atest VtsHalWifiV1_0TargetTest VtsHalWifiV1_1TargetTest
VtsHalWifiV1_2TargetTest VtsHalWifiV1_3TargetTest
VtsHalWifiV1_4TargetTest VtsHalWifiV1_5TargetTest

Change-Id: Ide5b251b20f1ea56a76c2ce3b04c4e28fc29624c
2022-02-18 08:51:34 -08:00
Quang Luong
5d8805e25a Add IfaceConcurrencyType and related methods for AP_BRIDGED concurrency
Add IfaceConcurrencyType to represent Iface implementations that
have different concurrency implications for the same IfaceType, such as
Bridged AP and Single AP for IWifiApIface. Add a new IWifiChip HAL API,
getAvailableModes_1_6 to return the new concurrency type combos.

Bug: 207055799
Test: 1.6/default/tests/runtests.sh
Change-Id: Iad20a3d95d54dd8b624db912fd3153c2a3372f45
2022-02-08 09:54:00 -08:00
Isaac Chiou
9cf44590f2 Add HAL APIs for WiFi CHRE NAN RTT
1. Add new APIs to enable/disable CHRE NAN RTT
2. Add a new API to register callback.
   This callback should report events from WLAN driver for CHRE.

Test: New APIs work fine
Bug: 206614765
Change-Id: I8c8ab002064a9556be2e7d3972703bb3255a3a41
2022-01-29 07:27:01 +08:00
Sunil Ravi
ef97d23f88 wifi: Get the supported radio combinations matrix
Added API to get the supported radio combinations
of the chip. This is mainly to check if the chip is
capable of multi band simultaneous operation.

For Example in case of a chip which has two radios, where one radio is
capable of 2.4GHz 2X2 only and another radio which is capable of either
5GHz or 6GHz 2X2, number of possible radio combinations in this case
are 5 and possible combinations are:
    {{{2G 2X2}}, //Standalone 2G
    {{5G 2X2}}, //Standalone 5G
    {{6G 2X2}}, //Standalone 6G
    {{2G 2X2}, {5G 2X2}}, //2G+5G DBS
    {{2G 2X2}, {6G 2X2}}} //2G+6G DBS

Bug: 208877624
Test: vts test
Change-Id: I4c90f80002ca138133a575bca80dfdef2a593ab2
2022-01-26 23:18:37 -08:00
Greg Kaiser
51c7bd47ab Wifi: Remove premature 'return'
We want to fill in more fields in our conversion method, so we
let the logic proceed to all of them.

Test: TreeHugger
Bug: 203220137
Change-Id: Ia7a9c978ec778eebd17b9ce74f43cc320e92b971
2022-01-26 07:13:18 -08:00
Nate(Qiang) Jiang
ab62fa679b Merge changes from topics "Aware3.1", "instantFilter"
* changes:
  Wifi: Add HAL API and implementation for instant mode filter
  Wifi: Add support for Wifi Aware 3.1
2022-01-26 07:00:04 +00:00
Nate Jiang
6e13599d95 Wifi: Add HAL API and implementation for instant mode filter
Bug: 203220137
Test: pass vts test
Change-Id: I7f4d9d4390ad69bcfdb2419c2e172c4df2d6863b
2022-01-25 14:41:15 -08:00
Nate Jiang
50c001dd21 Wifi: Add support for Wifi Aware 3.1
Bug: 203220137
Test: pass vts test
Change-Id: I576e03b7cb94466c094a7e4ca1714dddd81ddd5f
2022-01-25 14:40:53 -08:00
Sunil Ravi
5955985741 Wifi: API to set the indoor state of device
If set, it indicates that the device is operating
in an indoor environment. When driver receives this
indication, it can safely enable WFD GO operation
on indoor channels.

Bug: 207671411
Test: Manual basic wifi tests

Change-Id: I4cc4c22444f0796c280220534d43c4ae8cae0899
2022-01-25 11:41:55 -08:00
Ahmed ElArabawy
05571e4718 Wifi: Add implementation for vendor HAL for 11be support
This commit adds the implementation for the HAL API changes
to enable 11be support.

Bug: 198746544
Test: Build Succeeds
Test: VTS test
Change-Id: I2d1f296856698951c2c0111200e7c7bf661da132
2022-01-21 14:08:14 -08:00
Ahmed ElArabawy
d73b64ccc5 Wifi: Update wifi vendor hal API with changes for 11be support
This commit adds the required changes for the support of
802.11be (WiFi-7) support to the wifi vendor hal API.

Bug: 198746544
Test: Build Succeeds
Test: VTS test
Change-Id: I1f631aaa247ce4240dd398230b57c7edae55c141
2022-01-21 14:07:02 -08:00