Commit graph

446 commits

Author SHA1 Message Date
Roshan Pius
2d6676a1ce wifi(vts): Ignore HAL stop failure
The stop may fail if the interface down operation takes too long on some
devices. This is not fatal as long as we're able to bring up the
interfae for the next HAL start.

Bug: 68303248
Test: VTS tests
Change-Id: I93943f9d0cfb83cf07253c6f9b3866d6d137028f
2017-11-17 11:02:38 -08:00
Etan Cohen
1acc63f9cf [VTS][NAN] Fix VTS tests: didn't abort early enough for non-NAN devices
The NAN-specific VTS tests check whether the device supports NAN.
However, the tests did not abort early enough.

Bug: 68302113
Test: builds
Change-Id: Ie6fb0e2b0bd12840ce6bc52fab1b6d4e8c5a571e
2017-11-10 10:41:51 -08:00
Roshan Pius
9bd4e6bfc7 wifi(implementation): Increase stop timeout
The current timeout of 50ms seems to be insufficient on some devices.
So, changing it to a higher value.

Bug: 66334487
Test:  Ran the VTS tests continously in a loop for 30 minutes
without failure. Previously, failure occurence was about once every
5-10 minutes.
`while adb shell /data/VtsHalWifiSupplicantV1_0TargetTest; do :;
done; adb bugreport`

Change-Id: I884de64d748b46b9710a702f3c72cc30dd51627e
2017-09-29 15:10:21 -07:00
Etan Cohen
1b60b120de [AWARE] Developer documentation on HAL usage
Add documentation specifying which HAL APIs are used by the
framework.

Bug: 65646388
Test: N/A
Change-Id: Id1407a2d206b8eab47f5753a7cc6713b9581aeff
2017-09-14 15:19:26 -07:00
Roshan Pius
3078a4cb67 wifi(implementation): Remove unnecessary local variable
Bug: 65058323
Test: Compiles
Change-Id: Ib268234837f5b381572c8038e7900a145fb32249
2017-08-28 16:14:22 -07:00
Roshan Pius
155344b866 wifi(implementation): Make WifiLegacyHal.stop() blocking
IWifi::stop() is currently non-blocking which makes it hard for the
client to determing when the stop is fully complete. This for example
causes wificond to disable the wlan0 interface while the legacy HAL
stop is being processed. So, add a timed wait to let the legacy HAL
complete processing of the stop before we unblock the IWifi::stop()
HIDL call.

Bug: 64611487
Test: Manual tests by wifi state toggling and verifying the order of
events in logs:
08-15 19:17:53.302   796   796 I android.hardware.wifi@1.0-service:
Stopping legacy HAL
08-15 19:17:53.302   796   796 I WifiHAL : Sent msg on exit sock to
unblock poll()
08-15 19:17:53.302   796  4793 E CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Could not find group
host_logs, errno: 0 id: -2
08-15 19:17:53.302   796  4793 E CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Could not find group
fw_logs, errno: 0 id: -2
08-15 19:17:53.302   796  4793 E CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Could not find group
per_pkt_stats, errno: 0 id: -2
08-15 19:17:53.302   796  4793 E CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Could not find group
diag_events, errno: 0 id: -2
08-15 19:17:53.302   796  4793 E CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Could not find group
fatal_events, errno: 0 id: -2
08-15 19:17:53.302   796  4793 I CLD80211:
/vendor/bin/hw/android.hardware.wifi@1.0-service: Sent msg on exit sock
to unblock poll()
08-15 19:17:53.302   796  4793 I android.hardware.wifi@1.0-service:
Legacy HAL stop complete callback received
08-15 19:17:53.304   802   838 D CHRE    : @ 151.328: [Platform] wifi:
has 0, enabled 0
08-15 19:17:53.321   796  4793 I android.hardware.wifi@1.0-service:
Legacy HAL event loop terminated
08-15 19:17:53.321   796   796 I android.hardware.wifi@1.0-service:
Legacy HAL stop complete
08-15 19:17:53.522   796   796 I android.hardware.wifi@1.0-service: Wifi
HAL stopped

Test: Will send for regression tests.
Change-Id: I394c11724e9459a4b9a6b970e2bcb4e0ad65fefc
2017-08-28 12:55:07 -07:00
TreeHugger Robot
5920714752 Merge "[AWARE] Fix maxNdpSessions documentation" into oc-mr1-dev 2017-08-15 22:53:06 +00:00
Roshan Pius
d6ce826894 wifi(implementation): Reduce logging severity
IE elements should not be present in the batched scan results, but it
being there doesn't cause any problems. The IE elements will be ignored
when we send it over the HIDL interface, so reduce the log level to
prevent log spamming.

