Commit graph

606 commits

Author SHA1 Message Date
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
Roshan Pius
dbd09c6bb8 supplicant(interface): Add the new radio work methods
These radio work methods can be used by external programs (wificond in
our case) to request wpa_supplicant to stop doing any offchannel
operations.

Also,
1. Add the setUpdateIdentifier method in ISupplicantStaNetwork.
2. Add the setProactiveKeyCaching method in ISupplicantStaNetwork.
3. Add sendNetworkEapSimGsmAuthFailure &
sendNetworkEapSimUmtsAuthResponse in ISupplicantStaNetwork.
4. Add the setWpsDeviceType() method in ISupplicantIface.

Bug: 34454675
Bug: 32581374
Test: /hardware/interfaces/update_makefiles.sh
Change-Id: I83fe577f6bd39d2daef2cb203ad9a8a93657c988
2017-01-24 14:46:08 -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
Chris Phoenix
fa3cb1766e Merge "wpa_supplicant HAL uses "default" service name" 2017-01-20 23:10:05 +00:00
Treehugger Robot
77b36c33b7 Merge "Don't memset &ptr" 2017-01-20 20:14:59 +00:00
Roshan Pius
639bb13553 Merge changes from topics 'id_str_supplicant_hidl', 'p2p_wps_supplicant_hidl'
* changes:
  wifi(vts): Generate the .vts files
  wifi(interface): Use the "bitfield" type for masks
  supplicant(interface): Add sta network idstr & ft key mgmt
  supplicant(interface): Add missing STA callbacks
  supplicant(interface): Add various WPS device params
  supplicant(interface): Add P2P iface methods/cbs
2017-01-19 22:51:22 +00:00
Chris Phoenix
b64f563bc2 wpa_supplicant 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: Ib80edecf53adf442e935a2535b8cc6e2e5aefd1e
2017-01-19 13:38:21 -08: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
522e62d54b supplicant(vts): Add gtest framework
Bug: 33457575
Test: adb push
out/target/product/angler/data/nativetest/supplicant_hidl_test/supplicant_hidl_test
/data/ &&  adb shell /data/supplicant_hidl_test
Change-Id: I8b560483166822a33b8d81433178fdbc6077ec11
2017-01-18 12:02:13 -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
2d50db95b4 supplicant(interface): Add sta network idstr & ft key mgmt
Bug: 34284015
Bug: 32571829
Test: Compiles
Change-Id: Id4d08657a4ed5a76f727e89c19991a65ce7f91e5
2017-01-18 09:06:33 -08:00
Roshan Pius
6eb05a2fc7 supplicant(interface): Add missing STA callbacks
Add a few missing callbacks in ISupplicantStaIfaceCallbacks &
ISupplicantCallbacks.

Bug: 34274091
Test: Compiles
Change-Id: I5d7819f9708f6caa4da80ed481408e376a5636f8
2017-01-18 09:06:33 -08:00
Roshan Pius
4984f9ab80 supplicant(interface): Add various WPS device params
Add setters for the various params used for WPS operations.

While there,
Add missing error code in IWifiStaIface method docstrings.

Bug: 34198758
Test: Compiles
Change-Id: I3b4709083975320210c9ed2dff59852372778483
2017-01-18 09:06:33 -08:00
Roshan Pius
09f2ce3b3e supplicant(interface): Add P2P iface methods/cbs
Add the missing P2P iface methods and callbacks.

Bug: 34221586
Test: Compiles
Change-Id: I9bace8ac5304dd65d81bb255dac023657c9460cc
2017-01-18 09:06:33 -08:00
Roshan Pius
ab16b319f4 Merge "wifi: Add capabilitiy flag for ND offload" 2017-01-18 15:33:47 +00: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
08e6bbacf2 supplicant(interface): Add interface for WPS
Add the methods/callbacks required for WPS functionality through
wpa_supplicant.

Bug: 34198758
Test: Compiles
Change-Id: Iff1450621a4b039307ad6098f98326c35e53d4c6
2017-01-17 08:28:46 -08:00
Treehugger Robot
147abafc18 Merge "supplicant(interface): Fix a typo in documentation" 2017-01-13 19:05:01 +00: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
43a4e12d9a supplicant(interface): Fix a typo in documentation
Bug: 33470645
Test: Compiles
Change-Id: I79789f64610ab7196b32794f4a7c264a2d9d7a8b
2017-01-12 12:51:26 -08: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
Roshan Pius
e663f83a91 supplicant(interface): Remove unused params
Theese params in flushService & configureExtListen are unused.

Bug: 33705000
Test: Compiles
Change-Id: I38ff75af32951274100d1d60a5fdfa6aa101cb50
2016-12-16 16:03:09 -08:00
Roshan Pius
a2d369dd03 wifi: Add remaining capability flags from legacy HAL
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-16 14:08:30 -08:00
Roshan Pius
48185b2a2d wifi: Debug ring buffer data collection
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
2016-12-16 14:08:00 -08:00
Roshan Pius
2c06a3f8c8 wifi: Add chip level callbacks
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
2016-12-16 13:06:39 -08:00
Roshan Pius
adc87cbab9 WifiLegacyHal: Add missing ring buffer callback dereg
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
2016-12-16 13:06:39 -08:00
Roshan Pius
203cb031df wifi: Add support for alert handler
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-16 13:06:34 -08:00
Roshan Pius
26801cb4ce wifi: Port over O features to HIDL
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-15 21:49:30 -08:00
Roshan Pius
3f050c1a0f supplicant(interface): Add support for DRIVER commands
These were legacy commands added to wpa_supplicant specifically for
android when the vendor HAL did not exist. These string commands are
passed as passthough to the driver by wpa_supplicant. Instead of adding
a single method to pass through these strings. Add separate methods for
each "DRIVER xxx" command that we currently used in Android framework.

