Commit graph

770 commits

Author SHA1 Message Date
hayun.kim
43ab18edcb Fix VtsHalWifiV1_0Host#WifiStaIfaceHidlTest.SetScanningMacOui fail am: eb73bff276
am: 4808395767

Change-Id: I9e4ecfdcda7988725bc2c85703c26d7a38f72f56
2019-04-23 15:49:56 -07:00
TreeHugger Robot
2f40bd0697 Merge "wifi(implementation): Simplify getFirstActiveWlanIfaceName" into qt-dev 2019-04-23 06:14:19 +00:00
Roshan Pius
444473fbc0 wifi(implementation): Simplify getFirstActiveWlanIfaceName
Get rid of the unnecessary looping inside the method which was causing a
bunch of unnecessary selinux denial logs.

Bug: 130384921
Test: ./data/android.hardware.wifi@1.0-service-tests
Test: Manually verified the property name after wifi on/off & softap
on/off.

Change-Id: Ia9f61749b2017234851d67b027deb685cb8b539e
2019-04-22 08:58:46 -07:00
TreeHugger Robot
2684365a73 Merge "hostapd: fix hostapd vts fail" into qt-dev 2019-04-20 07:13:24 +00:00
lesl
ce4a7cce2c hostapd: fix hostapd vts fail
If wpa_supplicant is running during hostapd vts and there are some
configuration in wpa_supplicant. It will happen both of hostapd and
wpa_supplicant are working with wlan0 interface.

Stop wpa_supplicant before running hostapd vts.

Reproduce step:
1. Connect to Wifi before execute hostapd vts.
2. Run hostapd vts.

Bug: 130207248
Test: vts with below commands
vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiHostapdV1_0Target -l INFO
vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiHostapdV1_1Target -l INFO

Change-Id: Id91463c2eab3c8c348a91bd978d7ea4aa8d42e85
2019-04-18 10:18:22 +08:00
hayun.kim
eb73bff276 Fix VtsHalWifiV1_0Host#WifiStaIfaceHidlTest.SetScanningMacOui fail
1. snip the VtsHalWifiV1_0Host#WifiStaIfaceHidlTest.SetScanningMacOui test
    if SCAN_RAND capability is not supported on dut device

Test: execute VtsHalWifiV1_0TargetTest of VTS test

Bug: 129735587
Change-Id: I825e1df11c958b3b2476880c6c6f7b8ee7b292bf
Signed-off-by: hayun Kim <hayun.kim.lge.corp-partner.google.com>
2019-04-17 20:44:03 +00:00
lesl
72132c4feb p2p: fix vts fail due to 5g go init fail with 00 country code
The force 5GHz Go will cause fail when country code is 00 or chip
doesn't support 5GHz.
Change test parameter to force 0 which means driver decide GO channel.

Bug: 130208180
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantP2pV1_2Target -l INFO
Change-Id: I0d2a8fcba4ece616ddeccbae36146329e9043157
2019-04-17 16:44:02 +08:00
TreeHugger Robot
65ae914635 Merge "wifi(implementation): Set prop with the first active iface" 2019-04-02 22:01:31 +00:00
Ahmed ElArabawy
ccf9cbea58 Merge "Wifi: Add ether_type to sending offloaded packet" 2019-04-02 16:43:48 +00:00
Roshan Pius
8574e7fd8b wifi(implementation): Set prop with the first active iface
This is updated whenever a new STA or AP iface is created & removed.
Also, when the chip is configured.

This property can be read by the rest of the system (including vendor
specific HAL instances) to retrieve the active iface name.

Bug: 129506593
Test: ./data/android.hardware.wifi@1.0-service-tests
Test: Manually verified the property name after wifi on/off & softap
on/off.

Change-Id: Ic1c21fd3a1c6894c797070bf889f705e4cba6dd1
2019-04-02 09:41:15 -07:00
Roshan Pius
d462a31740 Merge changes I5a617557,Idca8de42
* changes:
  wifi(implementation): Use the active iface for chip operation
  wifi(implementation): Pin primary STA iface to wlan0