Bug: 64448186
Test: None
Change-Id: Ia0d0312a113c907bb0992bb8f41e734fe9d05114
2017-08-15 08:42:50 -07:00
Etan Cohen
36591cb5f5 [AWARE] Fix maxNdpSessions documentation
Clarify meaning of maxNdpSessions capability. Total, not per interface.

Bug: 64685830
Test: builds
Change-Id: I24fc0a97172a4ca161f432b6c5c1dc55a44dfb12
2017-08-14 14:12:11 -07:00
Tri Vo
2883486706 Merge "VTS tests now static link to HAL def libs. #2" into oc-mr1-dev 2017-08-10 17:45:07 +00:00
Tri Vo
0c2ce357b1 VTS tests now static link to HAL def libs. #2
And use VtsHalTargetTestDefaults.

Bug: 64040096
Test: crop out all non-affected tests from vts-hal-hidl.xml and run
vts-tradefed run commandAndExit vts-hal-hidl --skip-all-system-status-check 
--skip-preconditions
2 failures, same as without this change:
GatekeeperHidlTest.DeleteAllUsersTest
GatekeeperHidlTest.DeleteUserTest

Change-Id: I8f6995e9536a9aefe283ee3effec9f5a7f03b620
2017-08-10 17:44:57 +00:00
Roshan Pius
0f2946eb46 wifi(vts): Remove a tight loop of toggling wifi state
am: 0d1bb97447

Change-Id: Icec63b9ffd5d12003da44bdde73edde04e55f11a
2017-08-09 05:09:17 +00:00
Roshan Pius
0d1bb97447 wifi(vts): Remove a tight loop of toggling wifi state
The tight loop of HAL start/stop exposes a race condition within the HAL.
Adding a fix for preventing this race would need a fix which would be
pretty risky at this point of the release. The issue itself is unlikely
to happen in real use cases because wifi toggles (user initiated or test
scripts initiated) via framework goes through a series of processing
before it invokes the HAL start/stop.

Bug: 64195190
Test: `make vts -j30 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 &&
vts-tradefed run commandAndExit vts --skip-all-system-status-check
--primary-abi-only --skip-preconditions --module VtsHalWifiV1_0Target -l
INFO`

Change-Id: I4e4d65f8b6e2e423a3a5f26e5a97a78b7e99c3e8
2017-08-09 04:58:29 +00:00
Roshan Pius
07bac60f31 wifi(vts): Ignore IWifi.stop() returning ERROR_NOT_AVAILABLE
am: 8c216524a3

Change-Id: I1bf9be99d4e673209edb893040483bf772ee3ca0
2017-08-08 17:10:25 +00:00
Roshan Pius
8c216524a3 wifi(vts): Ignore IWifi.stop() returning ERROR_NOT_AVAILABLE
When IWifi.stop() is invoked back to back (happens in the ConfigureChip
vts test), the HAL would return ERROR_NOT_AVAILABLE if the previous stop
is still being processed. This is not an error that needs to fail the test,
but a legitimate status for stop. We have a retry mechanism to handle
this in both the VTS test and framework for the case where IWifi.start()
is invoked while the previous stop is being processed.

While there, corrected a few log messages emitted by the HAL to debug
such startup/stop issues better.

Bug: 63971806
Test: `vts-tradefed run commandAndExit vts --skip-all-system-status-check
--primary-abi-only --skip-preconditions --module VtsHalWifiV1_0Target -l
INFO`

Change-Id: I5e3470ac97541a6ea10aceec9b737e5d03ed5206
2017-08-08 17:02:19 +00:00
TreeHugger Robot
0a21415efa Merge changes from topic 'hidl-vndk-enabled-oc-mr1' into oc-mr1-dev
* changes:
  Mark hidl utils as vndk
  Manually update makefile for vndk-sp hidl libs.
  Update make file for vndk enabled.
2017-08-05 02:01:37 +00:00
Tri Vo
c0d5b9bbb8 Merge "Wifi supplicant test statically links to dependencies." into oc-mr1-dev 2017-08-04 23:07:26 +00:00
Tri Vo
48f8e5d6be Wifi supplicant test statically links to dependencies.
This test now statically links to libs not guaranteed to be on the
device.