Bug: 32699292
Test: Compiles
Change-Id: I8b62b3250496fa996bb97b4af0ba570a3d345cc3
2016-12-16 05:36:35 +00:00
Treehugger Robot
698b6a9614 Merge "Update makefiles for Java package path." 2016-12-14 03:43:58 +00:00
Yifan Hong
b85d8763c7 Update makefiles for Java package path.
use V1_0 instead of 1.0.

Bug: 33554192

Test: hidl_test_java
Change-Id: Ic2d95265df10914a60a5bb743d75e839948838c3
2016-12-13 18:06:24 -08:00
Roshan Pius
118598a8db supplicant(interface): Add network param getters
These getters are needed for migration of network configs from
wpa_supplicant to the new config store.

Bug: 31497348
Test: Compiles
Change-Id: I970ea3ca070a3bb7344bc51664159ce0e95a18db
2016-12-13 16:41:57 -08:00
Roshan Pius
d11fc7eace supplicant(interface): Add 2 sta iface callbacks
Add callbacks for:
1. Disconnection from the currently connected network.
2. Association rejection from the AP.

Bug: 33416261
Test: Compiles
Change-Id: Ifde45bf7db353f399bd7dc291af0d069f8387e3b
2016-12-13 16:02:47 -08:00
Roshan Pius
e73a506912 wifi: Add legacy HAL stubs
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
2016-12-13 14:34:38 -08:00
Roshan Pius
8b55e6f475 wifi: Add support for removing iface
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
2016-12-13 14:34:33 -08:00
Roshan Pius
11f930321b wifi: Fixes in WifiLegacyHal
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
2016-12-13 13:40:29 -08:00
Roshan Pius
073d5b9fdc wifi: Disallow iface creation based on mode
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
2016-12-09 17:10:23 -08:00
Roshan Pius
e3f25f1d0f supplicant(interface): Correct ANQP enum value/type
Correct the HS20 subtype & Anqp Info ID enum value/type to match
what is used in wpa_supplicant core.

Bug: 33493298
Test: Compiles
Change-Id: I5b25d334271c39d977e2990c643f4a2b01872f1a
2016-12-09 16:11:42 -08:00
Roshan Pius
282a0b35b8 supplicant(interface): Minor fixes in P2P iface
Fixing couple of issues found in the interface during implementation.
1. WpsProvisionMethod::KEYPAD is not used in wpa_supplicant core. It is
only used inside Android framework. So, remove them.
2. Added |setDisallowedFrequencies| method.
3. Changed the pin type to string from vector of bytes because that is
used by Android framework and wpa_supplicant.

Bug: 31497295
Test: Compiles
Change-Id: I69db530e23c2d3af907c3a5c824cf8291cf12c35
2016-12-09 16:09:51 -08:00
Roshan Pius
7a41d9d59f wifi: Reset internal callback pointers on failure
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
2016-12-08 17:58:50 -08:00
Roshan Pius
d476754bc0 wifi: Add support for RSSI monitoring
Bug: 31991459
Test: Compiles
Change-Id: I8794cea12a0d1c727bd0e37123152c8da11eeabf
2016-12-08 17:58:50 -08:00
Roshan Pius
e3f72ff344 wifi: Add method implementations in IWifiRttController
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-08 17:58:50 -08:00
Roshan Pius
970f031170 wifi: Add method implementations in IWifiStaIface
Hookup the legacy HAL functions to the corresponding HIDL methods in
WifiStaIface and perform the necessary struct conversions.

Bug: 31991459
Test: Compiles
Change-Id: I8c0b9be2e375dd7147408e41a88de3f1c6f98d08
2016-12-08 17:58:50 -08:00
Roshan Pius
e2d0ab52ea wifi: Add logger method implementations in IWifiChip
Hookup the legacy HAL functions to the corresponding HIDL methods in
WifiChip and perform the necessary struct conversions.

Bug: 32221997
Test: Compiles
Change-Id: I2b0cfd6484c7599e96e9edfcef18ac3148e28307
2016-12-08 17:58:50 -08:00
Roshan Pius
881d1f7823 wifi: Gscan struct conversion changes
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-08 17:58:50 -08:00
Roshan Pius
f72df2e186 wifi: Add some more missing struct conversions
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-08 17:58:50 -08:00
Roshan Pius
824e475cd1 wifi: Remove unused methods in IWifiRttController
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-08 17:58:50 -08:00
Roshan Pius
3fae9c82a0 wifi: Add RTT structure conversion methods
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-08 17:58:50 -08:00
Roshan Pius
32d0ca967a wifi: Convert packet fate structures from legacy to HIDL
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-08 17:58:50 -08:00
Roshan Pius
f5f51fd039 wifi: Begin NAN iface methods implementation
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-08 17:58:50 -08:00
Roshan Pius
52947fbc7e wifi: Implement chip mode combinations
This is pretty hardcoded for now. We expose 2 chip modes:
1. STA mode: 1 STA and 1 P2P or NAN iface.
2. AP mode: 1 AP iface.

Implement the chip mode configuration related HIDL methods in
WifiChip and integrate WifiModeController. These is some change in the
order of calls invoked within the implementation to accomodate the
firmware reload:
a. Since the legacy HAL needs to reinitialized after
firmware reload, we can no longer do this in IWifi.start().
So, we'll defer this to IWifiChip.configureChip() now.
b. Refactor IWifi.startInternal() and IWifi.stopInternal() to pull
out the actual implementation into a separate helper functions and
let it invoke the required callbacks.

