Commit graph

399 commits

Author SHA1 Message Date
Steven Moreland
8cc75b051e Merge "Update makefiles." am: bbf39eb0b9 am: 3334081377
am: 5306d88cad

Change-Id: Ie1ed999a4a11ea9767d09fca591c80db91102daf
2017-04-12 17:26:03 +00:00
TreeHugger Robot
7147f8f57f Merge "Add more VTS tests for ISupplicantNetwork" into oc-dev 2017-04-12 17:04:25 +00:00
Ningyuan Wang
2b871f07bc Merge "Fix VTS test for SupplicantStaNetwork::setGetEapPhase2Method()" into oc-dev am: 3d56bdfb2e
am: b3782bab33

Change-Id: Idfddc917bbcb62c4f40513d018fb18f2e6aed618
2017-04-12 09:33:31 +00:00
Ningyuan Wang
2d1e38e754 Merge "Add VTS tests for ISupplicantIface" into oc-dev am: 4629846e68
am: 6efb54fc25

Change-Id: I95013972cc30dbcca8132343a2a01cbbe6cae60c
2017-04-12 09:33:20 +00:00
Ningyuan Wang
b3782bab33 Merge "Fix VTS test for SupplicantStaNetwork::setGetEapPhase2Method()" into oc-dev
am: 3d56bdfb2e

Change-Id: I3248190aaf9c394e5279b975e882bbb9e8f70810
2017-04-12 09:22:30 +00:00
Ningyuan Wang
6efb54fc25 Merge "Add VTS tests for ISupplicantIface" into oc-dev
am: 4629846e68

Change-Id: I943342d624af77c266ac36562c8f252f76b0adf5
2017-04-12 09:22:19 +00:00
TreeHugger Robot
3d56bdfb2e Merge "Fix VTS test for SupplicantStaNetwork::setGetEapPhase2Method()" into oc-dev 2017-04-12 09:17:08 +00:00
TreeHugger Robot
4629846e68 Merge "Add VTS tests for ISupplicantIface" into oc-dev 2017-04-12 09:14:29 +00:00
Ningyuan Wang
f2310dc93e Merge "Add more VTS tests for ISupplicantNetwork" into oc-dev am: f2c858ba94
am: ba374d543d

Change-Id: Ic9ac6e722a6c71729933e0cc9d583daa1182fe84
2017-04-12 05:12:32 +00:00
Ningyuan Wang
ba374d543d Merge "Add more VTS tests for ISupplicantNetwork" into oc-dev
am: f2c858ba94

Change-Id: Iaceed63e1bb4c1a2f9d6a41e5ed4b799e95ccc3e
2017-04-12 04:57:16 +00:00
TreeHugger Robot
f2c858ba94 Merge "Add more VTS tests for ISupplicantNetwork" into oc-dev 2017-04-12 04:45:48 +00:00
Ningyuan Wang
aa9b37d26b Add more VTS tests for ISupplicantNetwork
This covers the following APIs by adding tests to
ISupplicantStaNetwork:
ISupplicantStaNetwork::setPsk(),
ISupplicantStaNetwork::getPsk(),
ISupplicantStaNetwork::setEapSubjectMatch(),
ISupplicantStaNetwork::getEapSubjectMatch(),
ISupplicantStaNetwork::setUpdateIdentifier,
ISupplicantStaNetwork::SetProactiveKeyCaching
ISupplicantStaNetwork::SendNetworkEapSimUmtsAutsResponse,
ISupplicantStaNetwork::SendNetworkEapSimGsmAuthFailure,
ISupplicantStaNetwork::SendNetworkEapSimUmtsAuthFailure,
ISupplicantStaNetwork::GetWpsNfcConfigurationToken

Bug: 33457575
Test: VTS tests pass

Change-Id: I7d990471aadc46e7d553f2179d6d234530cb1df6
2017-04-11 16:50:40 -07:00
Steven Moreland
0dd5ba23fb Update makefiles.
Test: pass
Change-Id: I5cf42c8ff1e11207394e4852ba0bd03e4e3b7d2e
2017-04-11 16:41:07 -07:00
Ningyuan Wang
7a5a185dc6 Add more VTS tests for SupplicantStaIface
This covers the following APIs by adding tests to
ISupplicantStaIface:
ISupplicantStaIface::setExternalSim(),
ISupplicantStaIface::addExtRadioWork(),
ISupplicantStaIface::removeExtRadioWork()

Bug: 33457575
Test: VTS tests pass
Change-Id: Ie252ecf8e6e0cdc9d669a5fec18e076dc2d03eba
2017-04-11 16:39:38 -07:00
Ningyuan Wang
cd587bb6e4 Merge "Fix VTS test for SupplicantP2pIface::stopFind()" into oc-dev am: aa3e01f871
am: b6a44a50d9

Change-Id: I9a4a1ce3f2971bed12e6a7af3d4949553741863a
2017-04-11 23:37:59 +00:00
Ningyuan Wang
b6a44a50d9 Merge "Fix VTS test for SupplicantP2pIface::stopFind()" into oc-dev
am: aa3e01f871