2019-03-29 15:31:14 +00:00
Roshan Pius
6036c02d83 wifi(implementation): Use the active iface for chip operation
For the chip level operations, the actual interface itself does not
matter. So, instead of hard-coding these operations to wlan0 interface,
find the first active interface to use. This will still return wlan0 if
it's active, but if only AP is up (& pinned to wlan1), then it will use
wlan1 instead.

Bug: 129358937
Test: ./data/android.hardware.wifi@1.0-service-tests
Test: Verified manually that SAR commands are now correctly sent down.
Change-Id: I5a6175579027cbb45c09d32633ed81b9f72224dd
2019-03-27 12:30:03 -07:00
Roshan Pius
a3e5b7fce7 wifi(implementation): Pin primary STA iface to wlan0
The primary STA iface will always be pinned to wlan0.
The primary AP iface will be pinned to wlan0 for devices not supporting
STA + AP concurrency & wlan1 for devices supporting STA + AP concurrency.

All secondary STA or AP ifaces will be allocated on a first come first
service basis (the current logic).

Also, refactored/renamed some of the iface combo selection logic methods
to help check whether concurrency is allowed in the current mode.

Bug: 128946563
Test: ./data/android.hardware.wifi@1.0-service-tests
Test: Will send for full regression tests.
Test: On crosshatch, ensured that STA always comes up on wlan0 & AP
comes up on wlan1 regardless of the sequence of toggle followed.
Change-Id: Idca8de42ce819240bf0fac2a9039d15ed4bcaf90
2019-03-27 10:48:10 -07:00
Roshan Pius
17b3a4f60f wifi(vts): Don't enforce interface combination in VTS tests am: f638d0a43a am: 1905955baf
am: 9f0bb1815c

Change-Id: I086016e07ae0d2dd37b11424039ec44f978e58e8
2019-03-27 09:17:32 -07:00
Roshan Pius
9f0bb1815c wifi(vts): Don't enforce interface combination in VTS tests am: f638d0a43a
am: 1905955baf

Change-Id: I792ae076ad6bb968601972854e7e0e49a388de40
2019-03-27 09:14:28 -07:00
Roshan Pius
f638d0a43a wifi(vts): Don't enforce interface combination in VTS tests
Devices are allowed to expose multiple AP or STA interfaces, fix the VTS
tests to allow this.

Bug: 112123615
Test: Compiles
Change-Id: I6cf60b3cb0429ca78fe5a54d9e42ba144d7609e9
2019-03-26 20:52:38 +00:00
Roshan Pius
1cd82a8cf2 wifi(implementation): Fix unit test failures
ag/6722341 caused some unit test failures. Fixing them.

Bug: 127715974
Test: ./data/android.hardware.wifi@1.0-service-tests
Change-Id: Ib504cf55b9990dba081eb1b07bc32508e09ad0a6
2019-03-25 13:51:28 -07:00
Ahmed ElArabawy
58d1b2a036 Wifi: Update the Latency mode API documentation
This commit updates the documentation for the HAL API setLatencyMode().
It also updates the current.txt with the IWifiChip new hash.

Bug: 124459516
Test: None
Change-Id: I018e0237807aab70f7587d5fd7517d64352140f7
2019-03-21 18:58:32 -07:00
Ahmed ElArabawy
ffbad18ca0 Wifi: Add ether_type to sending offloaded packet
This commit adds the ether_type as an argument to the legacy hal
function to send an offloaded packet.

Bug: 122487582
Test: Manual
Test: Make sure ether_type is passed all the way to vendor hal function
Change-Id: I5918088000cc455e7f83feddc1090803ccc04c06
2019-03-18 16:06:12 -07:00
chenpaul
f5eca2949b wifi - Add wlan driver/fw version when device boot up
Bug: 127715974
Test: Property with wlan driver/fw version when device boot up
Change-Id: Idf1215ceb2c34502ed5eac6c8900350e511732fc
2019-03-14 12:33:29 +00:00
Elliott Hughes
14c495fc88 Merge "wifi: use PLOG rather than LOG strerror." am: fba8a08e6f am: 6d37b594a8
am: 9034bf375d

Change-Id: I483a457782a441e5b59f7b0b08e7a4cdf4f12949
2019-03-12 08:11:39 -07:00
Elliott Hughes
6d37b594a8 Merge "wifi: use PLOG rather than LOG strerror."
am: fba8a08e6f

