Commit graph

48 commits

Author SHA1 Message Date
Roshan Pius
322677a172 wifi_sta_iface: Deprecate setScanningMacOui
Bug: 154267383
Test: Device boots up and connects to wifi networks.
Change-Id: I70206e2c25d90ebd5ac35938af9ca2ebffefa318
2020-04-16 16:53:02 -07:00
Roshan Pius
5ba0a90cac Use additional interface for the WiFi Aware Discovery operations.
NAN operations are currently done on the STA interface.This resulted
in the NAN sessions getting terminated in all the instances where the
STA interface is restarted (IFF DOWN/UP), due to connected MAC
randomization.
Hence, remove the dependency of NAN over STA interface. This change
expects the driver to create a dedicated interface for the
NAN operations. The iface name needs to be set in "wifi.aware.interface"
property.

Bug: 1636219
Test: HAL unit tests
Test: Device boots up and connects to wifi network.
Change-Id: I1b6d64eb94334172a8cd621d0b15ed8c8dc87f91
2020-04-14 13:47:42 -07:00
Daniel Norman
ecb16248c9 Adds IWifi 1.3 and 1.4 as interfaces provided by vendor.wifi_hal_legacy.
Bug: 150474819
Bug: 152173671
Test: vts_ibase_test
Change-Id: Ie5462d41177ec6dd56e6de266157e7d4ac28b388
Merged-In: Ie5462d41177ec6dd56e6de266157e7d4ac28b388

(cherry picked from commit f58ff069ee)

Change-Id: Ie5462d41177ec6dd56e6de266157e7d4ac28b388
2020-04-08 21:39:24 +00:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Nate Jiang
eb9d19960e Make VTS test use the highest supported preamble
VTS should use the highest supported preamble.
If preamble is not support by device, LOWI will return unknow error.

Bug: 152440187
Test: atest VtsHalWifiApV1_4TargetTest
Change-Id: I972377a526c5d62a733878df5fd80d4af17e37ff
2020-04-06 23:32:34 -07:00
Dan Shi
86b285465f Remove dependency on VtsHalHidlTargetTestEnvBase
Bug: 143892896
Test: atest VtsHalWifiApV1_0TargetTest \
  VtsHalWifiNanV1_0TargetTest \
  VtsHalWifiV1_0TargetTest \
  VtsHalWifiV1_1TargetTest \
  VtsHalWifiV1_2TargetTest \
  VtsHalWifiNanV1_2TargetTest \
  VtsHalWifiV1_3TargetTest \
  VtsHalWifiApV1_4TargetTest \
  VtsHalWifiHostapdV1_0TargetTest \
  VtsHalWifiHostapdV1_1TargetTest \
  VtsHalWifiHostapdV1_2TargetTest \
  VtsHalWifiSupplicantV1_0TargetTest \
  VtsHalWifiSupplicantP2pV1_0TargetTest \
  VtsHalWifiSupplicantV1_1TargetTest \
  VtsHalWifiSupplicantV1_2TargetTest \
  VtsHalWifiSupplicantP2pV1_2TargetTest

Change-Id: I8a18f18f3aaa497642f380fea43517ec14554993
2020-03-31 11:34:32 -07:00
Ahmed ElArabawy
c4ae073b9a Merge "Wifi: Add support for mapping DSCP to Wifi AC" 2020-02-21 00:23:06 +00:00
Nate Jiang
6c2e21ff55 Merge "Fix nan Vts test" 2020-02-20 05:51:52 +00:00
Nate(Qiang) Jiang
a075122fca Fix nan Vts test
count shoule be initialize to 0 before test.

Bug: 149709834
Test: atest VtsHalWifiApV1_4TargetTest
Change-Id: I47c43571bc3ff91f389a4c9f41e050cc13c104a2
2020-02-19 17:34:29 -08:00
Ahmed ElArabawy
a1d1365ed3 Wifi: Add support for mapping DSCP to Wifi AC
This commit adds the needed enum and methods to handle the mapping
of DSCP into wifi access categories.

Bug: 141500691
Bug: 141550272
Test: Builds successfully
Change-Id: I3a85c211057907c2363f7f349d0075e6b4a1b152
2020-02-19 16:48:41 -08:00
Ahmed ElArabawy
98eab1d10c Add VTS tests to RTT impact of support of 11ax
This commit adds missing VTS tests for the support of 80211ax and its
impact to RTT.