Change-Id: I33161dba384d3dec981f9ef65a53fa18adb3f55a
2017-04-11 23:28:11 +00:00
TreeHugger Robot
aa3e01f871 Merge "Fix VTS test for SupplicantP2pIface::stopFind()" into oc-dev 2017-04-11 23:16:55 +00:00
Ningyuan Wang
e52e8804a8 Add more VTS tests for ISupplicantP2pIface
This covers the following APIs by adding tests to
ISupplicantP2pIface:
ISupplicantP2pIface::SetGroupIdle(),
ISupplicantP2pIface::SetPowerSave()

Bug: 33457575
Test: VTS tests pass
Change-Id: I8291735e74cf88c0e1ee4b5297b39aa37c33d17c
2017-04-11 16:01:15 -07:00
Ningyuan Wang
40453ea85c Merge "Copy wifi_hidl_call_util.h for supplicant VTS test" into oc-dev am: 4ebd10a29a
am: ecf5fdc03f

Change-Id: Idea4e77431430635743af0ad538356593245595e
2017-04-11 21:33:03 +00:00
Ningyuan Wang
ecf5fdc03f Merge "Copy wifi_hidl_call_util.h for supplicant VTS test" into oc-dev
am: 4ebd10a29a

Change-Id: I1eac40f7e73ff6c9ea97f64c70ac89a162cd32fe
2017-04-11 21:28:33 +00:00
Ningyuan Wang
4ebd10a29a Merge "Copy wifi_hidl_call_util.h for supplicant VTS test" into oc-dev 2017-04-11 21:20:15 +00:00
Ningyuan Wang
e97b2be0da Add more VTS tests for ISupplicantNetwork
This covers the following APIs by adding tests to
ISupplicantStaNetwork:
ISupplicantNetwork::getInterfaceName(),
ISupplicantNetwork::getType()

Bug: 33457575
Test: VTS tests pass
Change-Id: I9a24195cefefcc23b7603ff33b66a497eba07148
2017-04-11 13:39:02 -07:00
Ningyuan Wang
4833b06f8b Add VTS tests for ISupplicantIface
This covers the following APIs by adding tests to both
ISupplicantStaIface and ISupplicantP2pIface:
ISupplicantIface::getName(),
ISupplicantIface::getType()

Bug: 33457575
Test: VTS tests pass

Change-Id: Ibbc4be2e367fc6f179005696724cccbcca58d10f
2017-04-11 13:20:46 -07:00
Ningyuan Wang
dd05603f0f Copy wifi_hidl_call_util.h for supplicant VTS test
This copies wifi_hidl_call_util.h to supplicant cts directory
so supplicant vts tests can use this to simplify code.

Bug: 33457575
Test: compile, manual test
Change-Id: I696475062d04d54fafae5c3323818ce1d1ff7d9d
2017-04-11 12:56:23 -07:00
Steven Moreland
b2799c370f Update makefiles.
Test: pass
Change-Id: I5cf42c8ff1e11207394e4852ba0bd03e4e3b7d2e
2017-04-11 09:57:40 -07:00
Ningyuan Wang
271f16e6f7 Fix VTS test for SupplicantStaNetwork::setGetEapPhase2Method()
EAP method needs to be set to construct the eap phase 2 method string.

Bug: 37220169
Test: vts tests pass
Change-Id: Ie69aaac0826d4bde784f864631a718242dd5af2a
2017-04-10 20:44:18 -07:00
Ningyuan Wang
6504cb2eb9 Fix VTS test for SupplicantP2pIface::stopFind()
stopFind() returns SUCCESS even when there is no ongoing
find() operation.

Bug: 37220169
Test: vts tests pass
Change-Id: Ia3f3b4e0c4e7fb7263c1bcbfda1a40b6e5f1cba2
2017-04-10 20:15:31 -07:00
Peter Qiu
b137fc8ce0 wifi: add VTS tests for IWifiApIface am: 2c5d412af2
am: df3973dccb

Change-Id: Iebbc189fdae3d7ac55d556b54ceed5ef968ad0c3
2017-04-11 01:29:21 +00:00
Peter Qiu
df3973dccb wifi: add VTS tests for IWifiApIface
am: 2c5d412af2

Change-Id: Ib00281f3408facb6bfac7e71b0ab0160ad10551f
2017-04-11 01:11:17 +00:00
Peter Qiu
2c5d412af2 wifi: add VTS tests for IWifiApIface
Bug: 32022435
Bug: 36813739
Test: run VtsHalWifiV1_0Target test
Change-Id: I31db3b1bfe5deed5691e0d342762298b4b0d3620
2017-04-10 15:45:31 -07:00
Peter Qiu
bf29d5c8f0 Merge "wifi: add VTS tests for IWifiStaIface" into oc-dev am: eeee2b1d50
am: 98d95834ba

Change-Id: I336114c6c7063756cf96abdf5d63561bc9171b06
2017-04-10 21:04:41 +00:00
Peter Qiu
98d95834ba Merge "wifi: add VTS tests for IWifiStaIface" into oc-dev
am: eeee2b1d50

