Commit graph

145 commits

Author SHA1 Message Date
Roshan Pius
88c3272d0e wifi(implementation): Initialize flags before conversion
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-16 12:50:08 -08:00
mukesh agrawal
90f321722c wifi(vts): simplify HIDL calls
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
2017-02-15 12:47:02 -08:00
Etan Cohen
751dc694a4 Merge "[AWARE] Correct comment on Discovery Window usage" 2017-02-15 14:52:54 +00:00
Treehugger Robot
8cd0125d2e Merge "Remove --coverage in Android.bp" 2017-02-15 05:08:19 +00:00
Etan Cohen
06cd8de39e [AWARE] Correct comment on Discovery Window usage
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
2017-02-14 13:51:11 -08:00
Steven Moreland
46c0b94992 Move hidl shims to the vendor partition.
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
2017-02-13 23:14:38 +00:00
Roshan Pius
3646298ab6 Merge changes Ieee26013,I275bba11,I7e7258e7,I88111181
* 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
2017-02-13 21:25:39 +00:00
Roshan Pius
742bb97769 wifi(implementation): Copy the user complete callback by value
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
2017-02-13 13:25:15 -08:00
Zhuoyao Zhang
65c99d7f08 Update vts files on aosp.
* Based on the latest hidl-gen and .hal files.

Test: mma
      make vts.

Change-Id: I4765450d985afd552fe720d91b9ab3422f5b7a47
2017-02-12 13:51:06 -08:00
Roshan Pius
bc662205c6 wifi(implementation): Add status check for all cb invocation
Bug: 34820508
Test: Compiles
Change-Id: I7e7258e782142bae7373fa0543e6c17184b043a9
2017-02-10 22:03:40 -08:00
Roshan Pius
091e1c1f3a wifi(implementation): Add global lock
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
2017-02-10 22:03:40 -08:00
Etan Cohen
96518722ee Merge "[WIFI] Update VTS generated file" 2017-02-11 04:38:06 +00:00
Etan Cohen
ff7aac5a5a [WIFI] Update VTS generated file
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
2017-02-10 18:14:02 -08:00
Etan Cohen
10569b1bb4 Merge "[AWARE] Update capabilties" 2017-02-11 00:58:36 +00:00
Etan Cohen
11cea0d4a3 Merge "[AWARE] Add support for Subscribe Service ID List Attribute" 2017-02-10 23:12:14 +00:00
Etan Cohen
97c3540042 Merge "[AWARE] Add support for SDEA.ServiceInfo field" 2017-02-10 23:11:55 +00:00
Etan Cohen
66dcae0656 Merge "[AWARE] Update HIDL to match spec and add comments" 2017-02-10 23:11:37 +00:00
Etan Cohen
4daf983274 [AWARE] Update capabilties
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 12:45:55 -08:00
Etan Cohen
b9b71cee37 [AWARE] Add support for Subscribe Service ID List Attribute
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 12:45:55 -08:00
Etan Cohen
2373fe2a88 [AWARE] Add support for SDEA.ServiceInfo field
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 12:45:55 -08:00
Etan Cohen
44983aeea9 [AWARE] Update HIDL to match spec and add comments
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-10 12:45:11 -08:00
Dan Willemsen
84107a0630 Remove --coverage in Android.bp
It's no longer allowed now that Soong supports code coverage.

Bug: 32749731
Test: None
Change-Id: I09ef27983e0744543c3a6e1c0c73d69217dd582c
2017-02-10 09:29:36 -08:00
Etan Cohen
ff14eb32cd Merge "[AWARE] Modify the discovery session handle to uint8_t" 2017-02-10 02:48:43 +00:00
Tri Vo
06da29ffae Use filegroup as genrule srcs.
Test: mmma hardware/interfaces -j64
Change-Id: If282ed5f4a87045d169fcea7ad648b046a5f1cfb
2017-02-10 02:18:07 +00:00
Andreas Huber
0574bacb2a Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 16:56:56 -08:00
Etan Cohen
073bb9943a [AWARE] Modify the discovery session handle to uint8_t
Match the NAN protocol.

Bug: 35040192
Test: unit tests + integration (sl4a) tests
Change-Id: I9b39d184708c6e000bd4d84f97659f20d7ec75fd
2017-02-09 12:30:23 -08:00
Etan Cohen
ccb1562771 [AWARE] Remove support for vendor-specific attributes
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-02-09 12:30:18 -08:00
Tri Vo
ac9f1c02f3 Remove vts driver/profiler build rules.
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
2017-02-06 13:54:41 -08:00
Keun Soo Yim
5d6712c7e1 move VTS stub files and non-functional tests (aosp)
Test: mma
Bug: 34976004
Merged-In: Id9c88a9778fba49f0841a474aa067d271f14e207
Change-Id: Id9c88a9778fba49f0841a474aa067d271f14e207
2017-02-04 02:52:31 +00:00
Zhuoyao Zhang
a0ff9aca7a Merge "Support driver/profiler for all hals." 2017-02-03 00:43:03 +00:00
Zhuoyao Zhang
bd752892b3 Support driver/profiler for all hals.
* Update the make file to generate driver/profiler for hals.

