Commit graph

494 commits

Author SHA1 Message Date
Nate Jiang
b505efe7ff Modify based on the vendor feedback
- Add end pairing request method
- Handle bootstrapping comeback event
- Add cipher type in the pairing request
- Remame AKM to NAN specific

Bug: 265075699
Test: cts sinlgeDeviceTest
Change-Id: Ic55370873ba8d938ea32f63b3e69253ee47bd969
2023-02-13 17:26:19 -08:00
Mahesh KKV
ef9956a53b Add link state for link layer stats
Bug: 263029630
Test: Build successfully
Change-Id: I31a7ab0893fc8168d16a68631f5e06d4170ef71d
2023-02-10 14:16:11 -08:00
Mahesh KKV
cd75a54c4a Rename max_mlo_link_count to max_mlo_str_link_count
The maximum number of Simultaneous Transmit Receive (STR) links used in
Multi-Link Operation can be different from the maximum radios supported
by the chip.Explicitly mention the max links as max STR links. Update
the description and usage of the capability field.

Bug: 267963579
Test: build and wifi connection

Change-Id: Ic12055a4a340aeff15382e198a76328431f9def6
2023-02-05 20:37:01 -08:00
Oscar Shu
55f43fb91e Legacy wifi feature flag for AFC channel allowance
Bug: 242917176
Test: compile
Change-Id: Ida30239103d751eb4c7ce5bf96e8068a92a77247
2023-02-01 21:32:19 +00:00
Ye Jiao
282246a8ad Move setScanMode to legacy HAL
Cherry-pick from: https://partner-android-review.git.corp.google.com/c/platform/hardware/libhardware_legacy/+/2368871
Implementation of setScanMode is platform-specific. It's more reasonable to move it the legacy HAL like other platform-specific APIs.

Bug: 265866990
Test: manual Test
Test: VTS
Change-Id: I2e9d30698a8bcb915a746f6253ec3b6e6d903bc0
2023-01-27 05:07:04 +00:00
Nate Jiang
36cff5cd7d Move the newly added method to the end of the function table
This can avoid pointer mismatch due to HIDL is using a cached version of
the legacy HAL.

Bug: 265396931
Test: build and wifi connection
Change-Id: Id56c4b315cbd84f8ba69f7d7e12b3d07e656defb
2023-01-26 03:01:50 +00:00
Biswarup Pal
52e781f927 Merge "Add suspendable option in NanPublishRequest and NanSubscribeRequest" 2023-01-12 10:55:41 +00:00
Phill Hayers
4f30a17322 Add a new function in wifi_hal_fn table for suspend/resume.
Bug: 259950106
Test: m android.hardware.wifi-update-api
Change-Id: I6d9b8baef13f07a684d5486576c3298be1e5e482
2023-01-11 15:43:03 +00:00
Biswarup Pal
b3d0989c55 Add suspendable option in NanPublishRequest and NanSubscribeRequest
Test: m
Bug: 263014869
Change-Id: I71f28b36be13befaf4d7f85dfab369593bc8e61d
2023-01-11 13:09:47 +00:00
Biswarup Pal
2ebbe247b0 Add NAN suspension flag to NanCapabilities HAL
Test: m
Bug: 262872127
Change-Id: I1c59200af16f31cd801d06e15eb3a9f64664aa73
2023-01-09 23:36:32 +00:00
Biswarup Pal
5bfb836888 Merge "Revert "Revert "[Aware] Add paramters in NanConfigRequest to sup..."" 2023-01-09 23:30:52 +00:00
Biswarup Pal
584f074153 Revert "Revert "[Aware] Add paramters in NanConfigRequest to sup..."
Revert submission 20917465-revert-20813956-issue-262873111-API-set-clusterId-newAPI-FRIOZCUQWG

Reverted changes: /q/submissionid:20917465-revert-20813956-issue-262873111-API-set-clusterId-newAPI-FRIOZCUQWG

Change-Id: I71fd896e76e996a01a7c50237a9777f33bc11367
2023-01-09 21:21:22 +00:00
Sujit Kautkar
82ad3815f8 Merge "Revert "[Aware] Add paramters in NanConfigRequest to support set..."" 2023-01-09 21:16:21 +00:00
Sujit Kautkar
0a60d07159 Revert "[Aware] Add paramters in NanConfigRequest to support set..."
Revert submission 20813956-issue-262873111-API-set-clusterId-newAPI

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=oriole-userdebug&lkgb=9469876&lkbb=9470237&fkbb=9469914, bug b/264915970