Change-Id: I57efb271423cf57e7bb1976ebc976e067bc8df25
2017-04-10 20:41:16 +00:00
TreeHugger Robot
eeee2b1d50 Merge "wifi: add VTS tests for IWifiStaIface" into oc-dev 2017-04-10 20:20:34 +00:00
Peter Qiu
32a736f8c8 wifi: add VTS tests for IWifiStaIface
This will cover all APIs except:
- startBackgroundScan
- stopBackgroundScan
- startSendingKeepAlivePackets
- stopSendingKeepAlivePackets

Bug: 32022435
Bug: 36813739
Test: run VtsHalWifiV1_0Target test
Change-Id: I71a1a97e4b0f1145657b249f3eb20305f810962b
2017-04-10 18:22:00 +00:00
Etan Cohen
67c0c0045a Merge "[WIFI][VTS] Don't call RequestDriverDebugDump API if not supported" into oc-dev am: e13455b32a
am: a130c0d3f2

Change-Id: I8d275f785bf986850363ffbe5dbcf9a3793f7275
2017-04-08 04:25:45 +00:00
Etan Cohen
fe38d361a9 Merge "[AWARE][VTS] Update WifiChipHidlTest NAN tests" into oc-dev am: 24e1601315
am: 490ea3f105

Change-Id: I99d7e734070217f324f7bf1377a33d0af34bf19a
2017-04-08 04:25:35 +00:00
Etan Cohen
a130c0d3f2 Merge "[WIFI][VTS] Don't call RequestDriverDebugDump API if not supported" into oc-dev
am: e13455b32a

Change-Id: Id6f15287394bb2531316add0a4111f70d0e736d6
2017-04-08 04:22:08 +00:00
Etan Cohen
490ea3f105 Merge "[AWARE][VTS] Update WifiChipHidlTest NAN tests" into oc-dev
am: 24e1601315

Change-Id: I5c763c6d5c894f9c1ff2e637859ea24fd1f0835f
2017-04-08 04:21:57 +00:00
Etan Cohen
7f326f9f96 [WIFI][VTS] Don't call RequestDriverDebugDump API if not supported
The RequestDriverDebugDump API has a capability bit indicating if
supported on device. Calling if not supported should additionally
return ERROR_NOT_SUPPORTED - but does not today. This is arguably
not a valid issue - should not call API if already known not to be
supported.

Remove test for this (questionable) condition until decide on proper
semantics.

Bug: 36562856
Test: test passes
Change-Id: Ic8a1c8b5f77a1b1767c0efc9735731084dfde7cc
2017-04-07 13:17:06 -07:00
Etan Cohen
4b132a9d97 [AWARE][VTS] Update WifiChipHidlTest NAN tests
NAN is not enabled on O - update all WifiChip NAN tests to expect
failure.

These tests will start failing again on any platforms/code where
NAN is enabled. Will fix more comprehensively at that point.

Bug: 36562856
Test: build + run vts
Change-Id: I0eaf7934d327fb91bff59dd33bd4a8069888c967
2017-04-07 10:41:52 -07:00
Etan Cohen
6fe38e9a72 Merge "[AWARE] Legacy HAL update: reduce host wakeup" am: 6ae199efa4 am: c6e4705e9d am: 7f4335b30a
am: 92c0d5140c

Change-Id: I6a9de5d52a7e3af4721593bad8b285b845ad700a
2017-04-05 22:35:07 +00:00
Etan Cohen
92c0d5140c Merge "[AWARE] Legacy HAL update: reduce host wakeup" am: 6ae199efa4 am: c6e4705e9d
am: 7f4335b30a

Change-Id: I90570e1f80662d0557eb1f30623e609c5bed8716
2017-04-05 22:22:35 +00:00
Roshan Pius
8a2ce1382c Merge "wifi(implementation): Print out the cb object on failure" into oc-dev am: 75e2bf0469
am: ef8521d6a0

Change-Id: Iba99894164a6b5ff4c8d7a6813e20b280b85e835
2017-04-05 20:07:51 +00:00
Roshan Pius
3797e188f8 wifi(implementation): Print out the cb object on failure
This should help us figure out if there are multiple callback objects in
wifi_chip when we see the IPC storm from
onDebugRingBufferDataAvailable().

Bug: 36599054
Test:  ACTS wifi tests.
Change-Id: I8c67032c59ecdd45824e131b59d890ce6c94fe25
2017-04-05 11:11:19 -07:00
Roshan Pius
82af4e193d wifi(implementation): Ignore IE parsing error am: 4094107835
am: 14965f9566

Change-Id: Ib12736be647fe38390a09e9e1c11f27d77d24eaa
2017-04-05 17:52:16 +00:00
Roshan Pius
208d65c87f wifi(implementation): Return const-ref for callback set am: cab37be578
am: 397f0eabd3

Change-Id: I86b1e265a9604faf110d439b4c5e666ca157349f
2017-04-05 17:52:04 +00:00
Roshan Pius
4094107835 wifi(implementation): Ignore IE parsing error
The IE blob may not always be fully formed in gscan full scan results.
So, log errors when we hit a parsing error and return the IE elements we
could parse so far.