Change-Id: Ifdc51d50362da0742cac8b5dcd5272f0be18e803
2019-03-12 08:04:30 -07:00
Elliott Hughes
4db4add8da wifi: use PLOG rather than LOG strerror.
Test: builds
Change-Id: I1a508dbb47fed3a1c1e5166b9b32d33ed0d246fe
2019-03-08 12:42:57 -08:00
Steven Moreland
87f43604b9 Merge "Update makefies: no 'types' internal" 2019-03-05 17:40:03 +00:00
TreeHugger Robot
6f058fb3ed Merge "wifi(implementation): Fix spammy log" 2019-03-05 01:44:56 +00:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
bab622f6a6 Merge "Update makefies: no 'types'"
am: 4ee5ec1469

Change-Id: I803f6d2f37093477a46a50f429cb265e92acd144
2019-03-04 15:08:49 -08:00
Steven Moreland
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Ahmed ElArabawy
4822938217 Add an api call to check if legacy hal is started
This commit adds a public api call for legacy hal to check if it is
successfully started.
This is to be used by callers of legacy hal to make sure not to request
functionality while legacy hal (and hence all interfaces) are not
started.

Bug: 112205428
Test: Manual
Change-Id: I5183d01811e35edb3149cfb3784067c68b40e46d
2019-03-01 23:45:36 +00:00
Roshan Pius
5b3334648b wifi(implementation): Fix spammy log
wifi.interface.0, etc should only be checked if the primary property
used on most devices (wifi.interface & wifi.concurrent.interface) does
not exist.

wifi.interface.0, etc should only defined on Android auto platforms.

Bug: 126925255
Test: Manually verified that the spammy log does not exist
Change-Id: Ib5e6a87a7da2d4b26cdd35f668385b503e7c8006
2019-03-01 14:08:47 -08:00
Roshan Pius
ce02fb3c51 wifi(tests): Fix runtest.sh
Bug: 79261060
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Change-Id: Idca21bf264640fb2e5eaa1791f3ff29e138bbbb2
2019-02-28 08:12:35 -08:00
Roshan Pius
c4446793d1 wifi(implementation): Generate randomized mac address
Generate random MAC address on the first creation of AP iface after
reboot.

Bug: 78353419
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Test: Manually verified that the AP MAC address & BSSID changes on every
reboot.
Change-Id: Ie9984ec72b2dfec9b7de7a9ef33b9e9ebfaf945c
2019-02-26 07:12:52 -08:00
Roshan Pius
3b6705fb20 wifi(implementation): Set randomized MAC address for AP
Add the plumbing required for setting a random MAC address on AP
startup. The random MAC address is created once for the lifetime of
the daemon and then reused for any further AP creation. This would
ensure that the MAC address is changed on every reboot.

The feature is turned on by default, devices will need to set the
|WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION| in their .mk file to
disable the feature at compile time.

Bug: 78353419
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Change-Id: I054d5249c20cc582b76966313135295873cd0b61
2019-02-26 07:11:40 -08:00
Roshan Pius
99dab386d3 wifi(implementation): Move set/getMacaddress to a util class
This is just a refactor to move the setMacAddress & getFactoryMacAddress
methods to a util class within the HAL. This can be then reused in AP
iface for mac randomization of SoftAp.

This also fixes a bug in the existing setMacAddress() method, the
current method always sets wlan0 up/down. STA interface could be wlan1
on some devices.

Bug: 78353419
Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh
Test: Manually verified STA MAC randomization still works.
Change-Id: I0bb8154f7e6dcae37c977454423c8c299762260e
2019-02-26 07:09:52 -08:00
Hai Shalom
6398207a8c [DPP] Replace HAL interface onSuccess with onSuccessConfigSent
Following ANAPIC Review:
onSuccess callback was returning only a single status code, CONFIGURATION_SENT.
Renamed the callback to onSuccessConfigSent and eliminated the status code.