Reverted changes: /q/submissionid:20813956-issue-262873111-API-set-clusterId-newAPI

Bug: 264915970
Change-Id: I59be92a57e6c6086b9a652bf19adf4391fc4d2d8
2023-01-09 21:06:54 +00:00
Sherri Lin
8bb933d584 Merge "[Aware] Add paramters in NanConfigRequest to support setting cluster id" 2023-01-09 19:04:11 +00:00
Shuibing Dai
38ea4fc717 Add a new function in wifi_hal_fn table for wifi indoor/dfs channel usage
Vendor can enable/disable STA-connected indoor or DFS channels for WFA Go, SAP and Wi-Fi Aware.

Bug: 207669954
Test: m android.hardware.wifi-update-api
Change-Id: Ifc6646b01b0fec082ee8f92ba483f0d4102610df
2023-01-05 18:15:24 -08:00
Sherri Lin
267d9197b8 [Aware] Add paramters in NanConfigRequest to support setting cluster id
Bug: 262872131
Test: build
Change-Id: I55a588eb03d44236efff9bdd00c7e861bb090b66
2022-12-29 19:48:35 +01:00
Nate(Qiang) Jiang
9e0a2386ab Merge "[Aware] Wifi Aware 4.0 legacy HAL change" 2022-12-20 02:25:18 +00:00
TreeHugger Robot
22aa713e81 Merge "Add frequency/Bandwidth to RttResults" 2022-12-19 17:40:20 +00:00
Sunil Ravi
6fb46c645e Add frequency/Bandwidth to RttResults
Added frequency and RTT packet bandwidth in rtt
results data structure. Also added new rtt result callback
function. The newer vendor implementations which supports
sending frequency and bandwidth should call rtt result callback
version 2.

Bug: 222186547
Test: hardware/interfaces/wifi/aidl/default/tests/runtests.sh
Test: RTT test using wifi rtt scan app from playstore.
Change-Id: I3265baa477b73cddaff49cd4d9ee88692878365c
2022-12-16 21:57:16 +00:00
Mahesh KKV
d937de94dd wifi: Add radio_id and frequency to link layer stats
These two new parameters helps to find the mapping between link layer
stats, radio stat and channel info.

Bug: 258013268
Test: Builds successfully
Change-Id: I6bec665b581020c8b27ed2685c684d5ef8bf4107
2022-12-16 05:42:25 +00:00
Mahesh KKV
832ef8ef71 wifi: Add multi link stats support to legacy HAL
Multi-link operation (MLO) is considered a key feature in IEEE 802.11be,
which allows devices to transmit and receive data using multiple links
concurrently, thereby contributing to improving throughput and reducing
latency.

Currently HAL supports querying stats from single link. Add a callback
to get stats from multiple links supported by the Wi-Fi chip. Also keep
the callback to get single link layer stats as it is for backward
compatibility.

Multi link stats callback can be used for legacy case as well with
single link.

Bug: 246988155
Test: Builds successfully
Change-Id: Iea2649b6868e9b153ae31e5c05457c324f5b4e98
2022-12-15 02:37:50 +00:00
Nate Jiang
c4b6fa85b7 [Aware] Wifi Aware 4.0 legacy HAL change
To support Wifi Aware 4.0 with pairing

Bug: 249185683
Test: CtsWifiTest

Change-Id: I829a770b9a6ba2a3324d8d227d23e0ad2cdc0ac9
2022-12-13 17:58:15 -08:00
Purushottam Kushwaha
2832940b56 wifi_hal: Add interface to get driver supported iface combinations
Interface combinations may vary based on underlying hardware/firmware
and driver support. Add a new API to query the interface combination
matrix through vendor hal.

