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
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
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
The libcld80211 is vendor-specific. Remove from dependecy list.
(cherry-pick of commit aa281aa266)
Bug: 37901207
Test: builds and runs
Merged-In: If251002c2dd7a0e30ca18620edd905a63217f28a
Change-Id: If251002c2dd7a0e30ca18620edd905a63217f28a
Port of the retry logic added in HalDeviceManager for temporary IWifi.start()
failures when invoked immediately after IWifi.stop().
Bug: 38342536
Test: Run VTS tests
Change-Id: Ie58a08c45979bafa0c61fa1c8536a2c0a0cd8ed9
The libcld80211 is vendor-specific. Remove from dependecy list.
(cherry-pick of commit aa281aa266)
Bug: 37901207
Test: builds and runs
Merged-In: If251002c2dd7a0e30ca18620edd905a63217f28a
Change-Id: If251002c2dd7a0e30ca18620edd905a63217f28a
Passphrase has a lower and upper limit. The uppper limit check
was using the incorrect (lower) limit value.
Bug: 38164425
Test: builds & CtsVerifier test passes
Change-Id: I8a58f46a9558f828f8ccfda07935fcf62285f8c3
The libcld80211 is vendor-specific. Remove from dependecy list.
Bug: 37901207
Test: builds and runs
Change-Id: If251002c2dd7a0e30ca18620edd905a63217f28a
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I424371932af129bba9d58dcf8652c64297f35f05
This commit replaces libwifi-system with libwifi-system-iface because
libwifi-system is a framework-only library.
Bug: 37429084
Test: Sailfish builds, boots, and wifi works.
Change-Id: I2b7c68d60ee84d3dba7500d01323365a699e4ad4
DFS flag needs to be turned on in the legacy HAL for STA operations. So,
initialize this flag on creation of STA iface.
PS: Not adding an explicit HIDL API for this since there is no need to
toggle this from framework and since the HIDL API's are frozen now.
Bug: 36169790
Test: Verified the fix with regression tests: b/37528903.
Change-Id: I214097fcb399cef7fc0cbd2c278622fac259a3e3
HAL (HIDL) contained configuration of subscriber ID in
discovery beacons (useful for higher probability of
discovery, better cluster selection & merging).
This CL modifies the implementation of the HAL to set
the (new) legacy HAL hooks from the HIDL values.
Bug: 35195516
Test: integration (sl4a) tests pass
Change-Id: I6dc84723a534aa9fd80ca93907f896af710e1e23
Some devices don't support querying logger feature set. In that
case set the logger feature set value to 0 instead of failing
the query for regular WiFi feature set.
Bug: 37105075
Bug: 37483427
Test: get battery stats on Fugu.
Change-Id: I3e162f8ddeaaa1965b41518592a253c6c90ddfa7
This will cover all APIs except:
- startBackgroundScan
- stopBackgroundScan
- startSendingKeepAlivePackets
- stopSendingKeepAlivePackets
Bug: 32022435
Bug: 36813739
Test: run VtsHalWifiV1_0Target test
Change-Id: I71a1a97e4b0f1145657b249f3eb20305f810962b
The RequestDriverDebugDump API has a capability bit indicating if
supported on device. Calling if not supported should additionally
return ERROR_NOT_SUPPORTED - but does not today. This is arguably
not a valid issue - should not call API if already known not to be
supported.
Remove test for this (questionable) condition until decide on proper
semantics.
Bug: 36562856
Test: test passes
Change-Id: Ic8a1c8b5f77a1b1767c0efc9735731084dfde7cc
NAN is not enabled on O - update all WifiChip NAN tests to expect
failure.
These tests will start failing again on any platforms/code where
NAN is enabled. Will fix more comprehensively at that point.
Bug: 36562856
Test: build + run vts
Change-Id: I0eaf7934d327fb91bff59dd33bd4a8069888c967
This should help us figure out if there are multiple callback objects in
wifi_chip when we see the IPC storm from
onDebugRingBufferDataAvailable().
Bug: 36599054
Test: ACTS wifi tests.
Change-Id: I8c67032c59ecdd45824e131b59d890ce6c94fe25
The IE blob may not always be fully formed in gscan full scan results.
So, log errors when we hit a parsing error and return the IE elements we
could parse so far.
Bug: 36455164
Test: ACTS wifi gscan tests.
Change-Id: I804937ea5e69f51696aaabf3fe3f53850c145ad3
Legacy HAL update to add indications when a solicited publisher
receives a match. Not used in current HAL. However, also added a
control bit to turn off host notification which is now enabled.
Bug: 35195773
Test: integration (sl4a) tests
Change-Id: I8ff378abaae11d4feaa42a9901abb1b48069dc4f
libwifi-hal statically imports the vendor implementation of the legacy
HAL. Since the HIDL daemon is dynamically linking against libwif-hal,
there is no need for it to statically import the vendor implementation
library (one pointed to by: $LIBWIFI-HAL variable).
Bug: 36169790
Test: Compiles & device is able to connect to wifi networks with the
change.
Change-Id: Ie44b58328f9bdde011ba6d4a4d26f786c2d097e7
Restore the usage of WIFI-specific main function. The main
function was inadvertantly disabled by moving it into a static
library - which caused the default main to be used.
Need a custom main since need to stop WIFI before tests start
to enforce a clean starting point.
Bug: 35276551
Test: confirms custom main routine is called
Change-Id: I978827bc0f0f16d9ca4f159fbf42d0bc53f5df99
Add mechanism to configure data-path security using Passphrase
(as an alternative to PMK).
Bug: 35866810
Test: integration (sl4a) tests passing.
Change-Id: If7094a44af1996d3caf5b776d492797f14a7be11
The fallback HAL will return |WIFI_ERROR_NOT_SUPPORTED| when
|init_wifi_vendor_hal_func_table| is invoked. This should be sent as is
to the HIDL interface instead of sending |WIFI_ERROR_UNKNOWN|.
Bug: 34859006
Test: Compiles
Change-Id: I5fd132368715bd158e617ad3cf2e6f88d147cef7
Aware (NAN) VTS need to be in a separate test binary since whether
they run depends on the feature being supported by the device.
Bug: 36003265
Test: confirms separate binary built
Change-Id: If237e21e72a7c65f5587e40d98acb3146eae45a1
The flag |awaiting_event_loop_termination_| is accessed by multiple
threads, so make it atomic.
Bug: 33552618
Test: Compiles
Change-Id: I5ebe27fe88672565aae0daf34a89616d36f35f90
Previously, we've always assumed that we have only one instance of
radio stats fetched in link layer stats. This is no longer true for the
newer devices which support multiple radios.
Also,
Changed the timestamp member from uint32_t to uint64_t.
Bug: 36148086
Test: The error logs no longer seen on newer devices.
Change-Id: I048a1db7cc0bfb0dc0dacafff2156f42a8ae1e63
According to the legacy HAL header file, the LCI & LCR fields may not
always be populated. So, add null checks for them.
Bug: 36141536
Test: Compiles
Change-Id: Id2a5f5fd0eaf21b3a4d5cfcd26124c9fb6c90869
Add mechanism to define feature support flags to
configure set of Wi-Fi features supported on a particular
device.
Bug: 32997844
Test: integration tests
Change-Id: Iffbf3ba237013f1030b24c0173641234a9c27e5c
Currently, we invoke WifiLegacyHal.invalidate() inside the
|on_stop_complete_internal_callback| std::function. |invalidate|
nulls out |on_stop_complete_internal_callback| inside it which might be
considered a violation since we're deleting the std::function object
as we're executing it.
Bug: 36095153
Test: Compiles, start/stop wifi multiple times.
Test: Verified that a crash is not seen in asan build.
Change-Id: If83c1cbee78a1b6eca12686fcc1ec1de67134f13
These tests basically just ensure that we can call the corresponding
API's successfully. More tests will be added in further CL's.
Bug: 33459306
Test: mmm -j32 hardware/interfaces/wifi/1.0/vts/functional/
&& adb push out/target/product/angler/data/nativetest64/
VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest /data/ &&
adb shell /data/VtsHalWifiV1_0TargetTest
Change-Id: I12ad26653993ce7167d007a887e7aff07fd0a5ce
Relocate ranging report config in the legacy HAL. Match the correspoding
setting in the HIDL implementation (field itself not exposed).
Bug: 36065933
Test: integration (sl4a) tests
Change-Id: I651db9e8f63f8382706994d8b3b6cc266b77c73d
We can't rely on the ordering of these buckets to populate their
indexes. So, send them explicitly from the caller.
Bug: 35989680
Test: Compiles
Change-Id: Ife09440935eb3526636c27bfdd40c37c69c7ade2
Currently, we wait for the legacy HAL callback to complete to clear and
invalidate the chip objects and it's derivatives. This may cause us to
access the wifi legacy HAL in a indeterminate state (as it's processing stop)
on subsequent HIDL calls.
So, clear up the chip object and derivatives immediately after we
process the stop to prevent any subsequent calls from sneaking in.
Also,
Added a couple of logs when wifi HAL is started/stopped to help debug
such issues later.
Bug: 36026601
Test: Turn on/off wifi and switch to softap mode multiple times.
Change-Id: Id5c2c9a90a335b2de4ae331ac8610b1a4e7875da
Wifi Hal uses some gps components (LOWI) for gscans (location scans).
So, grant it gps group permission.
Denials:
03-03 16:56:03.845 623 6924 I QCALOG : [MessageQ_Client] connecting
to server [/data/misc/location/mq/location-mq-s]
03-03 16:56:03.845 623 6924 E QCALOG : [MessageQ_Client] connect
error: 13, [Permission denied]
Bug: 35959128
Test: Denials no longer seen.
Change-Id: Iddfddb46a585c7c15a26b1fa01889181e4a3cce1
Modified Wi-Fi test setup/tear-down to shutdown and start the
Android framework. The framework competes with the VTS to control
the HAL and so must be disabled for the duration of the test.
Added framework to support VTS testing with the Wi-Fi Aware (NAN)
interface.
Added all callback types (notifications, events) with ability to
wait for such callbacks.
Bug: 35276551
Test: gtest pass
Change-Id: I50847fccad457c2b225ba7f2e1760b4dbb4d363f
Looks like the legacy hal uses a null termination for indicating the
size of ssid.
While there,
Use the helper function to convert wifi band from hidl to legacy.
Bug: 35765841
Test: Integration tests pass now.
Change-Id: Ie480f9d6735a21c5ccedfc68bfde5f0d920dcdc9
Changes in the CL:
1. Add the buckets scanned bitmask to bgscan.
2. exposed the legacy HAL constants for Bgscan in the HIDL interface.
3. Add a stop method for ring buffer logging.
Bug: 35752950
Bug: 33194311
Test: Compiles
Change-Id: Idb2031c33c5a237d7447410fb733f8e408a17288
Data-path has two negotiation modes controlled during a
discovery session configuration as auto-accept or not (in
which case an event to framework is triggered).
Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I129ee48554daddb606bfd2c20ffdd867a6d998e0
Data-path security is configured using a specific cipher
type - corrected error which specified a set of cipher
types.
Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I2f2d21ebf68bd63906e60b5af76c8808864a1b46
This functionality is needed even for AP iface. So, duplicate this
method.
Changes in the CL:
1. Add getValidChannelsForBand() in IWifiApIface.
2. Rename StaBackgroundScanBan to WifiBand to make it a more generic
name.
3. Change the existing method name in IWifiStaIface to match with the
one in IWifiApIface.
While there,
Fix indentation in hidl_callback_util.h
Bug: 35663149
Test: Compiles
Change-Id: Iaeb6c323e13eedf2f98de92fea77e327c76ffa5b
Wire-up the SDEA service info (aka Extended Service Specific
Info) to the newly available legacy HAL.
Bug: 35193423
Test: integration (sl4a) tests
Change-Id: I2cbd82ecc4274c5137693dde34370f2b68646e19
Add capability to provide maximum number of subscribe
addresses that can be specified in a discovery session
configuration.
Bug: 34059183
Test: integration (sl4a) tests pass
Change-Id: I5aa875cf8f43a7ad215b52e2cf917dfbbb3b1195
There are a few flags which were not being reset before conversion in
hidl_struct_util.cpp. Fix those.
Bug: 35432118
Test: Compiles & tested with calling code changes.
Change-Id: If652ceed856cacf412f4dbf8eedbc351d04b6b89
Add a new utility to handle callback death notifications. The new class
HidlCallbackHandler will be used by all the HIDL interface objects to
manage callbacks. Any dead clients will automatically removed from the
cb list by the utility class.
Bug: 34840719
Test: Compiles
Test: Verified that the cbs are deleted on crashing the framework
manually
Change-Id: I0f7ba8b3ed717c2e8e8fbf744a2501d0ad2d48c8
Presently, the core of the Wifi test logic is
obscured by the boilerplate required to create
a callback.
This CL provides some utilities to simplify
the creation of a HIDL result callback, and
migrates existing Wifi code to use the new
utilities.
Along the way: add a .clang-format file, so
that I don't misformat code with 2-space
indents (the Google default).
Bug: 34817351
Test: vts-tradefed run commandAndExit vts --module=HalWifiHidlTargetTest
Change-Id: Id2c728f96c3369c74adc8dfce7228b0a15a0781e
Clarify that DW period specification on discovery session
does not override the overall system DW period specification
(if one is provided).
Bug: 35040192
Test: none - comment fix
Change-Id: Ia7c495f1cd50a4bce0ffbaf242e52bc4f110eef2
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.
Bug: 34135607
Test: marlin persist.hal.binderization on/off
Merged-In: I3f86c77c147514fe470f08088a66de312ae32d4e
Change-Id: I3f86c77c147514fe470f08088a66de312ae32d4e
* changes:
supplicant(interface): Remove redundant callbacks
wifi(implementation): Copy the user complete callback by value
wifi(implementation): Add status check for all cb invocation
wifi(implementation): Add global lock
The callback object may go out of scope by the time it's invoked. So,
make a copy of it. We're doing the same for the other user callbacks
received in this class.
Bug: 34930275
Test: Compiles
Change-Id: I275bba11ae8735a21514d871e8aa473f92f0fd7d
Add a global lock to address synchronization issues between the main
HIDL method servicing thread and the legacy HAL's event loop thread.
Also, added some documentation for the threading model used.
Bug: 34261034
Test: Compiles
Change-Id: I881111814ff5ebd601d6a4c85cf284b30ae47ed3
Large churn in files - seems to be mostly driven
by changes in generated code as opposed to HAL
changes.
Bug: 33459306
Test: build + vts-tradefed run commandAndExit vts --module=HalWifiHidlTargetTest
Change-Id: I1762a24108f9119dbc9c6807d6a2870f016a26d9
Add HAL definition to support Subscribe Service ID List Attribute
inclusion in beacons. Until support is added in legacy HAL will not
be functional.
Rationale: enhances likelihood of being able to find the right service.
Bug: 35195516
Bug: 35040192
Test: unit tests & integration (sl4a) tests
Change-Id: I343266e3277c7351f29f6851cb1a9c1746cda6e8
Add support for SDEA.ServiceInfo as extended service
specific information field in all SDF-related APIs:
discovery (configure & match), message sending and
receiving.
Rationale: SDEA.ServiceInfo will form the basis for
upper layer discovery protocols on NAN (e.g. mDNS).
Even if not exposed to user-facing API will need to
have handle to be able to create adaptation layers.
Bug: 35193423
Bug: 35040192
Test: unit test and integration (sl4a) tests.
Change-Id: I3fc225952e93a134d5e58795281238829ed4b1ea
Update some HIDL names to match more closely the spec
naming convention. Add comments - whenever possible
provide reference to NAN spec.
Bug: 34985658
Bug: 35040192
Test: unit tests and integration (sl4a) tests
Change-Id: I957fb8a9814b3acaf8b710d397fe18b39f6a8c77
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.
Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
Vendor-specific attribute support API is not fully functional or
thought out. The Tx portion is working but the Rx portion requires
additional configuration to prevent spamming the framework with all
vendor-specific attributes.
Remove until full solution is designed.
Bug: 35193235
Test: unit tests and integration (sl4a) tests.
Change-Id: I31a601af3b2c1f9f736130ce00abf73c55ac086a
Generate filegroups for .hal files so that driver/profiler build rules
can migrate to another project.
Bug: 34893894
Test: mmma hardware/interfaces -j32
Change-Id: Iefc98a6df16706fbb798bc32405fe8ff0c3de450
Fixes related to debugging during integration with
framework. Changes are due to errors in original
definition.
Bug: 32315992
Test: integration (sl4a) tests
Change-Id: I5c427e4d0f8677a611eb6d9abfa641a7f8406e31
Changes in the CL to fix bugs found while integrating
with framework:
1. Added IWifiApIface.setCountryCode()
Bug: 34682168
2. Fixed documentation nits in .hal files.
Bug: 34468218
3. Changed roaming state enum values.
Bug: 34715231
4. Added log for EBUSY in legacyErrorToString()
Bug: 34715469
5. Remove "-Wno-unused parameter" from Android.mk
Bug: 34611289
6. Remove the erroneous |onFailure| callback invocation in wifi.cpp.
7. Add null terminations to strings passed to legacy HAL API's
8. Remove unused |IWifiStaIface.stopDebugPacketFateMonitoring|.
Test: Compiles
Change-Id: If3a3e2f360a378c59dc56b8bbe3a0c6d400b3bd8
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds; verify HAL still works
In support of b/33844934
Change-Id: Ia086509b3433976524bc4a0ac4b24385840ce565
Change all the variables representing masks to the new bitfield type
in all the Wifi HIDL interfaces.
The generated code will still produce the underlying type of enum as
param. So, no changes are needed in the implementation.
Bug: 33358724
Test: Compiles
Change-Id: Id2e5dee2ce1f1ec8e744aa1c81d3cb9c66e7fc39
HAL: Refine first cut implementation of HIDL interfaces and bring
up-to-date with changes to HAL.
Server: connect to legacy HAL, convert all structures.
Bug: 32207606
Test: builds
Change-Id: Ice1ba44014aa98cc948c0d0202b4fd18bf875502
These tests don't do much currently other than assert that we can
configure the chip in the required modes and create all the iface
objects.
The |wifi_hidl_test_utils| contains all helper functions that will be
shared across the different test fixtures.
Bug: 33459306
Test: adb root && adb remount && adb push
out/target/product/angler/data/nativetest/wifi_hidl_test/wifi_hidl_test
/data/ && adb shell /data/wifi_hidl_test
Change-Id: Iaea8e264ab1ef9113f375d7f56acab851aff21aa
While there,
1. Remove the _SUPPORTED flag from all the capabailities to make it
consistent.
2. Correct the docstring for |create*Iface|.
Bug: 33673826
Test: Compiles
Change-Id: I26f6de3d681dec133b51ba5dd7f21a29c92ea238
Implementation of the debug ring buffer data collection mechanism.
Changed the interface to pass the raw bytes sent by the driver. This
will be captured as is into the bugreport.
Note: Please see the associated bug on why this data is not being parsed.
Also,
Fixed a bug in the legacy HAL API for retrieving ring buffer status.
Bug: 33638159
Test: Compiles
Change-Id: I9d8f400142b1be4fbf8c85679e8a52d6af17b09e
The following new notifications are added:
1. onChipReconfigureFailre - Invoked if there is an error during
configuration.
2. onIfaceAdded - Invoked on addition of an iface.
3. onIfaceRemoved - Invoked on removal of an iface.
Bug: 33679304
Bug: 33038823
Test: Gtests
Change-Id: Id3fa19420d1e1e8d209ec88a1fbd36a64afb5252
Still figuring out how to send this data over the HIDL callback. Adding
this missing wrapper in legacy hal for now.
Bug:33638159
Test: Compiles
Change-Id: Ifce06a796d54e10c582b9896425899a45162a45f
This is a debug mechanism provided for vendors to inform the framework
about the occurence of any fatal events.
Bug: 33620898
Test: Compiles
Change-Id: Ib6ac322131796792f66f87237a62eb8f5a013433
Porting over the 3 new features added to legacy HAL for O to HIDL
interface:
1. Firmware roaming control.
2. Scan randomizations support.
3. Probe IE whitelisting for privacy enhancements.
Bug:32638647
Test: Compiles
Change-Id: Ia4666e3824186bbcfb8599b337eee7c81f256503
This is a port of all the existing stub functions from HalTool. Will
deprecate and remove HalTool once framework switches over to HIDL.
These stubs are important because the vendor implementations don't fill
a function pointer in the table (when |init_wifi_vendor_hal_func_table| is
invoked) if they don't implement that feature.
Bug: 33540636
Test: Gtests
Change-Id: Ia41c4faa30b517731a162f3999d64a3f2c34e058
This is needed to support dynamically switching between ifaces
within the same mode.
While there, correct couple of nits:
1. Pass std::string to the |get*IfaceInternal| methods. This makes the
name comparison easier.
2. Update the docstring of |get*Iface| in IWifiChip.hal to indicate that
we'll return ERROR_INVALID_ARGS if the iface name is wrong.
Bug: 33040049
Test: Compiles
Change-Id: I53584013283a10bf109f1c2ffb6136c44f11ed29
Changes:
1. Add |is_started_| flag in WifiLegacyHal to ignore stop/start
requests when they're already in the same state.
2. Detach the event loop thread and remove the class member storing
the thread handle.
While there,
1. Cleanup some logs to better help debug issues.
2. Also fixed the wrong method name used in WifiModeController.
Bug: 33480898
Test: Gtests run successfully.
Change-Id: I913f656206a2ca7a79fb316501c256fcdc32aed9
Based on the mode configured, limit the iface creation.
Note: Support for iface removal will be added in a follow up CL which
should help us use P2P or NAN iface dynamically.
Bug: 31997422
Test: Compiles
Change-Id: Idde2f3b749264d542d5d6608b0b2c5aa8103ade6
If these are not reset, any subsequent calls will not be processed
because the callback pointers are set.
Bug: 33379596
Test: Compiles
Change-Id: Ia44385fc185b7cf262366af7b0e0e62c32a0d9a0