Bug: 124459312
Test: atest DppManagerTest
Test: atest SupplicantStaIfaceHalTest
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_2Host
Change-Id: I4d7c5732ded55902b1f235d40d3babe3be372bf7
2019-02-15 11:02:13 -08:00
Etan Cohen
02b43050d9 Merge "Revert "[AWARE] Disable NANv3 data-path capabilities"" 2019-02-12 22:58:58 +00:00
Steven Moreland
f8a47b7f01 Update makefiles.
Bug: 123976090
Test: N/A
Change-Id: I5fb6c126a090a3fe0fa4829ea9224564133dc1ae
2019-02-11 21:14:16 -08:00
Etan Cohen
4cd0dbf6bb Revert "[AWARE] Disable NANv3 data-path capabilities"
This reverts commit e338c81190.

Cannot be supported without additional HAL APIs to provide the
device's capability to the host. These aren't necessary since
this capability should be enabled by default by the firmware.

Bug: 112586769
Test: (ACTS) act.py
ThroughputTest:test_iperf_max_ndi_aware_only_passphrases
Test: (CTS) atest SingleDeviceTest
2019-02-11 12:50:40 -08:00
Peter Kalauskas
1f6e6e3a65 Add new lazy wifi HAL target
Devices can use the lazy wifi HAL to allow it to exit when wifi is not
in use.

Test: Flash walleye_svelte-userdebug and check that HAL only runs when
      wifi is on.
Bug: 123307146
Change-Id: If20120f902a7e102372666447b39cf9fdad7d352
2019-01-31 15:44:47 -08:00
TreeHugger Robot
5a94cf085f Merge "vts(wifi): Separate SoftAP specific tests" 2019-01-29 00:53:03 +00:00
Les Lee
cb22949722 Merge "vts: add vts for hostapd1.1 new function addAccessPoint_1_1" 2019-01-29 00:49:17 +00:00
kumachang
3944daace2 vts(wifi): Separate SoftAP specific tests
Separate out SoftAP specific tests in WIFI HAL VTS test suite.
Use the |gEnv->isSoftApOn| flag to skip softAP tests if not support
SoftAP.

Bug: 73543546
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiV1_0Host -l INFO
Change-Id: I72217268783bb0bcff10b44114c03394ee1e1d88
2019-01-28 22:38:19 +08:00
lesl
7bdd7298ee vts: add vts for hostapd1.1 new function addAccessPoint_1_1
BUG: 123209079

Test: build - make vts
Test: atest VtsHalWifiHostapdV1_1Target
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_1Target -l INFO

Change-Id: I2798c363f51d64c8dcfdfdb8488374cd217f3e47
2019-01-28 15:00:02 +08:00
Les Lee
16337343e9 Merge "vts: bypass test for deprecated API addAccessPoint" 2019-01-25 02:28:03 +00:00
lesl
496a29e182 vts: bypass test for deprecated API addAccessPoint
BUG:123325192

Test: build - make vts
Test: atest VtsHalWifiHostapdV1_0Target
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_0Target -l INFO

Change-Id: Ia91d650ed8603fc62114eb00cae482de2a5f93fa
2019-01-24 17:24:45 +08:00
Les Lee
02b66cd6fc hostapd: add vts testcase for hostapd 1.1
Bug: 113799562
Test: build - make vts
Test: atest VtsHalWifiHostapdV1_1Target / atest VtsHalWifiHostapdV1_0Target
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_0Target -l INFO
      vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_1Target -l INFO

Change-Id: I4b7badc8c123f18c34d47fdc2b4db4e05b7387a8
2019-01-23 15:42:37 +08:00
Jimmy Chen
62c6495663 Merge "p2p: add HAL method to enable P2P random MAC address feature" 2019-01-23 02:53:12 +00:00
Jimmy Chen
d87a0ee2f5 p2p: add HAL method to enable P2P random MAC address feature
There are compatibility issue with driver for P2P random MAC.
The framework needs to check driver capability first before enabling
P2P random MAC address feature.

Bug: 118904478
Test: vts - atest VtsHalWifiSupplicantP2pV1_2TargetTest
Test: manual test
      * Enter WiFI Direct Page
      * check the feature is enabled in logcat
        * WifiP2pService: Supported feature: P2P MAC randomization
      * check p2p0 MAC address is randomized.

Change-Id: I28e226e7d51e3d5e3e6013d3772e643c1df1ab54
2019-01-18 17:50:36 +08:00
Etan Cohen
b0b76a16a3 Merge "[AWARE] Disable NANv3 data-path capabilities" 2019-01-18 01:38:12 +00:00