Bug: 249351396
Test: Build successfully
Change-Id: I51dae4b182ef60a0ab4f1b16d624c69e0a3aebc4
2022-12-13 00:00:59 +00:00
Sunil Ravi
7d67567dd8 wifi: Add number of TDLS sessions in chip capability
Bug: 240247868
Test: Manual - STA connect/disconnect
Change-Id: I54417931d4634085a9de490b9b07029b0c3c7b7f
2022-12-12 19:36:11 +00:00
Mahesh KKV
cac6d2ece8 wifi: Add HAL API to get wifi chip capabilities
Bug: 231497844
Test: Builds successfully
Change-Id: Ie7192ad484a9ecef3c6c98d03710af32c5558904
2022-12-12 19:36:07 +00:00
kensun
31684a15c2 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: I0487d010078f4e33fef76a951cc87647746ac867
2022-11-10 02:30:49 +00:00
Isaac Chiou
4172a388c7 Add HAL APIs and configurations 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 this CL,
we define an API in WiFi HAL, and can be referenced by Broadcom HAL.

Bug: 215193418
Test: New APIs work fine
Change-Id: I907687a4d71f48869617edc6e013639dfbccb851
2022-04-21 11:17:02 +08:00
Isaac Chiou
e1aad8d6ec Add HAL APIs and configurations for CHRE NAN RTT
Add HAL APIs and configuration in wifi_hal.h.

Test: Build pass
Test: New APIs work fine.
Bug: 206614765
Change-Id: I30681a580f1751518a30c258524a9b6216aab705
2022-01-29 07:31:06 +08:00
Sunil Ravi
3f3737abcd 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: unit test
Change-Id: I4c90f80002ca138133a575bca80dfdef2a593ab2
2022-01-26 23:21:57 -08:00
Sunil Ravi
8ec08d0216 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: I970dd54f538ee85d76d702b1ce36432bad901602
2022-01-25 11:44:15 -08:00
Ahmed ElArabawy
60d787cd15 Wifi: Add needed definitions for 11be support
This commit adds the necessary defines for 11be(WiFi-7) support

Bug: 198746544
Test: Builds Successfully
Change-Id: I5be07dac3f5eb196717474ac8a1f2e3b1e2556d5
2022-01-21 22:09:46 +00:00
Nate(Qiang) Jiang
a07d7c97d0 Merge "Add wifi-aware 3.1 support" 2022-01-07 01:43:57 +00:00
Nate Jiang
4dac6dcef8 Add wifi-aware 3.1 support
Add instant communication mode and NCS-PK support

Bug: 203220137
Test: build
Change-Id: I46fd18d1e1780b76c40f59ed05503e39b71e3aa6
2021-10-18 16:57:57 -07:00
Veerendranath Jakkam
6a489c0360 wifi: Add feature flag to indicate support for set MAC without iface reset
This commit adds the enum to indicate driver support for MAC address
change without iface reset.

Bug: 202424223
Test: atest VtsHalWifiV1_5TargetTest
Test: Manual - Connect STA to AP and check random mac is set

Change-Id: I29662153d83eedf9986142f8371f3a7251b625dc
2021-10-14 13:05:42 -07:00
Ahmed ElArabawy
2cf8cd3978 WiFi: Add new SAR Scenarios for foldable devices
This commit adds new SAR scenarios for foldable devices.

Bug: 188138055
Test: Verify proper scenario selection
Change-Id: I472d3989edb1f8949a0eb1efd249b13aa55dc537
2021-05-19 09:11:23 +00:00
chenpaul
4ebb0af45c Wifi: Add argument "WifiHandle" in "wifi_set_subsystem_restart_handler"
Bug: 178126071
Bug: 183483123
Test: vendor HAL can received API call
Change-Id: I0d6c9ce294e1bcea1ed19e4050babd923e6b6141
2021-03-31 20:15:55 +08:00
chenpaul
35390b6dff Wifi: New API to query the trigger subsystem restart
This commit adds a method to forward the subsystem restart request

Bug: 178126071
Test: Trigger firmware restart and make sure event was forwarded

Change-Id: I5e97e645b630822865b1614f999e8b465a6d2b0b
2021-03-19 15:21:39 +08:00
Ahmed ElArabawy
1e6f8f6fcf Merge "WiFi: Add new SAR scenarios" into sc-dev 2021-03-18 21:10:11 +00:00
Ahmed ElArabawy
958307b14f WiFi: Add new SAR scenarios
This commit adds new SAR Scenarios.