Test: mma
Change-Id: I2a91d913b05beb8e1ecf28a205852f848ef1f5ee
2017-02-01 20:53:21 -08:00
Roshan Pius
795bb81596 wifi: Add scanning mac oui setter
Bug: 34886995
Test: Compiles
Change-Id: I55d4cf55d1832f27de975f97c2e739012ddacc28
2017-02-01 21:57:40 +00:00
Etan Cohen
4bbc209282 Wi-Fi/NAN HAL/service fixups
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-31 14:39:57 -08:00
Roshan Pius
32fc12ea4f wifi: Fixing Nits
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
2017-01-30 15:12:31 -08:00
Keun Soo Yim
69a910f802 Add host-side code for wifi HAL test
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 HalWifiHidlTargetTest
-l INFO

Bug: 34179464
Change-Id: I70c9495a5f2cb0c726373969ada5e33a00cc4c18
2017-01-23 12:34:49 -08:00
Chris Phoenix
133aa77f8a Merge "wifi HAL uses "default" service name" 2017-01-20 23:10:13 +00:00
Treehugger Robot
77b36c33b7 Merge "Don't memset &ptr" 2017-01-20 20:14:59 +00:00
George Burgess IV
ccd12b1ac1 Don't memset &ptr
Bug caught by running clang-FORTIFY on Android.

Bug: None
Test: Builds
Change-Id: I23ed01cf23bdba74fb141d0b0d61c0da4c750a42
2017-01-19 13:22:33 -08:00
Chris Phoenix
ab8166fa4e wifi HAL uses "default" service name
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
2017-01-18 17:47:07 -08:00
Roshan Pius
720f4bdbc9 wifi(vts): Generate the .vts files
Generates the .vts files for all wifi HIDL interfaces.

hidl-gen -o hardware/interfaces/wifi/1.0/vts/ -L vts -r
android.hardware:hardware/interfaces -r
android.hidl:system/libhidl/transport android.hardware.wifi@1.0
hidl-gen -o hardware/interfaces/wifi/supplicant/1.0/vts/ -L vts -r
android.hardware:hardware/interfaces -r
android.hidl:system/libhidl/transport
android.hardware.wifi.supplicant@1.0

Bug: 32022435
Test: Compiles
Change-Id: Idb037dafb72e645e5f6618bc909ba02ae7232e77
2017-01-18 11:02:08 -08:00
Roshan Pius
5c3a0d9666 wifi(interface): Use the "bitfield" type for masks
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
2017-01-18 09:49:17 -08:00
Roshan Pius
656f82054a wifi: Add capabilitiy flag for ND offload
Bug: 34224734
Test: Compiles
Change-Id: If4e6303fdff792a9dd576551fd84a741d8183798
2017-01-17 12:59:55 -08:00
Roshan Pius
5f1f3557aa Merge changes Ia9b1d24c,I86980cd2
* changes:
  wifi: Add keep alive packet sending functionality
  wifi: Add nd offload functionality
2017-01-13 16:46:15 +00:00
Roshan Pius
9a9869a759 wifi: Add keep alive packet sending functionality
Bug: 34233272
Test: Compiles
Change-Id: Ia9b1d24cccf3ec6a09bbb6b6e9d1f4bc13623767
2017-01-11 17:04:31 -08:00
Roshan Pius
af727c0cc8 wifi: Add nd offload functionality
Bug: 34224734
Test: Compiles
Change-Id: I86980cd27ea97216c9431878bb9a922c8942b361
2017-01-11 16:43:38 -08:00
Yifan Hong
10ac9b44f5 Bp/n/sFoo -> Bp/n/sHwFoo
Bug: 33554989
Test: hidl_test
Change-Id: I748181e9eaf5b78318054b9fd99ac1a43d00498a
2017-01-10 16:01:46 -08:00
Etan Cohen
f01bcaa9a3 [AWARE] Update HIDL interface and link to legacy HAL
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
2017-01-10 11:53:34 -08:00
Steven Moreland
c67a682e3a Return<*> getStatus().isOk() -> isOk()
Bug: 31348667
Test: compiles
Merged-In: If8d5a23f80dbc04127635b49f1ef77398fc9f8a1

Change-Id: If8d5a23f80dbc04127635b49f1ef77398fc9f8a1
2017-01-04 20:20:23 -08:00
Martijn Coenen
4faa7f5b27 Fix wifi/bluetooth threadpool usage.
Bug: 31226656
Test: mma, hidl_test
Change-Id: I3f30f32392714ed653498828172165e511f847e7
2016-12-30 11:24:18 +01:00
Roshan Pius
1ae4cbbb82 wifi(vts): Add framework for gtests
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
2016-12-16 18:06:39 -08:00