Bug: 36455164
Test: ACTS wifi gscan tests.
Change-Id: I804937ea5e69f51696aaabf3fe3f53850c145ad3
2017-04-05 17:41:57 +00:00
Roshan Pius
cab37be578 wifi(implementation): Return const-ref for callback set
Bug: 36792787
Test: Compiles
Change-Id: Ibd19c6f41801d0fa1ea7dc9c3334213865d649ec
2017-04-05 17:41:39 +00:00
Etan Cohen
20925b0f56 [AWARE] Legacy HAL update: reduce host wakeup
Legacy HAL update to add indications when a solicited publisher
receives a match. Not used in current HAL. However, also added a
control bit to turn off host notification which is now enabled.

Bug: 35195773
Test: integration (sl4a) tests
Change-Id: I8ff378abaae11d4feaa42a9901abb1b48069dc4f
2017-04-04 22:13:36 +00:00
Sohani Rao
55adb1b68c VTS for Wifi Offload HAL
Basic VTS test suite for Wifi Offload HAL
Cherry pick from 00dd5147c4f9a4cdff941b2eed12e1d5844bef86
Bug: 32842314
Bug: 36865676
Change-Id: I702b9d90164f21104a915003b9496fbf4dd969c0
Test: adb shell /data/VtsHalWifiOffloadV1_0TargetTest
2017-04-04 14:26:24 -07:00
Sohani Rao
b3c3f8c1df Offload HAL update makefiles
Update make files to build Offload HAL binary

Bug: 32842314
Test: Unit tests, check if Wifi Offload HAL service is running
Change-Id: I5da649247fc234fc2555453cf1eac83a14ae496e
2017-04-04 14:26:10 -07:00
Sohani Rao
63f17c0449 Define Wifi Offload HAL HIDL interface
This interface defines the interaction of the Wifi framework with the
new HAL module that will offload disconnected PNO scans when screen is
off. For details of the overall design, refer to this document:
https://docs.google.com/a/google.com/document/d/13OmqquTnRXTRnyWbtfpc1Ib7YY411EwjNW3njzJ5KyM/edit?usp=sharing
Cherry pick from 7ac4a32e6eca71fcf1a86991654af747d38928ad
Bug: 32842314
Change-Id: I01e1952458d58b9233f18fc0450491fc7c48e6e1
Test: Unit tests, Mannual Wifi turn on
2017-04-04 14:25:58 -07:00
Etan Cohen
ee1394f642 Merge "[AWARE] Create true translations between legacy and hidl enums" am: 24ff2036ce am: 945fbf8434
am: e78000cffa

Change-Id: I17e82ff6f2951a2709a63cdfd3f62d23b9f24d13
2017-04-04 17:57:22 +00:00
Etan Cohen
67d378d69e [AWARE] Create true translations between legacy and hidl enums
Replace implicits translations between legacy and hidl enums (using
casts) with explicit translations.

(cherry-pick of commit 284511779c)

Bug: 35767620
Test: integration (sl4a) tests
Merged-In: I4ae4cd691226ce29bc0e92f9890fbb343a064505
Change-Id: I4ae4cd691226ce29bc0e92f9890fbb343a064505
2017-04-04 09:21:25 -07:00
Etan Cohen
284511779c [AWARE] Create true translations between legacy and hidl enums
Replace implicits translations between legacy and hidl enums (using
casts) with explicit translations.

Bug: 35767620
Test: integration (sl4a) tests
Change-Id: I4ae4cd691226ce29bc0e92f9890fbb343a064505
2017-04-03 16:12:46 -07:00
Roshan Pius
e3509d455b supplicant(vts): Compilation fixes
Fixed couple of compilation failures from .hal changes and made change
to stop/start framework during tests.

Bug: 33457575
Test: mmma -j32 hardware/interfaces/wifi/supplicant/1.0/vts/functional
Change-Id: I1bac68bd71e92b025acdebd0fef8834b826bcfcb
2017-03-30 14:59:18 -07:00
Andreas Huber
675ae49ab1 Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:14:43 -07:00
Andreas Huber
3e4acb8b3a Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:10:42 -07:00
Roshan Pius
34e4bc4dd2 wifi(implementation): Stop loading vendor library statically
libwifi-hal statically imports the vendor implementation of the legacy
HAL. Since the HIDL daemon is dynamically linking against libwif-hal,
there is no need for it to statically import the vendor implementation
library (one pointed to by: $LIBWIFI-HAL variable).

Bug: 36169790
Test: Compiles & device is able to connect to wifi networks with the
change.

Change-Id: Ie44b58328f9bdde011ba6d4a4d26f786c2d097e7
2017-03-27 22:14:04 +00:00
Steven Moreland
e90c31f125 Update makefiles.
Test: pass
Change-Id: I925baccbe51a32b7b7f3f66cf2918d017ee6b039
2017-03-24 21:50:45 -07:00
Etan Cohen
2d523c012e [WIFI] Restore initialization code
Restore the usage of WIFI-specific main function. The main
function was inadvertantly disabled by moving it into a static
library - which caused the default main to be used.

Need a custom main since need to stop WIFI before tests start
to enforce a clean starting point.

Bug: 35276551
Test: confirms custom main routine is called
Change-Id: I978827bc0f0f16d9ca4f159fbf42d0bc53f5df99
2017-03-23 17:37:42 -07:00
Etan Cohen
9e71d7d44f Merge "[AWARE] Add Passphrase data-path security" 2017-03-23 00:10:34 +00:00
Etan Cohen
c58619e8d9 [AWARE] Add Passphrase data-path security
Add mechanism to configure data-path security using Passphrase
(as an alternative to PMK).