Bug: 31997422
Bug: 32018162
Test: Compiles
Change-Id: I461687d7ee92398bc47321e1baca609db65c7991
2016-12-07 15:42:08 -08:00
Roshan Pius
97334114c6 wifi: Split out initialize and start in WifiLegacyHal
We need to separate these because we need to invoke start() after every
firmware mode change (chip reconfigure).

While there,
1. Make InterfaceTool a member of the class.
2. Make the stop() symmetric with start(). i.e interface is set
down on stop immediately instead of waiting for the thread to stop.

Bug: 31997422
Test: Compiles
Change-Id: I202afcc70571188dc076a841249761bc97fcf817
2016-12-07 15:38:24 -08:00
Roshan Pius
a26a6e0807 wifi: Add firmware mode controller
This module will make the necessary calls to reconfigure the
driver/firmware in the required state.
The module assumes that the sysfs paths needed to be accessed has been
chowned to "wifi" at bootup in the device's .rc file.

Bug: 32018162
Test: Compiles
Change-Id: I827c5eb6b5b4a3810e912d4164dbc8ff0ef4d30c
2016-12-07 15:35:14 -08:00
Yifan Hong
e19e582bd5 Update makefiles for hidlizing IBase.
A new dependency android.hidl.base@1.0 is added for
all projects.

Also updated Android.mk for NFC hal (for java constants)

Test: mma

Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
2016-12-03 01:08:59 -08:00
Roshan Pius
786c00d72e Merge "wifi: Don't include legacy hal header in wifi_status_util" 2016-12-02 20:29:01 +00:00
Treehugger Robot
3ff50102ed Merge "wifi: Add utility for struct conversions" 2016-12-02 18:21:45 +00:00
Roshan Pius
a4854ff317 wifi: Don't include legacy hal header in wifi_status_util
This was missed from the cleanup when we moved the libhardware_legacy
header inside the legacy_hal:: namespace.

Bug: 33274910
Test: Compiles
Change-Id: I233f5478733427c739d30bf41f20f120a4c4199a
2016-12-02 08:32:14 -08:00
Roshan Pius
e65edb1b73 wifi: Add utility for struct conversions
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
2016-12-02 08:31:33 -08:00
Treehugger Robot
832f1a7978 Merge "Always specify underlying enum type." 2016-12-01 17:15:54 +00:00
Steven Moreland
fd46bce1a9 Wifi: don't require C++11.
C++14 has been officially supported in the build system for a while now.
(see b/32019064).

Test: pass
Change-Id: I328b0bcf9e5c32e209e4efc1ac5b96afdb542a5a
2016-11-30 15:45:17 -08:00
Steven Moreland
73600f7955 Always specify underlying enum type.
Bug: 33197891
Test: compiles
Change-Id: I3d4822ea9a665708302d3bd1460425fddf1dcda9
2016-11-29 14:12:34 -08:00
Roshan Pius
2301209a9a wifi: Add NAN API wrappers in WifiLegacyHal
NAN API's are inherently asynchronous. So, add a function for registering
the various callbacks and add wrappers for all other NAN API's.

Bug: 31991076
Test: Compiles
Change-Id: I304a5d9d41b684f0778e0ace3601380153068e12
2016-11-28 15:31:19 -08:00
Roshan Pius
d8e915ab99 wifi: Add RTT API wrappers in WifiLegacyHal
These are just wrapper methods over the legacy RTT related HAL API's.
Note: Some of the RTT related API's have been intentionally left off
because they're no longer used.

Bug: 31991232
Test: Compiles
Change-Id: Ied19d9ec1d4347ead0c40ab3683a1a0bae704f90
2016-11-28 15:31:19 -08:00
Roshan Pius
8714a3e103 wifi: Add logger/debug API wrappers in WifiLegacyHal
Legacy HAL wrappers for the following debug functions:
1. Wake reason stats
2. Packet fate
3. Supported feature set
4. Ring buffer.

Bug: 32221997
Test: Compiles
Change-Id: Ie6c03aeefb0b6e711419cfa5451cddbeb3069cd0
2016-11-28 15:31:08 -08:00
Treehugger Robot
2fe5762cae Merge "Update makefiles for logging." 2016-11-24 16:41:20 +00:00
Steven Moreland
3e3a0998e0 Update makefiles for logging.
Bug: 32943424
Test: hidl_test
Change-Id: I86dc81935912861073497c07696378895a25f9ee
2016-11-21 16:19:57 -08:00
Roshan Pius
7cece41299 wifi: Add link layer stats API wrappers in WifiLegacyHal
Adds wrappers over the legacy HAL API for the following:
1. enable/disable link layer stats collection.
2. fetch link layer stats.

Note: Link layer stats structure is quite ugly. The wrapper stucture
declared here (LinkLayerStats) tries to separate out the pointer
elements and ignore the unnecessary variable size elements from them.

Bug: 31991459
Test: Compiles
Change-Id: I7c4188115786542866c7be56cf9f116b3f78e6a3
2016-11-21 10:57:45 -08:00
Roshan Pius
76ff302d57 wifi: Add gscan API wrappers in WifiLegacyHal
The legacy gscan API's were designed to be used in the following
sequence:
a) Start the scan using |wifi_start_gscan|.
b) Scan Events are indicated to the caller via the provided
|on_scan_event| callback.
c) When one of the result events are received, the caller is expected
to retrieve the cached results via |wifi_get_cached_gscan_results|.
There are some extra knobs here to determine if the results need to be
flushed after fetch or not.
d) Any scan failures are also notified via the provided
|on_scan_event| callback.
e) Full scan results are delivered one by one via the provided
|on_full_scan_result| callback.