Bug: 162191325
Test: Builds successfully
Change-Id: I70c45a5675b9bc374422fe732f888b3782058dd2
2021-03-15 21:41:42 -07:00
Kumar Anand
f2eed442a6 Wifi: Remove multiple definitions
Remove compilation warnings due to -Wtypedef-redefinition.

Bug: 160212907
Test: Build Successfully
Change-Id: I8925cf33fa64fbba4a6cbb782ecc107a7741fe87
2021-03-15 11:27:54 -07:00
Kalesh Singh
a731921669 Merge "RAII style wakelocks: Add tryGet() factory method." am: ddff8e6dd0 am: e3a6357533 am: 9176bf1929
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1592033

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I51ad002d2d778d6e674a86363e74eb5040d3219a
2021-02-24 23:51:50 +00:00
Kalesh Singh
d8da2af1e5 RAII style wakelocks: Add tryGet() factory method.
Wakelock acquisition can fail if suspend service is not available.
Make this clear by returning an optional value that client must
check before entering wakelock critical sections.

Bug: b/179229598
Test: Boot test on Pixel 4 device
Change-Id: Ied00fa919c20d8a30f1c40ee34a91a2a7e240689
2021-02-23 10:06:19 -05:00
Kumar Anand
33adbb23f6 Wifi: Filter usable channels by Coex, Concurrency
Add ability to filter usable channnels due to coex &
concurrency limitations. Normally in standalone mode,
list of usable channels is dictated by regulatory. But
list of usable channels could be additionally limited
due to coex and also due to concurrency limitations.

Bug: 160212907
Test: Using halutil
Change-Id: Iafde3b4fe9ca8986404ee078ed0a1a31062a4bbb
2021-02-16 14:12:48 -08:00
Kumar Anand
b25c2d1d71 Wifi: New API to query the list of usable channels
Introduce a new API that can be used to query what modes (SAP,
STA, WFD Client, WFD Group Owner, TDLS, NAN) can be supported
on each channel. With this new API driver, has flexibility to
indicate to framework unambiguously what channels are usable
by each mode. Until now, framework had to derive this using
one of the NL80211_FREQUENCY_ATTR_X (NO_IR, DFS, INDOOR) which
is not sufficent to unambiguously determine allowed channels
for each interface modes.

Bug: 160212907
Test: Using halutil
Change-Id: I25ce9b5083bd6fb650e02c5113bc11b559e80cb5
2021-01-28 20:54:18 +00:00
Kai Shi
8485407bcc Add wifi_set_dtim_config for power optimization
Add the new HAL API for WLAN power optimization in the suspend mode.

Test: halutil test
Bug: 170678227
Change-Id: Icff3d01585213431be539913c8d229fdc4875934
2021-01-11 20:30:17 -08:00
Damon Kim
359fa1d1ba HAL: Fix to support CCA Level and Load info in WiFi link-layer statistics.
- CCA Level and Load info
  (Channel Utilization and Station Count from BSS load IE in beacon)
- For supporing this feature,
  DHD and HALUTIL also should be fixed accordingly. (>= DHD 101.10.460)

Bug: 173477163
Test: Builds successfully
Change-Id: Ic1bd3e26888f8005fdb6c14d8ffeee9d3d04c3d3
2021-01-07 14:34:50 -08:00
Kai Shi
3adc28c891 Add HAL API for VoIP optimization
Add HAL API for VoIP optimization. This includes set_voip_mode() as well
as TWT control related API.

Test: compilation
Bug: 166311728
Change-Id: Ib1210cf200ed692433626b8df549262ddf660359
2020-12-18 12:51:42 -08:00
Quang Luong
f499981aa0 libhardware_legacy(wifi): Add enum for wifi coex restrictions
Add custom enum for wifi coex since IfaceType is not suitable for
bitmasks.

Bug: 153651001
Test: build
Change-Id: I58b55c64f5358ff26fc45451b66e8818bb3c3d30
2020-12-15 05:49:48 +00:00
Quang Luong
85f84d3796 libhardware_legacy(wifi): Add coex APIs
Bug: 153651001
Test: build
Change-Id: Id7f551fd2446a0484e229145a14ef27facaeab97
2020-12-04 18:18:52 -08:00