Bug: 35866810
Test: integration (sl4a) tests passing.
Change-Id: If7094a44af1996d3caf5b776d492797f14a7be11
2017-03-21 16:49:40 -07:00
Roshan Pius
c314841614 supplicant(interface): Add an event for bssid changes
This is useful in debugging (& collecting metrics) when the active bssid changes.

Bug: 36451639
Test: Compiles & manual tests using the framework changes.
Change-Id: I5676dfb9ec9c13ae900c315eb8dfacb857e70fc1
2017-03-21 10:53:56 -07:00
Roshan Pius
a1c76e4d53 wifi(implementation): Return proper status code on initialize
The fallback HAL will return |WIFI_ERROR_NOT_SUPPORTED| when
|init_wifi_vendor_hal_func_table| is invoked.  This should be sent as is
to the HIDL interface instead of sending |WIFI_ERROR_UNKNOWN|.

Bug: 34859006
Test: Compiles
Change-Id: I5fd132368715bd158e617ad3cf2e6f88d147cef7
2017-03-20 19:20:32 -07:00
Roshan Pius
d65be16cfd supplicant(interface): Correct the WFD info length
Error logs from test:
03-17 18:34:34.303  1781  1781 E wpa_supplicant: Unexpected WFD device
info len: 6

Bug: 36401779
Test: Compiles
Change-Id: I65805599f8f3242a5c1f6ba8c0a1b9da05df79b4
2017-03-20 08:01:43 -07:00
Roshan Pius
94b4bdca75 supplicant(interface): Support for P2P client list and save config
Bug: 36042785
Test: Compiles
Change-Id: Ib47b47762c05e6252f692c1456e9b8d5dd8c051a
2017-03-20 08:01:43 -07:00
Roshan Pius
39c2609065 supplicant(interface): Add support for disabling auto connect
Adding a new API to prevent wpa_supplicant from initiating auto
reconnects.

Bug: 36282386
Test: Compiles & manual tests.
Change-Id: I81d7b1a3677cb26c6e9dc35b7302cc6b00d9a6a2
2017-03-16 16:48:57 -07:00
Roshan Pius
d23068fac6 supplicant(interface): List out all status/reason codes
List out all the association/disconnect reason codes exposed in the
IEEE80211 spec.

Bug:36363830
Test: Compiles
Change-Id: I27168bfb67fbc658339bc5fc9310ffdc9aec5ec6
2017-03-16 20:43:36 +00:00
Roshan Pius
864cae3795 Merge "supplicant(vts): More tests" 2017-03-15 20:34:19 +00:00
Etan Cohen
16ae0c8f86 Merge "[AWARE] Separate Aware (NAN) VTS tests into a separate test binary." 2017-03-15 14:42:46 +00:00
Etan Cohen
a49579b43a [AWARE] Separate Aware (NAN) VTS tests into a separate test binary.
Aware (NAN) VTS need to be in a separate test binary since whether
they run depends on the feature being supported by the device.

Bug: 36003265
Test: confirms separate binary built
Change-Id: If237e21e72a7c65f5587e40d98acb3146eae45a1
2017-03-15 01:14:13 +00:00
Roshan Pius
036da68261 supplicant(vts): More tests
These tests just invoke the HIDL interface API's and ensure
that they succeed or not. Some of these API's (especially P2P) need
multi device testing (AP, Peer) to ensure that they work.

Bug: 33457575
Test: adb shell /data/supplicant_hidl_test
Change-Id: Ibf547b5ed95895c429c8bcb59e4c43b3b436338f
2017-03-14 10:10:12 -07:00
Roshan Pius
d32a43f464 wifi(implementation): Make a boolean flag atomic
The flag |awaiting_event_loop_termination_| is accessed by multiple
threads, so make it atomic.

Bug: 33552618
Test: Compiles
Change-Id: I5ebe27fe88672565aae0daf34a89616d36f35f90
2017-03-14 08:30:45 -07:00
Roshan Pius
e42ace2404 wifi: Add support for multiple radio stats
Previously, we've always assumed that we have only one instance of
radio stats fetched in link layer stats. This is no longer true for the
newer devices which support multiple radios.

Also,
Changed the timestamp member from uint32_t to uint64_t.

Bug: 36148086
Test: The error logs no longer seen on newer devices.
Change-Id: I048a1db7cc0bfb0dc0dacafff2156f42a8ae1e63
2017-03-13 17:12:32 -07:00
Subhani Shaik
48df739a4d wifi: Link the new libcld80211 library
Bug: 32775496
Change-Id: I700dec21bfc3a36b8a3b09251b3004449fd49de7
2017-03-13 20:34:29 +00:00
Etan Cohen
48b4ce2e99 Merge "[WIFI][HIDL] Add device-based feature flag support" 2017-03-11 18:57:41 +00:00
Roshan Pius
78cfef9f0c wifi(implementation): Add null checks for RTT result
According to the legacy HAL header file, the LCI & LCR fields may not
always be populated. So, add null checks for them.

