Commit Graph

570 Commits

Author SHA1 Message Date
Roshan Pius
ca2c7d355f wifi: Add RTT structure conversion methods
am: 3fae9c82a0

Change-Id: Ifa957a9eb3007abb7fd0cf355687812140174992
2016-12-09 02:05:39 +00:00
Roshan Pius
9ef46f44fb wifi: Convert packet fate structures from legacy to HIDL
am: 32d0ca967a

Change-Id: I48a539c30924c56659ae987ecf08e4a834a89a68
2016-12-09 02:05:38 +00:00
Roshan Pius
66fd78f1ae wifi: Begin NAN iface methods implementation
am: f5f51fd039

Change-Id: Ide9ece8aeffe58b09e5e40ba50276f66f610745b
2016-12-09 02:05:36 +00: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
af2f057ace Merge changes from topic 'hal_firmware_reload'
am: 0b739705d4

Change-Id: I0c8327f5649e96f5005856c18e416f8896c3ec9d
2016-12-08 23:42:31 +00:00
Roshan Pius
584c488c4f wifi: Implement chip mode combinations
am: 52947fbc7e

Change-Id: I18e8ed2a8183fa88396d6b3cf8be133edc263f1e
2016-12-08 23:42:30 +00:00
Roshan Pius
4ec4082519 wifi: Split out initialize and start in WifiLegacyHal
am: 97334114c6

Change-Id: If3bde7e3796f147f9da47b92e7d49b81252e300f
2016-12-08 23:42:29 +00:00
Roshan Pius
987226de7c wifi: Add firmware mode controller
am: a26a6e0807

Change-Id: I2b8cfeb08f88024157c945ec7a8b92c19ce296a0
2016-12-08 23:42:27 +00: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
f279b5d2cd Merge "Remove unused hardware/interfaces tests dependency on libtestUtil."
am: 827e038651

Change-Id: I4f786487624c45ce1b2c03e39743fa9db3650426
2016-12-08 17:28:33 +00:00
Elliott Hughes
827e038651 Merge "Remove unused hardware/interfaces tests dependency on libtestUtil." 2016-12-08 17:21:53 +00:00
Sanket Padawe
7a6e99c103 Add missing function to telephony HIDL interface.
am: 1a7eae777b

Change-Id: I19055b0f2559b4d7c6bb718e53ba7cbad2ac9f0d
2016-12-08 01:00:06 +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
Roshan Pius
d69b603bdd Merge "wifi: Add utility for struct conversions"
am: 3ff50102ed

Change-Id: I926b46bdeb5616c1ffd56dcac5b8a3ed8ccac60e
2016-12-02 18:44:41 +00:00
Treehugger Robot
3ff50102ed Merge "wifi: Add utility for struct conversions" 2016-12-02 18:21:45 +00:00
Martijn Coenen
0cb4a94083 Test interface for hidlized IMemory.
Test: hidl_test
Change-Id: I9d6260092bf58406905e543065319bc1f4db119f
2016-12-02 08:53:17 -08: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
Yifan Hong
82c7db6e9f Merge "Update to use the correct logging library."
am: 48f6298fa3

Change-Id: I983476d9d35eb6d795cb804142532b25f3a8d9dd
2016-12-02 07:51:31 +00:00
Treehugger Robot
48f6298fa3 Merge "Update to use the correct logging library." 2016-12-02 07:40:56 +00:00
Yifan Hong
65cbd60e1f Update to use the correct logging library.
Test: compiles
Change-Id: Ia5030c4d7ef95c5878c6b320d5bc30041023728f
2016-12-01 15:58:37 -08:00
Steven Moreland
e78c2b96e3 Merge "Revert "Use get instead of implicit cast on Return<*>.""
am: 5329acb61f

Change-Id: I86a2469e37c515129e8b679e241800f44ccabc27
2016-12-01 21:08:39 +00:00
Treehugger Robot
5329acb61f Merge "Revert "Use get instead of implicit cast on Return<*>."" 2016-12-01 20:55:39 +00:00
Steven Moreland
e50a914c4e Merge "Always specify underlying enum type."
am: 832f1a7978

Change-Id: Iaf8887dcea15c498b3fc2530d349cdff6c1d51d6
2016-12-01 17:19:36 +00:00
Treehugger Robot
832f1a7978 Merge "Always specify underlying enum type." 2016-12-01 17:15:54 +00:00
Steven Moreland
fafbbd7026 Revert "Use get instead of implicit cast on Return<*>."
This reverts commit dc5f84f993.

Change-Id: Ib81f732d1e0b822a5f53cbc7ed8a13e146ad8b7a
2016-12-01 08:20:32 -08:00
Steven Moreland
bc21d07f42 Merge "Wifi: don't require C++11."
am: 13be232d7b

Change-Id: Ib8b8aeea631b46ddd4310e1c32dd71f092fd6c9e
2016-12-01 01:33:09 +00:00
Treehugger Robot
13be232d7b Merge "Wifi: don't require C++11." 2016-12-01 01:25:42 +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
Ruchi Kandoi
5a36ec44f7 Merge "NFC: Add @exports to generate nfc-base.h headers."
am: cca3e97d63

Change-Id: Ic2b511275b4ada5049428811357bdd3ecf323841
2016-11-30 20:51:11 +00:00