Bug: 64040096
Test: compiles
Change-Id: I986e61835e641e15bdad0ff9571ee8ffa59b2a46
2017-08-04 10:36:10 -07:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
TreeHugger Robot
d9b12c13e5 Merge "Update makefiles for vndk enabled." into oc-mr1-dev 2017-08-04 00:52:06 +00:00
Tri Vo
35c7bd2e2b VTS tests now static link to HAL def libs.
And use VtsHalTargetTestDefaults.

Bug: 64040096
Test: compiles
Merged-In: I3cfb1a64f6abcf3145337a736800b72d92a0b152
Change-Id: I3cfb1a64f6abcf3145337a736800b72d92a0b152
(cherry picked from commit 6c2bd86f70)
2017-08-03 13:28:08 -07:00
Steven Moreland
c716b8c307 Update makefiles for vndk enabled.
Test: none
Bug: 63866913
Change-Id: I29174fdadca2828455ef49f14e53bc95c5238dbb
2017-08-02 18:00:14 -07:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Steven Moreland
208a586cf8 Update HIDL makefiles.
Allow them to be static.

This is required for a couple of reasons:
- enabling HIDL passthrough in recovery
- enabling VTS tests to be static blobs

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Merged-In: I1b2401fb273ab80819e3870aa71fe742269674ba
Change-Id: I1b2401fb273ab80819e3870aa71fe742269674ba
(cherry picked from commit 7206708528)
2017-08-02 12:52:41 -07:00
Sohani Rao
ff16a48057 Merge "Wifi Offload HAL: Improve VTS tests for scanConfig" into oc-dr1-dev
am: cf43256fa9

Change-Id: I4c6a33f61d9278edc8640564bb151a347f69c17f
2017-07-31 19:59:30 +00:00
TreeHugger Robot
cf43256fa9 Merge "Wifi Offload HAL: Improve VTS tests for scanConfig" into oc-dr1-dev 2017-07-31 19:52:44 +00:00
Roshan Pius
82396e9e1b Merge "wifi(hidl): Modify the SAR power levels interface" into oc-dr1-dev
am: dda74bcf77

Change-Id: I504fe9096b855c6270c50c1e46b4e5ee26b9ea67
2017-07-28 02:51:57 +00:00
Roshan Pius
735ff43197 wifi(hidl): Modify the SAR power levels interface
Modifying the interface used to lower the tx power level for meeting SAR
requirements based on recommendation from the nexus hardware team. The
previous interface passed in a single power value in dBm for meeting SAR
requirements. However, the SAR requirements are more complex than that.
Based on the connection mode (802.11 a,b,g,n,ac) and the number of
streams that are active (MIMO), the SAR power levels are very
different. Using the previous interface would mean that we will have to
use the lowest power level among all the connection modes to meet the SAR
requirements. This would however result in us lowering the power much
more than needed (~2 dBm) for many connection modes.
Instead, we're switching to a more generic interface where the framework
informs the wifi chip that we're entering a special tx power mode scenario
(today, there is only 1 for voice call). The chip can then lookup the
extensive table of power levels for different connection modes which are
pre-populated by the OEM's in the BDF file to set the power level (depending
on the scenario framework sends and the active connection mode).

Bug: 62437848
Test: Manual tests
Change-Id: I5ee3f0d2c130958dbeb352e3b5ad9407f432624f
2017-07-27 14:05:03 -07:00
Sohani Rao
15ed448e49 Wifi Offload HAL: Improve VTS tests for scanConfig
Configure scans with test parameters from the Offload HAL service.

Bug: 36865676
Test: VTS tests
Change-Id: Iec5a3e837f9a2e2cf285b079a4630ff273727679
2017-07-26 11:29:37 -07:00
Roshan Pius
8d3ce3e6b9 Merge "supplicant(vts): Remove start/stop framework" into oc-dr1-dev
am: 28b744d2d9

Change-Id: I71a7dd0aa0e6de879b4ae3ac3fc5fb3fdaca36df
2017-07-24 23:16:21 +00:00
Roshan Pius
28b744d2d9 Merge "supplicant(vts): Remove start/stop framework" into oc-dr1-dev 2017-07-24 23:07:54 +00:00
Roshan Pius
145cce98b5 supplicant(vts): Remove start/stop framework
This is already done by the test harness on the host side. So, no need
to invoke this from within the gtest.

