Commit graph

234 commits

Author SHA1 Message Date
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