Bug: 139354972
Test: atest VtsHalWifiApV1_4TargetTest
Change-Id: Ib13b65b5b76d1d940ac784a4a3b4899af88e541a
2020-02-17 23:00:46 -08:00
Ahmed ElArabawy
82e3c6bb60 Add missing instantiation code for Vts tests
Instantiation script is missing from the
wifi/1.4/vts/functional/wifi_nan_iface_hidl_test.cpp
wifi/1.4/vts/functional/wifi_chip_hidl_test.cpp

Bug: 149709807
Test: atest VtsHalWifiApV1_4TargetTest
Change-Id: Ifd4ac0adbdffa77381a60f48f830ebccb6535dfe
2020-02-17 16:23:20 -08:00
Sunil Ravi
ddab4bbd9c wifi: Add provision to create/delete dynamic interface(s)
This commit does following:
create/delete softap interface at runtime, if needed.
create/delete station interface at runtime, if needed.

Bug: 146539882
Bug: 121156971
Test: Manual - Basic wifi sanity test.
Change-Id: I6ab9c9e134d2f09e27283c9e60df885392834de4
Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
2020-02-03 22:47:01 -08:00
Kyounghan Lee
f2e21c27fd wifi(implementation): Clear wifi event callback objects while stopping
This fixes a deadlock between WifiNative and HalDeviceManager
because it removes about 30 times callbacks of
IWifiEventCallback#onFailure() or onStop(). Such excessive callbacks
within a short period tend to make high probabilities of the deadlock.

Note: This is a side effect of how the framework is registering multiple
callbacks. But, unfortunately there is no HAL API to unregister
callback. So, this is somewhat of a workaround fix.

Bug: 144137870
Test: Verified that the HAL no longer accumulates callbacks from
framework.
Test: Device boots up and connects to wifi networks.
Change-Id: I441e2f815a0a49c3936615f06a65a6ed5366a628
2020-01-29 07:03:17 -08:00
Kumar Anand
f2747e04ef wifi: thermal hal api
Use global handle instead of interface handle as thermal
mitigation is not interface specific.

Bug: 112471991
Test: atest FrameworksWifiTests
Change-Id: Ia8aadec7794bd2dbd5954ec0225caa349b31070c
2020-01-23 22:25:52 +00:00
Ahmed ElArabawy
f08d1e41ee Merge "Wifi: Make sure that VTS tests start with a clean state" 2020-01-08 16:23:31 +00:00
Ahmed ElArabawy
dcfab61c9b Wifi: Make sure that VTS tests start with a clean state
In current code base, The SetUp() method in wifi VTS tests does not
reset Wifi state. Hence the first Wifi test runs with unspecified state.
Following test cases are not impacted due to that TearDown() takes care
of resetting the Wifi state.

This commit adds the stopWifi() method to the SetUp() so all test cases
start from the same Wifi state.

Bug: 145312303
Test: Run all wifi VTS tests
Test: atest <VTS test module name>
Change-Id: I63d7c0d27f4ceb713dda3804786a199dc2274be5
2020-01-08 03:51:43 +00:00
Kumar Anand
deb46003eb Merge "wifi: Legacy HAL Thermal API stub" 2020-01-07 22:12:23 +00:00
Ahmed ElArabawy
36defb377e Wifi: Fix VTS tests
This commit fixes VTS tests resulting from upgrading APIs and stopping
support for old APIs.

Bug: 144926452
Test: atest VtsHalWifiV1_0TargetTest
Test: atest VtsHalWifiV1_3TargetTest
Change-Id: I73140be1dfb969da24c802e658e97d4040837243
2019-12-29 21:56:41 -08:00
Kumar Anand
913d5604ee wifi: Legacy HAL Thermal API stub
Add the stub implementation for Wifi thermal API

Bug: 140311866
Test: Manual, on device
Change-Id: I401bf7a38fa52d160ae45cd519a225c07360cd3c
2019-12-20 16:40:37 -08:00
Ahmed ElArabawy
b23485ddc5 Remove 6GHz capability query through HAL
It was decided to perform the check on the device support of 6GHz
through overlay configs instead of through HAL.
This commit removes the Hidl API changes that were used for that
check.