In our use case step (b) above is always followed by step (c), so these
2 steps have been merged together in the HIDL interface:
a) Start the scan using |IWifiStaIface.startBackgroundScan|.
b) Scan results are now directly delivered via
|IWifiStaIfaceEventCallback.onBackgroundScanResults| callback.
c) Any scan failures will be delivered via
|IWifiStaIfaceEventCallback.onBackgroundScanFailure| callback.
d) Full scan results are delivered one by one via
|IWifiStaIfaceEventCallback.onBackgroundFullScanResult| callback.

Bug: 31991459
Test: Compiles
Change-Id: I0870eae095a667eec1d8de75fe1cc04a1b5a0bd3
2016-11-21 10:57:45 -08:00
Yifan Hong
63544eacb6 Split libhidl into base and transport.
Bug: 32756130

Test: mma
Change-Id: Id21cf23abe2910f26bb7895511862443b93dc112
2016-11-18 09:52:57 -08:00
Roshan Pius
0a47c187b9 wifi: Add APF/feature-set wrappers in WifiLegacyHal
Add wrappers for retrieving the feature set supported by the device &
APF functionality.

Bug: 31991459
Test: Compiles
Change-Id: I34b8896a21e34f688374750faefd589eca2a4de1
2016-11-17 08:09:10 -08:00
Roshan Pius
6cedc97e95 wifi: Move legacy hal types to a new namespace (2/2)
Changes in HIDL interface obejcts to use the new namespace for legacy
HAL.

Bug: 32242225
Test: Compiles
Change-Id: I7d0e9cee8656bd779a24d9eaede415317dceaf9b
2016-11-16 14:57:08 -08:00
Roshan Pius
955542e9a2 wifi: Move legacy hal types to a new namespace (1/2)
To prevent typename conflicts between the types in
"hardware_legacy/wifi_hal.h" and the HIDL interface,
Move all the legacy HAL types under a separate namespace (legacy_hal).

This is especially needed for Nan data types. Some of the typenames are
exactly the same in the legacy HAL header file and the HIDL interface.

Related changes,
Remove the use of |HalTool| class. This causes compilation failures
because it tries to include wifi_hal.h as well (but, that is now wrapped
inside a namespace).

Bug: 32242225
Test: Compiles
Change-Id: I937877798b81aea280d1797833745ae97fb02dc9
2016-11-16 14:57:07 -08:00
Roshan Pius
511cc493e3 wifi: Changes to WifiLegacy Hal
Changes in the CL:
a. Removed the usage of wifi_status_util in WifiLegacyHal. The
|legacyErrorToString| log will be done in the HIDL object. This is to
remove any reference of |WifiStatus|
b. Moved the cleanup of function pointers to a separate helper function
|invalidate|.
c. Moved static constants out of WifiLegacyHal class.

Bug: 32505551
Test: Compiles
Change-Id: I9dc3900c40cf30de2c0a4376d4de2b08076e2b5f
2016-11-16 14:57:07 -08:00
Roshan Pius
23f9f30344 wifi: Remove passthrough mode
Wifi HAL is not going to support HIDL passthrough mode. So, remove the
target definition.

Bug: 32376894
Test: Compiles
Change-Id: I43740541f576746826d75c6ac48a11bb2a619227
2016-11-16 14:57:07 -08:00
Roshan Pius
0c92d446a2 wifi: Stub implementation of WifiNanIface methods
Bug: 31991076
Test: Compiles
Change-Id: Ia3723a14af20176c08e6e466e8b55bb32c8f9d41
2016-11-16 14:57:07 -08:00
Roshan Pius
7913f5e49d wifi: Stub implementation of WifiRttController methods
Bug: 31991232
Test: Compiles
Change-Id: I90f803ae19746ef844280cd8df96987e350f8a3f
2016-11-16 14:57:07 -08:00
Roshan Pius
a04ba3fcb8 wifi: Stub implementation of WifiStaIface methods
Bug: 32221997
Bug: 31991459
Test: Compiles
Change-Id: Iefc68958befc549fd9100b29f84cb6e6d73efe95
2016-11-16 14:57:07 -08:00
Roshan Pius
7d08d7a16d wifi: Stub implementation of WifiChip methods
Bug: 32221997
Test: Compiles
Change-Id: I627a05ce17d8b0e87101f395c3b3d6c10d3c440c
2016-11-16 14:57:07 -08:00
Roshan Pius
907d4a234d wifi: Use hidl_return_util functions in Iface/Rtt
Modify the WifiIface & WifiRttController methods to the use the new helper
functions.

Bug: 32337072
Test: Compiles
Change-Id: I8ce5450f3012ea3ad699db3c780c0bf985492aad
2016-11-16 14:57:07 -08:00
Roshan Pius
3c86852a2e wifi: Use hidl_return_util functions in WifiChip
Modify the WifiChip methods to the use the new helper functions.

Also,
1. Modify the WifiLegacyHal.requestDriverMemoryDump &
WifiLegacyHal.requestDriverMemoryDump to return a vector of |uint8_t|
instead of |char| to avoid unnecessary typecasting in the HIDL methods.
2. Remove |createHidlVecOfIfaceNames| helper function as most of the
necessary conversion should be handled by hidl_vec/hidl_string
constructors.