Bug: 36141536
Test: Compiles
Change-Id: Id2a5f5fd0eaf21b3a4d5cfcd26124c9fb6c90869
2017-03-11 05:41:59 +00:00
Etan Cohen
c57004008a [WIFI][HIDL] Add device-based feature flag support
Add mechanism to define feature support flags to
configure set of Wi-Fi features supported on a particular
device.

Bug: 32997844
Test: integration tests
Change-Id: Iffbf3ba237013f1030b24c0173641234a9c27e5c
2017-03-10 10:07:16 -08:00
Yuexi Ma
6b8720110b Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I38ae6cc940d0f17bb3352f360efdf9c70697c76b
2017-03-10 00:42:13 -08:00
Roshan Pius
cdca05557d Merge changes If83c1cbe,I12ad2665
* changes:
  wifi(implementation): Move out clearing on stop complete
  wifi(vts): Some IWifiChip/IWifiStaIface tests
2017-03-10 01:16:48 +00:00
Roshan Pius
46b6454d2f wifi(implementation): Move out clearing on stop complete
Currently, we invoke WifiLegacyHal.invalidate() inside the
|on_stop_complete_internal_callback| std::function. |invalidate|
nulls out |on_stop_complete_internal_callback| inside it which might be
considered a violation since we're deleting the std::function object
as we're executing it.

Bug: 36095153
Test: Compiles, start/stop wifi multiple times.
Test: Verified that a crash is not seen in asan build.
Change-Id: If83c1cbee78a1b6eca12686fcc1ec1de67134f13
2017-03-09 23:22:09 +00:00
Etan Cohen
255cdb29a0 Merge "[AWARE] Relocate ranging field in legacy HAL - match in HIDL impl" 2017-03-09 23:13:29 +00:00
Roshan Pius
3819e4193e wifi(vts): Some IWifiChip/IWifiStaIface tests
These tests basically just ensure that we can call the corresponding
API's successfully. More tests will be added in further CL's.

Bug: 33459306
Test: mmm -j32 hardware/interfaces/wifi/1.0/vts/functional/
&& adb push out/target/product/angler/data/nativetest64/
VtsHalWifiV1_0TargetTest/VtsHalWifiV1_0TargetTest /data/ &&
adb shell /data/VtsHalWifiV1_0TargetTest

Change-Id: I12ad26653993ce7167d007a887e7aff07fd0a5ce
2017-03-09 09:33:55 -08:00
Steven Moreland
691a455b9f Add hidl_default and make modules use hidl_default.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: no warnings
Bug: 35840847
Change-Id: I468b76893bf3f4b62ad610d1d9603bcb8797a702
2017-03-08 16:22:00 -08:00
Steven Moreland
853a9b5feb update-makefiles.sh: wifi
Test: pass
Change-Id: If43aa789381ed43120e0a075587a89c0076c8433
2017-03-08 15:33:31 -08:00
Etan Cohen
5b804210ae [AWARE] Relocate ranging field in legacy HAL - match in HIDL impl
Relocate ranging report config in the legacy HAL. Match the correspoding
setting in the HIDL implementation (field itself not exposed).

Bug: 36065933
Test: integration (sl4a) tests
Change-Id: I651db9e8f63f8382706994d8b3b6cc266b77c73d
2017-03-08 11:44:01 -08:00
Roshan Pius
cbafd53fbc supplicant(interface): Add support for get/set raw psk
Bug: 36013886
Test: Compiles
Change-Id: I2e90e3f6533d2271144404a3de3b19854b001c2f
2017-03-08 08:04:30 -08:00
Treehugger Robot
f297caedd7 Merge "wifi: Fetch the gscan bucket idx from request" 2017-03-08 02:53:31 +00:00
Roshan Pius
7bf6dc8193 supplicant(interface): Add timedOut param in assoc reject
This is needed to indicate if the association failed due to a timeout
instead of AP explicitly rejecting us.

Bug: 34280407
Test: Compiles
Change-Id: Ib287ea8e45c28356bf9e3271962fc015761651fd
2017-03-08 01:22:23 +00:00
Roshan Pius
4cf4059cd9 wifi: Fetch the gscan bucket idx from request
We can't rely on the ordering of these buckets to populate their
indexes. So, send them explicitly from the caller.