Bug: 145936758
Bug: 139354972
Test: Manual
Test: VTS test
Test: Unit test: hardware/interfaces/wifi/1.4/default/tests/runtests.sh
Change-Id: I81fdf603a668a71e3e875211367111fffee20e54
2019-12-12 16:37:36 -08:00
Nate(Qiang) Jiang
18b38eb441 Fix 6GHz support for NAN
add NAN 6Ghz support in 1.4, size of bandSpecificConfig should be 3.

Bug: 146062988
Test: unit test
Test: acts AttachTest DiscoveryTest DataPathTest

Change-Id: I3bd0a4f32d804eae848bc15d9813d5ccb3e5fc62
2019-12-12 18:51:37 +00:00
Ahmed ElArabawy
46b5698a33 Fix format for android.hardware.wifi@1.4
This commit includes the format changes when running the command:
hidl-gen -Lformat android.hardware.wifi@1.4 -randroid.hardware:hardware/interfaces

Bug: 145961722
Test: Build successful
Change-Id: I59b3c4e3f12389ff2660a563b6eb0454a637c35e
2019-12-09 22:08:55 -08:00
Ahmed ElArabawy
83baffdac2 Wifi: Add 6GHz band to NAN structures and methods
This commit adds 6GHz band to NAN related structures and methods.

Bug: 139354972
Test: Manual
Test: VTS test
Test: Unit test:
Test: ./hardware/interfaces/wifi/1.4/default/tests/runtests.sh
Change-Id: I33f63fde67d5a839678076fdb7c76d5eb8645131
2019-12-06 08:57:24 -08:00
Ahmed ElArabawy
fd809fcdfc Wifi: Add 6GHz bands to WifiBand
This commit adds 6GHz band to WifiBand and update the impacted
structures and methods in Wifi HAL.
Note that Background scar related HAL API will not be using the
new band, and will continue with the legacy set of bands.

Bug: 139354972
Test: Manual
Test: VTS test
Test: Unit test: ./hardware/interfaces/wifi/1.4/default/tests/runtests.sh
Change-Id: I54662251034806338ad64d4622ade259ca260a79
2019-12-04 18:36:59 -08:00
TreeHugger Robot
e1ed33bd98 Merge "hal(wifi): Set HAL logd severity based on ringbuffer verbosity" 2019-12-02 10:49:43 +00:00
Etan Cohen
1cefaf6241 [AWARE] Protect string copy against buffer overflow
Fixes: 143789898
Test: (Unit) atest com.android.server.wifi
Test: ACTS ThroughputTest:test_iperf_single_ndp_aware_only_ib
Test: (VTS) atest VtsHalWifiApV1_4TargetTest
Change-Id: I5b8aa1d9a6388fe20cb7e1cd6a76d5e59e14d099
2019-11-26 12:35:49 -08:00
Roshan Pius
a63b53f9a8 hal(wifi): Set HAL logd severity based on ringbuffer verbosity
This avoid the framework from setting the HAL daemon's log severity when
verbose logging is enabled by the user.

Bug: 144695435
Test: Manually verified log level change
Change-Id: I71777bb5f7cb8216bc0ecee27fbaa410c39a6a16
2019-11-18 11:03:13 -08:00
Dan Shi
3550f9a90c Merge "Convert VtsHalWifiV1_*Target to be parameterized test" 2019-11-18 17:06:21 +00:00
Ahmed ElArabawy
a6b217d3e3 Merge "Revert "Revert "Wifi: Support check on device capability for 6GHZ""" 2019-11-15 22:27:04 +00:00
Ahmed ElArabawy
95e36b7035 Revert "Revert "Wifi: Support check on device capability for 6GHZ""
This reverts commit ad2b44760d.

Reason for revert: Fix is ready

Change-Id: I16e30afe843e048429eae430a82aa5e90e591c2e
2019-11-15 21:24:53 +00:00
Zongheng Wang
964a1a67d8 Merge "Revert "Wifi: Support check on device capability for 6GHZ"" 2019-11-15 21:04:29 +00:00
Zongheng Wang
ad2b44760d Revert "Wifi: Support check on device capability for 6GHZ"
This reverts commit 046257fd2e.

Reason for revert: b/144576287 broke git_master 