Bug: 32337072
Test: Compiles

Change-Id: Ic0b7aa2a5a078e53d5bc5bef18995a3cc0f548a1
2016-11-16 14:57:07 -08:00
Roshan Pius
5647665827 wifi: Helper functions for invoking hidl cont callbacks
The helper functions are used to invoke an internal method which
implements the functionality and then invoke the HIDL callback
with the return values.

HIDL's auto-generated code uses on-stack callbacks to return
non-primitive/multiple values from HIDL methods. This is unwieldy and
the implementation of the method's functionality gets mixed up with the
semantics of handling these callbacks. This tries to hide the semantics
of HIDL auto-generated code from the functionality.

Converted all IWifi methods to use these new helper functions.

Bug: 32337072
Test: Compiles
Change-Id: I57cbafcc2ecb52ec5055f4bd80bc064bd438b850
2016-11-16 14:57:07 -08:00
Roshan Pius
734fea0d98 wifi: Make methods deliver status synchronously (3/3)
Make all the |IWifiIface|/|IWifiRttController| HIDL interface
methods return a synchronous status code. Change from using the event
callbacks to the synchronous callbacks for delivering status.

While there,
Use the default std::string to hidl_string constructor in status
callbacks.

Bug: 32056230
Bug: 32061909
Test: Compiles
Change-Id: Ifa06a11afb085bfd6684f7b997fb730d192018ea
2016-11-16 14:57:07 -08:00
Roshan Pius
5c05546fc9 wifi: Make methods deliver status synchronously (2/3)
Make all the |IWifiChip| HIDL interface methods return a synchronous
status code. Change from using the event callbacks to the synchronous
callbacks for delivering status.

While there,
1. Use std::tie to retrive values out of the legacy HAL functions returning
a pair.
2. Use the std::vector to hidl_vec constructor for returning vector of
ifnames.

Bug: 32056230
Bug: 32061909
Test: Compiles
Change-Id: Iac27521be17cd9852df04ad7d412e09160a08d33
2016-11-16 14:57:07 -08:00
Roshan Pius
503582ed94 wifi: Make methods deliver status synchronously (1/3)
Make the following |IWifi| HIDL interface methods return a synchronous
status code:
a) start()
b) stop()
The other methods in this interface do not have a failure case and hence
not returning a status code.

This changes the nature of event callbacks registered for each
interface. Previously, every operation's status was sent to all the
registered event callbacks. Now, only the caller is notified of the
operation's status via the passed synchronous callbacks. The event
callbacks are now used to broadcast only important state changes/events.

Bug: 32056230
Bug: 32061909
Test: Compiles
Change-Id: I95dc3fa139ac3ac7500d81e9e0dbc4f4de04e127
2016-11-16 14:57:02 -08:00
Roshan Pius
1922482a5c wifi: Rename failure_reason_util to wifi_status_util
The HIDL interface now returns a |WifiStatus| instance to indicate the
status of any operation. This is replacing the existing asynchronous
delivery of success or failure (using |FailureReason| instance).

Rename the existing util class to |wifi_status_util| and add a couple of
methods to create a |WifiStatus| instance with empty description.

Bug: 32056230
Test: Compiles
Change-Id: I8488f7cd7d6ad6bd7a0c3c82a7ef83299d877d45
2016-11-16 11:05:16 -08:00
Roshan Pius
02caa1b821 wifi(interface): Add status for all methods
Add missing status returns for a few HIDL methods. This is to keep the
interface consistent.

Bug: 32146455
Test: update_makefile.sh
Change-Id: Ia66fe4d00e884e5ce1e1906db77bb5ffdaebffdd
2016-11-16 11:05:16 -08:00
Roshan Pius
e0724f98b0 wifi(interface): Add wifi host debug wake up reason stats
These stats are used to determine if the device is being woken up
frequently by the wlan chipset. The stats structure describe all the
various resons for which the host was woken up by the wlan chipset
(firmware).

Bug: 32221997
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Id52915348fef0283affcd834c6f1db5055e54ace
2016-11-16 11:05:16 -08:00
Roshan Pius
fe9ad36cb2 wifi(interface): Add wifi debug packet fate related interface
The packet fate debug mechanism is used to track the state of all the
packets transmitted/received during the association process.

Also,
Add the various debug capabilities in the respective interfaces.
All ring buffer, driver/firmware dump, etc related capabilities are in
IWifiChip object.
The packet fate capability is exposed in IWifiStaIface object.

Bug: 32221997
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Ic6bf49d682b70a1cdcd18c69fc25a544921bd548
2016-11-16 11:05:16 -08:00
Roshan Pius
e3a02b07b6 wifi(interface): Add wifi debug ring buffer related interface
The debug ring buffers is a purely debug mechanism to let the driver
report debug info like connection events, power events, etc to the
framework.
The framework used to previously dump out the raw byte stream in
the bugreport and the vendors had some tools to parse out the data.
This is now being changed to provide the framework with the
internal ring buffer structs to ease parsing this data in framework
itself. This will eventually be used in the new wifilogd daemon.

Bug: 32221997
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I2c90662cfa9d07ae6fc72198a286338dbaacbfc2
2016-11-16 11:05:16 -08:00
Roshan Pius
5e25466ebf wifi(interface): Move all StaIface types to types.hal
Some of these structs are used in the debug framework and hence needs to
live in types.hal. Add a |Sta| prefix to differentiate them from other
types similar to what is done for Nan and Rtt types.