Bug: 35989680
Test: Compiles
Change-Id: Ife09440935eb3526636c27bfdd40c37c69c7ade2
2017-03-08 01:21:10 +00:00
Roshan Pius
f12f1ee288 wifi(implementation): Clear the chip immediately on IWifi.stop()
Currently, we wait for the legacy HAL callback to complete to clear and
invalidate the chip objects and it's derivatives. This may cause us to
access the wifi legacy HAL in a indeterminate state (as it's processing stop)
on subsequent HIDL calls.
So, clear up the chip object and derivatives immediately after we
process the stop to prevent any subsequent calls from sneaking in.

Also,
Added a couple of logs when wifi HAL is started/stopped to help debug
such issues later.

Bug: 36026601
Test: Turn on/off wifi and switch to softap mode multiple times.
Change-Id: Id5c2c9a90a335b2de4ae331ac8610b1a4e7875da
2017-03-07 23:24:16 +00:00
Roshan Pius
814b765a09 wifi(implementation): Allow wifi hal to access gps
Wifi Hal uses some gps components (LOWI) for gscans (location scans).
So, grant it gps group permission.

Denials:
03-03 16:56:03.845   623  6924 I QCALOG  : [MessageQ_Client] connecting
to server [/data/misc/location/mq/location-mq-s]
03-03 16:56:03.845   623  6924 E QCALOG  : [MessageQ_Client] connect
error: 13, [Permission denied]

Bug: 35959128
Test: Denials no longer seen.
Change-Id: Iddfddb46a585c7c15a26b1fa01889181e4a3cce1
2017-03-06 17:18:48 -08:00
Etan Cohen
89145d5849 Merge "[AWARE] VTS baseline" 2017-03-06 16:46:59 +00:00
Etan Cohen
80054133dc [AWARE] VTS baseline
Modified Wi-Fi test setup/tear-down to shutdown and start the
Android framework. The framework competes with the VTS to control
the HAL and so must be disabled for the duration of the test.

Added framework to support VTS testing with the Wi-Fi Aware (NAN)
interface.

Added all callback types (notifications, events) with ability to
wait for such callbacks.

Bug: 35276551
Test: gtest pass
Change-Id: I50847fccad457c2b225ba7f2e1760b4dbb4d363f
2017-03-03 15:30:47 -08:00
Roshan Pius
590744b1c1 wifi(implementation): Clear all structs before conversion
Bug: 35445613
Test: Integration tests
Change-Id: I5c32ab580588f4521291ac8cb05ee42ce6e5bf31
2017-03-02 14:21:20 -08:00
Roshan Pius
208e46bbc2 wifi(implementation): Use strlen for size of ssid
Looks like the legacy hal uses a null termination for indicating the
size of ssid.

While there,
Use the helper function to convert wifi band from hidl to legacy.

Bug: 35765841
Test: Integration tests pass now.
Change-Id: Ie480f9d6735a21c5ccedfc68bfde5f0d920dcdc9
2017-03-01 22:48:07 -08:00
Roshan Pius
8c0c8e9aa0 wifi: Few minor interface changes
Changes in the CL:
1. Add the buckets scanned bitmask to bgscan.
2. exposed the legacy HAL constants for Bgscan in the HIDL interface.
3. Add a stop method for ring buffer logging.

Bug: 35752950
Bug: 33194311
Test: Compiles
Change-Id: Idb2031c33c5a237d7447410fb733f8e408a17288
2017-02-28 15:35:40 -08:00
Treehugger Robot
7d32288474 Merge "Add columns to namespace for vts target base test invocation" 2017-02-28 20:59:12 +00:00
Yuexi Ma
93d2541aae Add columns to namespace for vts target base test invocation
Test: make vts
Change-Id: Ia0284fbc11eadef572dd510bb5847160852bd517
2017-02-28 20:49:00 +00:00
Etan Cohen
a4b9cad4a1 Merge "[AWARE] Data-path negotiation update" 2017-02-28 20:35:41 +00:00
Yuexi Ma
5fd2ce668d Merge "change all vts hidl tests to use VtsHalHidlTargetBaseTest" 2017-02-28 18:15:18 +00:00
Etan Cohen
4ba6a7d3dd Merge "[AWARE] Data-path cipher API correction" 2017-02-28 14:08:32 +00:00
Yuexi Ma
178dfd5e29 change all vts hidl tests to use VtsHalHidlTargetBaseTest
Bug: 33385836
Test: mma
Change-Id: I660d6e0fce6422d87d4b227273a77c95d20ed3f2
2017-02-28 07:59:59 +00:00
Etan Cohen
3c5d8aee4d [AWARE] Data-path negotiation update
Data-path has two negotiation modes controlled during a
discovery session configuration as auto-accept or not (in
which case an event to framework is triggered).

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I129ee48554daddb606bfd2c20ffdd867a6d998e0
2017-02-24 15:25:10 -08:00
Etan Cohen
d188984de3 [AWARE] Data-path cipher API correction
Data-path security is configured using a specific cipher
type - corrected error which specified a set of cipher
types.

Bug: 33552694
Test: unit tests and integration (sl4a) tests
Change-Id: I2f2d21ebf68bd63906e60b5af76c8808864a1b46
2017-02-24 15:01:01 -08:00
Steven Moreland
d28a3dce40 Remove viral dependency on libhwbinder.
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6b0b5ae318422b7a9be17a19a79e039ffc0f9272
2017-02-24 12:01:06 -08:00
Etan Cohen
9dabc7cefe [AWARE] Correct ranging specification documentation
Bug: 33821639
Test: none - comment change
Change-Id: Ib2ba907a46c6cb34d37ca5eb6d3a22508fb7f17a
2017-02-23 14:25:20 +00:00
Roshan Pius
7f4574d2a1 wifi: Duplicate getValidChannelsForBand in AP iface
This functionality is needed even for AP iface. So, duplicate this
method.

Changes in the CL:
1. Add getValidChannelsForBand() in IWifiApIface.
2. Rename StaBackgroundScanBan to WifiBand to make it a more generic
name.
3. Change the existing method name in IWifiStaIface to match with the
one in IWifiApIface.

While there,
Fix indentation in hidl_callback_util.h

Bug: 35663149
Test: Compiles
Change-Id: Iaeb6c323e13eedf2f98de92fea77e327c76ffa5b
2017-02-22 17:07:00 -08:00
Roshan Pius
e54bcaee0b supplicant(interface): Add set/get for eap private key id
"private_key" field is not used in Android, we instead use the "key_id"
field. So, change the setter to reflect that.

Bug: 35663125
Test: Compiles
Change-Id: I3c01365fd90fd79cac2b99f9b9fe0bbea2226b59
2017-02-22 09:02:43 -08:00
Tri Vo
81f9968c71 Remove .vts spec files.
Test: mmma hardware/interfaces
Change-Id: Iabbcd336d37ceb58ea4cc649ee5c104424494513
2017-02-21 15:55:00 -08:00
Etan Cohen
a7543a7423 [AWARE] Add service support for SDEA service info
Wire-up the SDEA service info (aka Extended Service Specific
Info) to the newly available legacy HAL.

Bug: 35193423
Test: integration (sl4a) tests
Change-Id: I2cbd82ecc4274c5137693dde34370f2b68646e19
2017-02-21 20:05:01 +00:00
Etan Cohen
c190f93111 [AWARE] Ranging as a service discovery constraint
Ranging configuration modification: change from an
overall Aware configuration (remove from Enable/Config
structures) to a discovery session-specific configuration.

Bug: 33821639
Test: integrated (sl4a) tests
Change-Id: Ie5a8bb3701a5dd6186c15d2be16bca3ec7202f04
2017-02-20 21:51:46 -08:00
Etan Cohen
2bfad0cf82 Merge "[AWARE] Add capability info: max subscribe addresses" 2017-02-21 05:47:03 +00:00
Treehugger Robot
10b0e0880c Merge "wifi(implementation): Callback death handler" 2017-02-18 16:36:35 +00:00
Treehugger Robot
7748aa1f5d Merge "wpa_supplicant(interface): Add bssid to WNM callbacs" 2017-02-18 03:43:53 +00:00
Zhuoyao Zhang
f7693eed97 Update the test binary and source file name.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: Ide6d9d15618e65d8cb74363f3a8acd52609cd0dd
2017-02-17 10:34:33 -08:00
Etan Cohen
09a604b41a [AWARE] Add capability info: max subscribe addresses
Add capability to provide maximum number of subscribe
addresses that can be specified in a discovery session
configuration.

Bug: 34059183
Test: integration (sl4a) tests pass
Change-Id: I5aa875cf8f43a7ad215b52e2cf917dfbbb3b1195
2017-02-17 02:41:09 +00:00
Roshan Pius
eabd11bf14 wpa_supplicant(interface): Add bssid to WNM callbacs
Also,
Renamed the other HS2.0 callback param to |bssid|.

Bug: 35444886
Test: Compiles
Change-Id: Ic1b3f7c92fe2a9d25651c682534270e527506d88
2017-02-16 18:21:45 -08:00
Etan Cohen
2eff5c85fe Merge "[AWARE] Update comments on transmit followup status codes" 2017-02-17 01:58:07 +00:00
Treehugger Robot
c00fc1ff6b Merge "wifi(implementation): Initialize flags before conversion" 2017-02-17 00:59:29 +00:00
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
Roshan Pius
72b5eb0f29 supplicant(interface): Add new EAP phase 2 type and NFC methods
These new EAP methods were recently added in b/34835771. Add HIDL
support for them.

Bug: 35270422
Bug: 35311730
Test: Compiles
Change-Id: I3488f5e49ff72fe1717a16c27ffbe45ac2a8ebf4
2017-02-16 19:48:27 +00:00
Etan Cohen
d5d6e37d6e [AWARE] Update comments on transmit followup status codes
Fix documentation of transmit followup status codes.

Bug: 34888409
Test: builds (only comment changes)
Change-Id: I8c55c627a0ecac625cb574988b2b860070254527
2017-02-16 08:29:35 -08:00
Roshan Pius
d37341f1e5 wifi(implementation): Callback death handler
Add a new utility to handle callback death notifications. The new class
HidlCallbackHandler will be used by all the HIDL interface objects to
manage callbacks. Any dead clients will automatically removed from the
cb list by the utility class.

Bug: 34840719
Test: Compiles
Test: Verified that the cbs are deleted on crashing the framework
manually
Change-Id: I0f7ba8b3ed717c2e8e8fbf744a2501d0ad2d48c8
2017-02-15 18:31:03 -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
2ca2a529b9 supplicant(interface): Remove redundant callbacks
The information broadcast via these callbacks are already available via
other callbacks.

1. All of the onProvisionDiscovery* callback data can be retrieved via the
|onProvisionDiscoveryCompleted| callback.
2. OnAssociated & onConnected callbacks data can retrieved via the
onStateChanges callback.

Bug: 34221586
Test: ./hardware/interfaces/update-makefiles.sh

Change-Id: Ieee26013dfda7a9be41a80e98ff1537da16b3466
2017-02-13 13:25:16 -08: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