Change-Id: I357df4a242a3ae22c793f8f4120199f04cbcdfa2
2019-11-15 20:40:33 +00:00
Ahmed ElArabawy
15e0759d7f Merge "Wifi: Support check on device capability for 6GHZ" 2019-11-15 18:17:13 +00:00
Dan Shi
336fe46ae5 Convert VtsHalWifiV1_*Target to be parameterized test
Bug: 142397658
Bug: 142304083
Test: atest \
  VtsHalWifiV1_0TargetTest \
  VtsHalWifiNanV1_0TargetTest \
  VtsHalWifiApV1_0TargetTest \
  VtsHalWifiV1_1TargetTest \
  VtsHalWifiV1_2TargetTest \
  VtsHalWifiNanV1_2TargetTest \
  VtsHalWifiV1_3TargetTest \
  VtsHalWifiApV1_4TargetTest

Change-Id: I05bf1c4cff378a99c015ac514eefb49debb8b1af
2019-11-14 09:27:55 -08:00
Roshan Pius
16c43fb4f8 wifi(vts): Set the iface up as a part of setup
Attempts to fix a VTS test failure reported by OEM's on devices
supporting concurrent AP iface.

Bug: 143096362
Test: make vts && vts-tradefed run commandAndExit vts --module VtsHalWifiV1_0Host
Test: Will need to ask OEM to verify the fix.
Change-Id: I0958d720411258761f4ac5bcccc823b06a55d518
2019-11-13 12:33:34 -08:00
Ahmed ElArabawy
046257fd2e Wifi: Support check on device capability for 6GHZ
This commit adds the HAL APIs and implementation to support checking
whether device supports 6GHz band or not.
VTS test has been added for the new api.

Bug: 139354972
Test: Manual: Make sure capability is read correctly.
Test: VTS test.
Change-Id: I03b0c6017666ffd3663d5979d6e6a2bd93043c48
2019-11-12 19:14:59 -08:00
Ahmed ElArabawy
eeb53385b3 Wifi: Add 802.11ax support to RTT
This CL makes modidfication to support Wifi 802.11ax to RTT procedures.

Bug: 139354972
Test: vts test
Change-Id: I79fba504e7c7380a254a0b8c175a13e8b993fc8e
2019-11-06 18:31:16 -08:00
Ahmed ElArabawy
80feb3cdf0 Wifi: Handle invalid error values from vendor HAL
The HAL shim (default implementation) expects all vendor hal functions
to return valid wifi_error values. In case the vendor hal returning a
value outside this range of values, the HAL service crashes.

This commit is to handle this type of error by defaulting to
WIFI_ERROR_UNKNOWN.

Bug: 143317834
Test: Manual
Test: Pass an invalid error code, and make sure it is properly handled
Change-Id: Ifaba8a7e4e866a2be154c9dcaeb521cd758010ee
2019-10-24 19:22:17 -07:00
Ahmed ElArabawy
e56767d561 Wifi: Add getConnectionCapabilities API
This commit adds the API for getConnectionCapabilities() in
ISupplicantStaIface HAL. This is used to return the Wifi support
for the connection on this STA interface.

Bug: 138634524
Bug: 140168755
Test: Manual
Test: VTS test
Change-Id: I24ff3c16434067e41491298e41041bdfdf06452a
2019-10-18 21:07:07 +00:00
Patrik Fimml
6beae321c6 Wifi AP: Remove HAL-level MAC randomization
Randomization will be handled by framework code instead. This also means
WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION is replaced with a
framework config option (config_wifi_ap_mac_randomization_supported),
which can be set from device overlays.

Bug: 142387520
Test: atest android.hardware.wifi@1.0-service-tests; adb shell LD_LIBRARY_PATH=:/system/lib64/vndk-R /data/local/tmp/android.hardware.wifi@1.0-service-tests/x86_64/android.hardware.wifi@1.0-service-tests
Test: vts-tradefed run vts --primary-abi-only --skip-device-info -l DEBUG --include-filter VtsHalWifiApV1_4Target
Test: lunch hawk-userdebug; m  (uses DISABLE_AP_MAC_RANDOMIZATION)
Change-Id: I2dbf1158368ce3c39980501f892c6de1ffb3f748
2019-10-16 16:46:55 +02:00
Nick Desaulniers
4125722db4 Merge "[hardware][interfaces][wifi] fix -Wreorder-init-list" am: d1785cb7f6 am: 7d36ef505c am: d654bac57d
am: d7b13d4f69