Bug: 31991459
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Idc49b28447609c4334b0a086481c404c06a63fea
2016-11-16 11:05:16 -08:00
Roshan Pius
e03f736ca0 wifi(interface): Fix compilation failure
Changes in the CL:
a) Unions are not allowed in the HIDL generated code that is going to be
used in java.
b) Few RTT constants were defined twice in the legacy rtt.h. One set
as enums, the other set as #define's. Remove the duplicated values in
the HIDL interface.

Bug: 31991076
Bug: 31991232
Test: mmm -j32 hardware/interfaces/wifi/1.0/
Change-Id: I03db70c7b89c0be53a7754ab8b34a19ad2c6e536
2016-11-16 11:05:16 -08:00
Roshan Pius
18eec81adc wifi(interface): Rtt controller HIDL interface
Bug: 31991232
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I53b95e85ee8a71bcb0494420913c9511f87908c0
2016-11-16 11:05:16 -08:00
Roshan Pius
120f94c594 wifi(interface): NAN HIDL interface
Interface is mostly a replication of the wifi_nan.h HAL header file.
1. All the methods are in |IWifiNanIface|.
2. Moved all the callbacks to |IWifiNanIfaceEventCallback.hal|.
2. Moved all the data types to |types.hal|.
3. Changed all the variable size arrays to vecs.

Bug: 31991076
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I2af0b0003cf30a0f2bfdcb56b69c492cf831745b
2016-11-16 11:05:16 -08:00
Roshan Pius
18680b7aff wifi(interface): Link layer stats collection
Add HIDL methods for STA iface link layer stats.

While there,
Add the missing gscan API for fetching a list of channels for a given
band.

Bug:31991459
Test: Compiles
Change-Id: I5d448eb823faae4e8f5c25f746cf59e70df454cf
2016-11-16 11:05:16 -08:00
Roshan Pius
a52dc7322d wifi(interface): Make methods synchronous
Having all the HIDL methods asynchronous, makes it hard for the
calling code to keep track of the operation status/result.
There are some operations which will generate asynchronous results (like
bgscan), convert all the other methods to synchronous methods.

The |EventCallback| objects will now just broadcast important events
(needed for other clients to listen for state changes). This will no
longer be used to send responses to every command sent to the HAL.

Bug: 32061909
Test: `./hardware/interfaces/update-makefiles.sh`
Change-Id: Id2433f4c8e028268dd027cdeb239ba4082b157b5
2016-11-16 11:05:16 -08:00
Roshan Pius
1f9073cfcb wifi(interface): Add status for every method
Add a status parameter for every HIDL interface object method which can
possibly become invalid. This should help inform the caller that the
object being used is stale/invalid now.

While there,
Rename |CommandFailureReson| to |FailureReasonCode|.

NOTE: |FailureReason| will continue to indicate any errors during the
processing of the command via the corresponding |onFailure| callback.

Bug: 32056230
Test: Compiles
Change-Id: I2ec5af3075221e483579410f344bcedd6bf17a93
2016-11-16 11:05:16 -08:00
Roshan Pius
7b77747bb5 wifi(interface): Add gscan/apf related API's
Changes in the CL:
1. Add gscan/APF related API's to |IWifiStaIface|.
2. Add a new callback HIDL interface (|IWifiStaIfaceEventCallback)
for all callbacks received from |IWifiStaIface|.

Bug: 31991459
Test: Compiles
Change-Id: Id9f2ded9e20bee393ab53d84efa814d52704cd2c
2016-11-16 11:05:16 -08:00
Roshan Pius
9e01c51793 supplicant(interface): Fix compilation failure
The generated code uses the variable |code| internally.

Bug: 31116047
Test: mmm -j32 hardware/interfaces/wifi/supplicant/1.0/
Change-Id: Ic6d0c9a198a026460f67fa4920b8003a304f6727
2016-11-16 10:29:37 -08:00
Roshan Pius
b76dbbef4f supplicant(interface): Add support for Hotspot 2.0
HIDL interface to
a) Initiate ANQP queries & icon queries for hotspot 2.0
b) Add callbacks for the reception of WNM frames (hotspot
remediation, deauth imminent notice).

Bug: 31116047
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Ib3353f04b493f50c6415d1f3475efa957d921540
2016-11-10 15:16:28 -08:00
Roshan Pius
849d24ccbf Merge "supplicant(interface): Support P2P operations" 2016-11-09 18:01:55 +00:00
Roshan Pius
756ad991af supplicant(interface): Support P2P operations
Add methods for all the P2P related operations. This is a subset of P2P
functionalities exposed by wpa_supplicant used in the Android codebase
currently.

While there,
Add missing |FAILURE_ARGS_INVALID| status code in the setter methods in
ISupplicantStaNetwork.hal

Bug: 31497295
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I657ef6deaa6203bcf890c43f98a32f6230962d04
2016-11-08 09:14:07 -08:00
Colin Cross
5222c47773 Merge "Support genrules with multiple tools" 2016-11-07 20:28:26 +00:00
Colin Cross
8f084e00d6 Support genrules with multiple tools
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.

Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
(cherry picked from commit b785f5b82e)
2016-11-07 10:54:59 -08:00
Roshan Pius
8c6a8772f7 supplicant(interface): Remove "wpa_supplicant"
sed -i "s/wpa_supplicant/the supplicant/g" *.hal

Bug: 32602594
Test: Compiles
Change-Id: Id905cabba29359db8727c131fb64357dfbb104cd
2016-11-03 09:37:57 -07:00
Roshan Pius
7c636f8149 wpa_supplicant(interface): Remove create/remove iface methods from HIDL
Use a new struct(IfaceInfo) to list and get iface objects from the root.