Bug: 63914399
Test: `make vts -j30 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 &&
vts-tradefed run commandAndExit vts --skip-all-system-status-check
--primary-abi-only --skip-preconditions --module
VtsHalWifiSupplicantV1_0Target -l INFO`

Change-Id: I43edc03492bf5e03f9a4236265c43baa5efcd61d
2017-07-24 14:13:48 -07:00
TreeHugger Robot
5115ed5268 Merge "wifi: Add owners" into oc-mr1-dev 2017-07-21 02:54:15 +00:00
Roshan Pius
1d047a7539 wifi: Add owners
Change-Id: If5a9a7da36b86f968bd32768d61e5d181573d30a
2017-07-20 14:39:29 -07:00
Etan Cohen
f26f9266c3 [HAL] Invalidate chip before shutting down legacy HAL
Change the order of shutdown to invalidate chips before
shutting down the legacy HAL. Allows pre-shutdown commands
to be sent down.

Bug: 63704506
Test: NAN tests passing
Test: full regression suite
Change-Id: I03d237d732b4e3482b1e1639848342dfdde9fcb7
2017-07-20 14:04:07 +00:00
Etan Cohen
a0c6d7d5c6 [HAL] Invalidate chip before shutting down legacy HAL
Change the order of shutdown to invalidate chips before
shutting down the legacy HAL. Allows pre-shutdown commands
to be sent down.

Bug: 63704506
Test: NAN tests passing
Test: full regression suite
Change-Id: I03d237d732b4e3482b1e1639848342dfdde9fcb7
2017-07-19 19:31:12 +00:00
TreeHugger Robot
b3ea84438b Merge "wifi: Add the missing RTT capabilities" into oc-dr1-dev 2017-07-18 23:04:26 +00:00
Etan Cohen
b14c7560f7 [VTS][NAN] Restore NAN test: configure for device support
Restore NAN test and use configuration which determines test
result based on whether or not the platform supports NAN.

Bug: 63131342
Test: NAN-supporting devices: pass (the NAN tests)
Test: Non-NAN-supporting device: pass
Change-Id: I6600abc531d4eb1dea6c501f6a39ef37051cb923
2017-07-18 10:52:10 -07:00
Keun Soo Yim
e034df0640 Accept a command line arg (nan_on) in wifi vts
Test: make vts -j30 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 &&
vts-tradefed run commandAndExit vts --skip-all-system-status-check
--primary-abi-only --skip-preconditions --module VtsHalWifiV1_0Host -l
INFO

Test: VtsHalWifiV1_0TargetTest
Test: VtsHalWifiV1_0TargetTest -N
Test: VtsHalWifiV1_0TargetTest --nan_on
Test: VtsHalWifiV1_0TargetTest -f (fails)
Test: VtsHalWifiV1_0TargetTest --gtest_filter=foo
Test: VtsHalWifiV1_0TargetTest --gtest_filter=foo -N
Test: VtsHalWifiV1_0TargetTest -N --gtest_filter=foo

Bug: 63131342

Change-Id: I359ac7238496e64c7ace1e14e797d4fcfc8cc0e4
2017-07-18 10:38:42 -07:00
Roshan Pius
08df76ec0d wifi: Add the missing RTT capabilities
These feature flags are defined in the legacy HAL, but were not exposed in the HIDL
interface.

Updated the hash in current.txt using 'hidl-gen -L hash -r
android.hardware.wifi@1.1:hardware/interfaces -r
android.hardware:hardware/interfaces -r
android.hidl:system/libhidl/transport
android.hardware.wifi@1.1::IWifiChip'

Bug: 63545934
Test: Manual testing
Change-Id: Ia196e0fc1c5e305210ec95eb8a54b1a1204ebf20
2017-07-17 13:21:23 -07:00
Roshan Pius
77d9eea1da supplicant(vts): Remove dependency on libwifi_hal
libwifi_hal is a vendor component, so these are not allowed to be used
in the VTS tests. Use the vendor HAL for the required initializations
instead since that is the flow used by framework anyway (setup the wifi
chip using vendor hal and then use wpa_supplicant for connections).

Bug: 63704014
Bug: 33241851
Test: make vts -j30 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 &&
vts-tradefed run commandAndExit vts --skip-all-system-status-check
--primary-abi-only --skip-preconditions --module
VtsHalWifiSupplicantV1_0Target -l INFO

