summaryrefslogtreecommitdiff
path: root/wifi/1.0/default/hidl_struct_util.cpp
AgeCommit message (Collapse)Author
2017-07-06wifi(implementation): Create 1.1 interface packageRoshan Pius
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-06-07[AWARE] Fix validity check on PMK + export PASSPHRASE lengthsEtan Cohen
Bug: 62376042 Test: unit tests + integrated (sl4a) tests Change-Id: I4c0e19a21a268fe7f2d38e82f3743ac5a8e2c6cb
2017-05-09[AWARE] Passphrase limit check used incorrect limitEtan Cohen
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
2017-04-27[HIDL][AWARE] Check for and fix corrupted char[] from legacy HALEtan Cohen
Check that char[] from legacy HAL are: - Null terminated - ASCII (truncate up-to first non-ASCII) Bug: 37704662 Test: integration (sl4a) tests passing (up-to other issues) Change-Id: I84cf09923594b3a5c0dfa5267edd844fb375c595
2017-04-20[AWARE] Configure the subscribe information in beaconsEtan Cohen
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
2017-04-05Merge "[AWARE] Legacy HAL update: reduce host wakeup" am: 6ae199efa4 am: ↵Etan Cohen
c6e4705e9d am: 7f4335b30a Change-Id: I90570e1f80662d0557eb1f30623e609c5bed8716
2017-04-05wifi(implementation): Ignore IE parsing errorRoshan Pius
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
2017-04-04[AWARE] Legacy HAL update: reduce host wakeupEtan Cohen
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
2017-04-04[AWARE] Create true translations between legacy and hidl enumsEtan Cohen
Replace implicits translations between legacy and hidl enums (using casts) with explicit translations. (cherry-pick of commit 284511779ca6c425a4f701ca8098484d954e13c4) Bug: 35767620 Test: integration (sl4a) tests Merged-In: I4ae4cd691226ce29bc0e92f9890fbb343a064505 Change-Id: I4ae4cd691226ce29bc0e92f9890fbb343a064505
2017-04-03[AWARE] Create true translations between legacy and hidl enumsEtan Cohen
Replace implicits translations between legacy and hidl enums (using casts) with explicit translations. Bug: 35767620 Test: integration (sl4a) tests Change-Id: I4ae4cd691226ce29bc0e92f9890fbb343a064505
2017-03-21[AWARE] Add Passphrase data-path securityEtan Cohen
Add mechanism to configure data-path security using Passphrase (as an alternative to PMK). Bug: 35866810 Test: integration (sl4a) tests passing. Change-Id: If7094a44af1996d3caf5b776d492797f14a7be11
2017-03-13wifi: Add support for multiple radio statsRoshan Pius
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
2017-03-11wifi(implementation): Add null checks for RTT resultRoshan Pius
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
2017-03-08[AWARE] Relocate ranging field in legacy HAL - match in HIDL implEtan Cohen
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
2017-03-08wifi: Fetch the gscan bucket idx from requestRoshan Pius
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
2017-03-02wifi(implementation): Clear all structs before conversionRoshan Pius
Bug: 35445613 Test: Integration tests Change-Id: I5c32ab580588f4521291ac8cb05ee42ce6e5bf31
2017-03-01wifi(implementation): Use strlen for size of ssidRoshan Pius
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
2017-02-28wifi: Few minor interface changesRoshan Pius
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
2017-02-24[AWARE] Data-path negotiation updateEtan Cohen
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
2017-02-24[AWARE] Data-path cipher API correctionEtan Cohen
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
2017-02-22wifi: Duplicate getValidChannelsForBand in AP ifaceRoshan Pius
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
2017-02-21[AWARE] Add service support for SDEA service infoEtan Cohen
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
2017-02-20[AWARE] Ranging as a service discovery constraintEtan Cohen
Ranging configuration modification: change from an overall Aware configuration (remove from Enable/Config structures) to a discovery session-specific configuration. Bug: 33821639 Test: integrated (sl4a) tests Change-Id: Ie5a8bb3701a5dd6186c15d2be16bca3ec7202f04
2017-02-17[AWARE] Add capability info: max subscribe addressesEtan Cohen
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
2017-02-16wifi(implementation): Initialize flags before conversionRoshan Pius
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
2017-02-10[AWARE] Update capabiltiesEtan Cohen
Update capability configuration to reflect added/remove fields: - Added extendedServiceSpecificInfo - Remove vendor-specific attribute (VSA) Bug: 35193423 Bug: 35193235 Test: unit tests and integration (sl4a) tests Change-Id: I0dad08ff9d16ea54f5db7303cc5f90e942f48037
2017-02-10[AWARE] Add support for Subscribe Service ID List AttributeEtan Cohen
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
2017-02-10[AWARE] Add support for SDEA.ServiceInfo fieldEtan Cohen
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
2017-02-10[AWARE] Update HIDL to match spec and add commentsEtan Cohen
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
2017-02-09[AWARE] Remove support for vendor-specific attributesEtan Cohen
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
2017-01-31Wi-Fi/NAN HAL/service fixupsEtan Cohen
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
2017-01-19Don't memset &ptrGeorge Burgess IV
Bug caught by running clang-FORTIFY on Android. Bug: None Test: Builds Change-Id: I23ed01cf23bdba74fb141d0b0d61c0da4c750a42
2017-01-17wifi: Add capabilitiy flag for ND offloadRoshan Pius
Bug: 34224734 Test: Compiles Change-Id: If4e6303fdff792a9dd576551fd84a741d8183798
2017-01-11wifi: Add keep alive packet sending functionalityRoshan Pius
Bug: 34233272 Test: Compiles Change-Id: Ia9b1d24cccf3ec6a09bbb6b6e9d1f4bc13623767
2017-01-10[AWARE] Update HIDL interface and link to legacy HALEtan Cohen
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
2016-12-16wifi: Add remaining capability flags from legacy HALRoshan Pius
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
2016-12-16wifi: Add support for alert handlerRoshan Pius
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
2016-12-15wifi: Port over O features to HIDLRoshan Pius
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
2016-12-08wifi: Add support for RSSI monitoringRoshan Pius
Bug: 31991459 Test: Compiles Change-Id: I8794cea12a0d1c727bd0e37123152c8da11eeabf
2016-12-08wifi: Add method implementations in IWifiRttControllerRoshan Pius
Hookup the legacy HAL functions to the corresponding HIDL methods in WifiRttController and perform the necessary struct conversions. Bug: 31991232 Test: Compiles Change-Id: I7bd8bd7e7af2230699c079f1ad8e0a8b1e496026
2016-12-08wifi: Gscan struct conversion changesRoshan Pius
Rename |Scan| to |Gscan| because that is the naming we've been using in WifiLegacyHal. Also group all the gscan related sturct conversion methods. Bug: 31991459 Test: Compiles Change-Id: Ie64bcc032a0058b5b20d0bb701020cdf7bf08890
2016-12-08wifi: Add some more missing struct conversionsRoshan Pius
Add the remaining struct conversions and the feature set to HIDL capabilities conversions. The legacy feature set is distributed based on where the functionality is exposed to IWifiChip & IWifiStaIface HIDL interfaces. Bug: 31991459 Bug: 32221997 Test: Compiles Change-Id: Ifdeac1bd7325b7a0581ec225b025ef0f6980c512
2016-12-08wifi: Remove unused methods in IWifiRttControllerRoshan Pius
These are currently unused in the legacy HAL function table and there isn't any need for these to be migrated over to HIDL. Bug: 31991232 Test: Compiles Change-Id: I50611d1fd5a6ac276e7911ca1920c3d5ee2d5ba6
2016-12-08wifi: Add RTT structure conversion methodsRoshan Pius
While there, Hide |convertLegacyIeBlobToHidl| from hidl_struct_util.h. There is no need for any of the HIDL objects to directly use this. They will be used internally in |convertLegacyScanResultToHidl|. Bug: 31991232 Test: Compiles Change-Id: I5702906ea84e3c77fece7be5f9d48ff3ae418c41
2016-12-08wifi: Convert packet fate structures from legacy to HIDLRoshan Pius
While there fixed a couple of nits, 1. Correct a typo in one of the packet fate structs in the .hal file. 2. Renamed the scan data flag and added a helper function to convert the legacy flag to it's equivalent and loop through it. Bug: 32221997 Test: Compiles Change-Id: I414a7731054e6400d22d4e6deae9495b48dce461
2016-12-08wifi: Begin NAN iface methods implementationRoshan Pius
Start implementation of the NAN iface HIDL methods by plumbing the HIDL stubs to the corresponding legacy HAL methods. The incoming HIDL struct needs to be converted to legacy for the HIDL methods. The legacy HAL structs needs to be converted to HIDL for callbacks. This CL only has a couple of methods and some structure conversion. etan@ will take over the rest. Bug: 31991076 Test: Compiles Change-Id: Ide348f4c3318822226bb7de93d091107c7465cd3
2016-12-02wifi: Add utility for struct conversionsRoshan Pius
Add a new utility file (hidl_struct_util) which would contain helper functions to convert legacy HAL structures to HIDL structures and vice versa. Added utility functions to convert: 1. Background scan params from HIDL to legacy. 2. Scan Result from legacy to HIDL. 3. Cached Scan results from legacy to HIDL. 4. Link layer stats from legacy to HIDL. Bug: 31991459 Test: Compiles Change-Id: I48a49b43d425f8cc3059241c4bd652b2346f2381