Bug: 32577464
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I912d37f62767980e7f88de5b4439425276de50f8
2016-11-02 10:19:30 -07:00
Roshan Pius
39f588f8ed wpa_supplicant(interface): Add iface/network type
Add separate types of Iface/Network object for STA (station mode) and
P2P mode ifaces and associated networks. These expose very different
functionality and exposing 2 different types of objects makes the
interface cleaner.
Although, they're still represented via the same struct for both types
in the wpa_supplicant core.

Bug: 32553421
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: I41601a650709429c65014cb7adaf6cb9ab03787e
2016-11-02 08:54:26 -07:00
Steven Moreland
7982058699 Running update-makefiles for fixed spacing.
Test: pass
Change-Id: I4dcaf70b1c014f3ecf685d4884601be6f17ee51d
2016-11-01 20:06:29 +00:00
Steven Moreland
7a4f118c48 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:05:29 +02:00
Steven Moreland
ce9779412a Update headers (for export shared lib headers)
Test: mma -j64
Bug: 32337293
Change-Id: I93e7cab90efac407525a1a5f2ad30f816a530e17
2016-10-22 00:28:00 +00:00
Steven Moreland
fb8821066d wifi: Removing reference to IServiceManager.h.
Bug: 32313592
Test: make

Change-Id: If1b842c563b5934b58fb328c2f2315c42ae6fc06
2016-10-21 12:36:19 -07:00
Roshan Pius
f243631af8 wifi: Invoke failure callbacks
Invoke the failure callbacks for |requestChipDebugInfo|,
|requestDriverDebugDump| and |requestFirmwareDebugDump| methods.

Bug: 32014425
Test: Compiles
Change-Id: I49b8ae93fe846df6d9663b10d2a70eb89bd00931
2016-10-11 07:46:24 -07:00
Roshan Pius
5926828728 wifi: Add WifiRttController object
Create the WifiRttController object and add the createRttController
method in WifiChip.

Bug: 31991232
Test: Compiles
Change-Id: I34649097c96488c660bef5acceac1a6478f80dca
2016-10-11 07:46:24 -07:00
Roshan Pius
35d958c43f wifi: Add Iface related method implementations in WifiChip
Add the iface creation/retrieval/list method implementations in WifiChip.
WifiChip does not yet support the chip mode configuration. So, all
|createIface| method calls succeed today. Once the mode configuration
changes are in place, we will deny iface creation requests depending on
the iface combination supported in the current mode.

The iface objects are all invalidated and deleted on mode switches and
when HAL is stopped.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 31943042
Test: Compiles
Change-Id: Ic94864c8b11aabbe569b5157d68d6056364a3c4c
2016-10-11 07:46:24 -07:00
Roshan Pius
3e2d671a4c wifi: Add the various iface object implementation
This CL adds the implementation classes for the various iface HIDL
interfaces defined. These classes implement the
|getName| & |getType| methods in the Iface HIDL interface.

Integration of these objects with WifiChip class is implemented in the
next CL.

Bug: 31943042
Test: Compiles
Change-Id: I219afd6441e15c76cf7c61f7bcd2b3568dba2b98
2016-10-11 07:46:24 -07:00
Roshan Pius
ab5c471b0b wifi: Remove "Wlan" prefix from wifi_legacy_hal public methods
All the legacy HAL API's in the function table uses the "wlan0"
interface handle for the various operations. But, this is an internal
detail that should be abstracted inside WifiLegacyHal class. So, rename
the public methods to remove the "Wlan" prefix from them.

Also, add methods to fetch the iface names to use for the various types
of HAL.

Bug: 31943042
Test: Compiles
Change-Id: I35a6cdea0ad7cff295d33c0245953258129fba43
2016-10-11 07:46:24 -07:00
Roshan Pius
cd566bddd7 wifi: Add support for multiple chips in IWifi
The modified HIDL interface supports multiple chip instances on the
device. Modify the |IWifi| interface implementation to support the new
methods.

NOTE: The legacy HAL implementation will continue to only expose 1 chip.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 32003988
Test: Compiles
Change-Id: I31e704100f716e223095890279bdf93d2a04377e
2016-10-11 07:46:24 -07:00
Roshan Pius
fcbf923d3a wifi(interface): Add RTT Controller object
Create a RTT controller object to use for initiating all the RTT related
HAL opertations.
Since we don't want to fix the iface on which to initiate RTT operations,
these methods will be rooted in a new standalone object |RttController|.
Framework can decide to intiate an instance of |RttController| on a
specified iface or let the implementation pick one.

Bug: 31991232
Test: Interface compiles.
Change-Id: I65f7a7babd72db26ce6549f572abd9ef73700c82
2016-10-11 07:46:24 -07:00
Roshan Pius
adcfba4b09 wifi(interface): Add Iface objects
Create a child object under IWifiChip to represent each interface
within the chip. Each iface object has a |type| & |ifname| which should
help us uniquely identify them. This should help us expose methods that
are applicable only to a specific interface type.

While there,
Assign a unique id to every chip on the device.
Add IWifi.listChipIds() to retrieve the list of chip Id's avaiable on the
device. IWifi.getChip() will now use the provided Id to retrieve the
corresponding IWifiChip object(because HIDL language doesn't support
vec<HIDL objects>).

Bug: 31943042
Bug: 32003988
Test: Interface compiles (not implementation)
Change-Id: I723007566ca4220362c02d0f452753fee4e31fce
2016-10-11 07:46:24 -07:00
Roshan Pius
271f2c2d9c wifi(interface): Rename interface to iface
The HIDL objects are called "interface", so rename the wifi interface to
iface to distinguish between them better.

