Commit graph

587 commits

Author SHA1 Message Date
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
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
Connor O'Brien
3bee82f5d7 Merge "Add android.hardware.consumerir@1.0 service." 2016-12-13 20:54:00 +00:00
Treehugger Robot
e8d4931930 Merge "Update test for method name and result name." 2016-12-13 20:30:38 +00:00
Connor O'Brien
ac430dba09 Merge "Add consumerir HIDL default implementation" 2016-12-13 19:07:09 +00:00
Connor O'Brien
8af27124a3 Merge "consumerir: define the consumerir HIDL interface" 2016-12-13 19:06:57 +00:00
Yifan Hong
59cd3a4c14 Update test for method name and result name.
Test: compiles

Bug: 33277700

Change-Id: I40de6f09da8d8bf9d03516bfb7a65a54d01fa18a
2016-12-13 10:52:55 -08:00
Yifan Hong
8b54c22992 Add test for eliding bitfield returns.
Test: mma

Bug: 33298401
Change-Id: I9e50c20b29215664040183bcdfee6b6902c00e3d
2016-12-12 15:30:49 -08:00
Treehugger Robot
0f13397eb3 Merge changes Idde2f3b7,I5b25d334,I69db530e
* changes:
  wifi: Disallow iface creation based on mode
  supplicant(interface): Correct ANQP enum value/type
  supplicant(interface): Minor fixes in P2P iface
2016-12-12 22:58:28 +00:00
Connor O'Brien
2cc3483727 Add android.hardware.consumerir@1.0 service.
Test: make android.hardware.consumerir@1.0-service
Change-Id: Ife45f98836d4d5a3b40d26f21d43e1903fdb8fb3
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-12-12 11:25:17 -08:00
Connor O'Brien
ac9430e6f4 Add consumerir HIDL default implementation
Create a basic HAL implementation that passes commands
through to the old HAL.

Test: make android.hardware.consumerir@1.0-impl
Change-Id: Idc4b0a67cf936645b699c24504e9fab219b1ffbe
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-12-12 11:25:17 -08:00
Connor O'Brien
bf5cddbea0 consumerir: define the consumerir HIDL interface
Change-Id: Ifa8632915f8c5bb15da5f379202f5ddf2e08c09a
Signed-off-by: Connor O'Brien <connoro@google.com>
2016-12-12 11:25:17 -08:00
Steven Moreland
13b5d8034e Add check to update-makefiles.sh.
Now that we also have packages like android.hidl.base which reside in
system/libhidl/transport which are read in by hidl-gen (see
-randroid.hidl:system/libhidl/transport in the same file), we can
display a pretty warning message if they are missing.

We'll have to remember to update this after b/33276472.

Test: ran update-makefiles.sh
Change-Id: Ia3e3183dd5139cf3a8d1bf7bd25c201d1b098c79
2016-12-12 09:24:10 -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
Treehugger Robot
0b739705d4 Merge changes from topic 'hal_firmware_reload'
* changes:
  wifi: Implement chip mode combinations
  wifi: Split out initialize and  start in WifiLegacyHal
  wifi: Add firmware mode controller
2016-12-08 23:36:26 +00:00
Elliott Hughes
827e038651 Merge "Remove unused hardware/interfaces tests dependency on libtestUtil." 2016-12-08 17:21:53 +00: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
Sanket Padawe
1a7eae777b Add missing function to telephony HIDL interface.
+ fix some comments as per specs.

Test: No test
Bug: 32020264
Change-Id: If8e83a7465e608e28f7e149025da5ede30924602
2016-12-07 14:40:03 -08:00
Elliott Hughes
2d224c8026 Remove unused hardware/interfaces tests dependency on libtestUtil.
Bug: N/A
Test: builds
Change-Id: Ic0beba4a8ac19c4883bf49e330b23e4e6f64985a
2016-12-07 13:11:45 -08:00
Yifan Hong
022bb405fe Add test for bitset/mask type.
am: e7ce822b96

Change-Id: I178f54900b0a80bc44ca146380ab68ae7cf9f0cf
2016-12-06 01:54:55 +00:00
Yifan Hong
e7ce822b96 Add test for bitset/mask type.
Test: hidl_test
Change-Id: I8bcd304184ff6b7794a9d0b5d3999f071604471d
2016-12-05 12:46:17 -08:00
Yifan Hong
f9874a121e Update to use the correct logging library.
am: 961e625526

Change-Id: Ide52fc12de77ccef050e915461ebca9cba68f34e
2016-12-03 23:10:19 +00:00
Yifan Hong
77d0a60f1a Fix tests for using IBase instead of IBinder.
am: 1d747311b3

Change-Id: I764464e76a00dca05bf3cd058deb38bfe4f686d1
2016-12-03 23:10:16 +00:00
Yifan Hong
49d94f2afc Use IBase instead of IBinder for interface keyword.
am: ebcc3328e8

Change-Id: I3edcf00ad5963e3b12605269dedebac4159464f6
2016-12-03 23:10:14 +00:00
Yifan Hong
a7462e5df9 Update makefiles for hidlizing IBase.
am: e19e582bd5

Change-Id: Ibd6371d8c1e4ad1396321b91cc2e9c93226a2b2d
2016-12-03 23:10:12 +00:00
Yifan Hong
961e625526 Update to use the correct logging library.
Test: compiles
Change-Id: I00467b964fd56e6379cddde26152e413f2f00379
2016-12-03 10:04:15 -08:00
Yifan Hong
1d747311b3 Fix tests for using IBase instead of IBinder.
Echoed interfaces cannot be casted properly, because
interfaceChain cannot be called. So the given vector
of interfaces is re-wrapped. This is temporary; when
b/33173166 is fixed, this change should be reverted.

Test: hidl_test

Generates: b/33173166

Change-Id: I12166f69cf04abf7485dc2455ad731b87c80b3d1
2016-12-03 01:09:23 -08:00
Yifan Hong
ebcc3328e8 Use IBase instead of IBinder for interface keyword.
Test: hidl_test
Change-Id: Id51d1957f311d1025dac57d40d4dd5c24d328a6c
2016-12-03 01:09:23 -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
Martijn Coenen
d552d728f8 Merge "Test interface for hidlized IMemory."
am: 2ed821d5fe

Change-Id: I827340d4d1112f5c0050d16862774e7705d4eed7
2016-12-02 20:42:30 +00:00
Roshan Pius
398f8c2439 Merge "wifi: Don't include legacy hal header in wifi_status_util"
am: 786c00d72e

Change-Id: I8ebc7e3b05f95f54a048f56db3cf6c5b5791bab9
2016-12-02 20:42:19 +00:00
Treehugger Robot
2ed821d5fe Merge "Test interface for hidlized IMemory." 2016-12-02 20:33:12 +00:00
Roshan Pius
786c00d72e Merge "wifi: Don't include legacy hal header in wifi_status_util" 2016-12-02 20:29:01 +00:00