Change-Id: I396d8311253e2b2493f9bb901731937019d30164
2017-07-14 19:25:32 +00:00
Roshan Pius
8184d210d2 wifi(implementation): Set/Reset TX power limit
Hookup the HIDL method calls to the respective newly added legacy
HAL functions for setting/resetting TX power limits for SAR
requirements.

Bug: 62437848
Test: VTS test fails because of a bug in Qcom implementation. Working
with Qcom to fix their implementation.
Change-Id: Ia619f5558e44d44fd77d037e72dfc1f6863b51e0
2017-07-11 14:03:06 -07:00
Roshan Pius
dbd83ef585 wifi(implementation): Create 1.1 interface package
1. Move the implementation in 1.0/default to 1.1/default.
2. Move all of the implementation to
android::hardware::V1_1::implementation namespace.
3. All of the header files include the android::hardware::V1_0 namespace
so that it can access the types from 1.0 package. ("using namespace" is
against Google style guide though :().
The other option to prefix each 1.0 type with the namespace name.
For example: V1_0::WifiStatus.
4. Added the implementation of the new 1.1 method
IWifiChip.setTxPowerLimit().
4. The executable name and the .rc still has 1.0 name in it to avoid
changing all the device.mk files.

TODO: Hookup to the new legacy HAL API.

Bug: 62437848
Test: mmm -j128 hardware/interfaces/wifi/1.1/default/
Test: Device boots up and able to connect to wifi networks.
Test: New VTS tests passes
Change-Id: Ib36282939e70b064f246041a03d8870f5cb6410e
2017-07-06 19:44:33 +00:00
Roshan Pius
ee3daf9ab6 wifi(interface): Create 1.1 interface package
Extend the wifi HAL to add a new method in IWifiChip. This new method is
used for setting the TX power limit for meeting SAR requirements.

Bug: 62437848
Test: ./hardware/interfaces/update-makefiles.sh
Test: mmm -j32 hardware/interfaces/wifi/1.1
Change-Id: I8320a64812339f15cd88636505de0dfda18f0ebf
2017-07-06 09:19:25 -07:00
Etan Cohen
c9836f95a1 [AWARE] Pass through full structure for end NDP command
The end NDP command is the only NAN HAL command which uses
a dynamically sized command structure. The original code
stripped out the non-static portions of the command - losing
the information. Modify the dynamically allocate at a lower
level of the shim.

Bug: 62569797
Test: integration tests now proceeding past failure point
Change-Id: I1732923aed64d7ec11649f0bad1731ab5bca13a0
2017-06-30 17:51:22 -07:00
TreeHugger Robot
934946a48c Merge "Offload HAL HIDL: Add return values to synchronous calls" into oc-dr1-dev 2017-06-22 17:40:02 +00:00
Etan Cohen
c4d9f87f66 [AWARE] Actually shut-down functionality when destroying NAN iface
Destroying the interface doesn't actually execute any functions on
the legacy HAL - i.e. on the HAL side. This may leave state around -
a problem when next "re-enabling" the interface as well as possibly
a power issue.

Add code to actually disable Aware and to destroy interfaces. There
is no need to check on current status since calls will simply fail
quietly if there's nothing to disable and nothing to destroy.

Bug: 62632805
Test: integration non-concurrence test cases NonConcurrencyTest
Change-Id: I11e5bd6f3ed47f6d709ff360c9f4adf5f40234a5
2017-06-15 08:59:51 -07:00
Sohani Rao
452ed3039c Offload HAL HIDL: Add return values to synchronous calls
Enhance the HIDL interface to return values indicating the status of the
operation requested by the API.

Bug: 32842314
Test: VTS
Change-Id: I9a75e2524c0256d5da405d5b1b5919d5342deebf
2017-06-08 13:45:29 -07:00
Etan Cohen
a7a059ebbf [AWARE] Fix validity check on PMK + export PASSPHRASE lengths
Bug: 62376042
Test: unit tests + integrated (sl4a) tests
Change-Id: I4c0e19a21a268fe7f2d38e82f3743ac5a8e2c6cb
2017-06-07 20:54:31 +00:00
Steven Moreland
f04fdeb83e Update internal makefiles.
These makefiles are not in dev topic branches
or AOSP currently so they were not updated. This
update adds hidl-generated-module defaults.

Test: pass
Change-Id: Ie52c54877d795bf5358aa600e6d1a13a4f166d25
2017-06-05 17:47:36 -07:00