This is especially needed in the follow up CL.

Bug: 31943042
Test: mmm -j32 hardware/interfaces/wifi/1.0/
Change-Id: I3bc34930f75159d26321c0e071af9084d0585508
2016-10-05 10:30:24 -07:00
Roshan Pius
6f31d92e59 wifi(interface): Add/Correct docstring params
Changes in the CL:
1. Add missing docstring params in the HIDL interface.
2. Reword some method docs. Occurences of "will" is replaced
by "must" (based on comments received on supplicant HIDL interface:
go/aog/275115).
3. Add onFailure callbacks for all the methods and added docstrings for
them.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0
Change-Id: Ib7152625851023d6244f742bb77a8fdc0829e00d
2016-10-05 10:30:15 -07:00
Roshan Pius
cdb77f3cf2 wifi: Add implementation of driver/firmware memory dumps
Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I25d42cfd4c2b1ea7e63bdc036f37f81aed93c565
2016-10-05 09:22:06 -07:00
Roshan Pius
4b26c832ed wifi: Add Implementation of IWifiChip.requestChipDebugInfo
Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: Id0c02e37dac66de6f830785881cb67f113c0fb19
2016-10-05 09:21:07 -07:00
Roshan Pius
908a69a53a wifi: Use hal_tool & if_tool
Changes in the CL:
1. Currently |WifiNative.cpp|, uses |hal_tool| to initialize the
function table and |if_tool| to set the interface up when |startHAL|
method is invoked. Use the same sequence in the HIDL'ized HAL.
2. Remove the assertion if the function table initialization fails. This
will result in a failure indication on starting the HAL now.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I268845ed62158b6a2ff36659f0bb15c4100a7222
2016-10-04 18:36:25 -07:00
Roshan Pius
aabe575536 wifi: Restructure wifi legacy HAL implementation
Restructured the existing code to create a new class called
|WifiLegacyHal|. This class will be used as a wrapper to invoke
all the legacy HAL functions and handle the "C" style callbacks.

Bug: 31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I63e8543f49886f8446101320a97d1e96e30d1035
2016-10-04 18:36:22 -07:00
Roshan Pius
79a9975d07 wifi: Change namespace
Move the implementation to "android::hardware::wifi:V1_0::implementation"
namespace.
This is following the style guidelines in NFC HIDL
implementation(go/aog/279421).

While there,
Run checkstyle to correct formatting issues.

Bug:31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5600a60a0041b3318ed9289823ec335a8ed8a83d
2016-10-04 13:23:20 -07:00
Roshan Pius
3c4e8a358c wifi: Move legacy HAL implementation
Changes in the CL:
1. Move the legacy HAL implementation from
"frameworks/opt/net/wifi/wifi_hal_legacy" to
"hardware/interfaces/wifi/1.0/default".
2. Renamed the .rc file and the module name in makefile to
conform to the HIDL style guide.

Files renamed from:
wifi_hal_service.cpp/h -> wifi.cpp/h
wifi_chip_service.cpp/h -> wifi_chip.cpp/h
main.cpp -> service

Bug: 31821133
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5e65e2fdb5596346bde6963588031dcea42d633a
2016-10-04 13:10:25 -07:00
Dan Willemsen
242b34edd5 Convert to Android.bp
See build/soong/README.md for more information.

Bug: 31742855
Test: mma -j
Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d
2016-09-30 10:31:54 -07:00
Roshan Pius
22ab8b2451 wifi: Move supplicant HIDL interfaces to subfolder
Move all the supplicant HIDL interfaces to a separate subfolder.

Bug: 31800508
Test: Compiles
Change-Id: I09bfb17b626312e8be819238ab2edbb83ca04322
2016-09-28 13:37:45 -07:00
Roshan Pius
9a3a84f5a3 wifi(hidl): Add supplicant HIDL interface
Convert the existing AIDL binder interface of wpa_supplicant to HIDL.

Summary of changes:
1. Every HIDL method returns an instance of |SupplicantStatus|
along with any others params (for getters). This is needed to return the
equivalent of |Binder::Status| to indicate errors in the args passed,
stale proxy, etc.
2. All constants are changed to enums. There were some constants which
should have been enums in the first place, but wasn't because AIDL did
not support enums. But, there are others which should be standalone
constants, but are enums now because constants are not supported in HIDL.
3. Conform to HIDL style guide.

Bug: 31365276
Test: `mmm -j32 hardware/interfaces/wifi/1.0/`
Change-Id: Iba753e279fd260788d8628ea2f5c2281b5844095
2016-09-28 11:03:17 -07:00
Yifan Hong
b0b5322e7d Updated indentation to 4 spaces for Android.mk.
Test: `cd system/tools/hidl && mma`
Change-Id: I088893c3c8b080239f0f32e3434faf3da3fefc7a
2016-09-26 16:02:39 -07:00
Andreas Huber
495391aad8 Updated makefiles that also add static java library targets.
Bug: 31684178
Test: hidl_test and hidl_test_java
Change-Id: Ib53d1be2b1535837ca97cb61796e335141fc7611
2016-09-23 09:21:15 -07:00
Mitchell Wills
5443a9fc9b Initial pieces of WiFi HAL interface definition
Test: make -j48 android.hardware.wifi@1.0 android.hardware.wifi@1.0-java
Bug: 31350762
Change-Id: I1b598be397e08165fc9fd607888e064b139e8007
2016-09-22 10:50:27 -07:00