Change-Id: I836a4beefc5117cb4c8c019ce00e56a02665a41b
2019-10-15 22:30:52 -07:00
Patrik Fimml
c37306ea65 Wifi VTS: use VTS-native feature detection
Previously, VTS would run VtsHalWifiV1_0HostTest, a python script on the
host that tries identify whether SoftAP and NAN should be supported by
the device. This is complex, prevents migration to pure gtests without
custom runners, and duplicates logic that has become available in VTS.

This switches to equivalent methods natively available in VTS:
- NAN: We can use "precondition-feature" to check for the
"android.hardware.wifi.aware" feature.
- SoftAP: We can use "precondition-lshal" to check whether the
"android.hardware.wifi.hostapd" HAL is declared in the device manifest
(should have the same semantics as the previous python check).

This splits out NAN- and SoftAP-dependent parts of IWifiChip tests so
that they can use this method, so some tests moved between these targets:
- VtsHalWifiV1_0TargetTest
- VtsHalWifiApV1_0TargetTest
- VtsHalWifiNanV1_0TargetTest

Bug: 142304083
Test: vts-tradefed run vts --primary-abi-only --skip-device-info -l DEBUG --include-filter VtsHalWifiV1_0Target --include-filter VtsHalWifiApV1_0Target --include-filter VtsHalWifiNanV1_0Target --include-filter VtsHalWifiV1_1Target --include-filter VtsHalWifiV1_2Target --include-filter VtsHalWifiV1_3Target --include-filter VtsHalWifiApV1_4Target
Change-Id: Ica0b58811a0aa152c1a6c3c9a35d577d6ae70160
2019-10-10 11:00:26 +02:00
Patrik Fimml
c919f9657e Add IWifiApIface@1.4 (configurable MAC address)
Mirrors the methods and tests introduced in IWifiStaIface@1.2 and @1.3.

Android.bp generated with
$ hidl-gen -o . -Landroidbp -randroid.hardware:hardware/interfaces android.hardware.wifi@1.4

Bug: 132705022
Test: make vts && vts-tradefed run vts-host --skip-preconditions --primary-abi-only --module VtsHalWifiV1_4Host
Change-Id: Iddacd2770c59522001673d10daafd3bbed3844f6
2019-10-08 13:12:18 +02:00
Ahmed ElArabawy
e2f447ae08 Revert "Revert "Wifi: Move LOCAL_VINTF_FRAGMENTS to executables""
This reverts commit 1ab2fac7de.

Reason for revert: I fixed the cause for the build breakage, so no need to revert this change any more.

Change-Id: I8c174116b3a9fcfbf4944b531f957a7ae72b4025
2019-09-24 15:33:43 +00:00
Jim Tang
1ab2fac7de Revert "Wifi: Move LOCAL_VINTF_FRAGMENTS to executables"
This reverts commit 0d653ad82c.

Reason for revert: cannot be added: HAL "android.hardware.wifi" has a conflict.

Change-Id: I33780dcca99015cb97b4f2240d1dfc6c3ebf9638
2019-09-24 07:19:12 +00:00
Ahmed ElArabawy
0d653ad82c Wifi: Move LOCAL_VINTF_FRAGMENTS to executables
Current codebase has the LOCAL_VINTF_FRAGMENTS defined in the static
library definition in Android.mk. This line is skipped and does not take
effect, and hence the Wifi hal service does not start.

Moving the definition to the executable definitions, so it takes effect.

Bug: 141447327
Test: Verify that wifi starts at boot
Change-Id: I9e01483eec4017444689509ea90f761305ae471b
2019-09-23 16:40:50 -07:00
Ahmed ElArabawy
f501a98aad Wifi: Uprev Wifi HAL to 1.4
Move Wifi HAL from 1.3 to 1.4
This commit also include adding the VINTF fragment definition for IWifi
hal.

Bug: 138243400
Test: Builds and wifi works
Change-Id: I5ec9b21f8d6b7e1b5b5e47e26681dd4ed3ffcc2d
2019-09-19 10:37:29 -07:00