Commit Graph

509 Commits

Author SHA1 Message Date
Kai Shi
d556312950 Merge "Bug fix of 6GHz band channelization" into rvc-qpr-dev 2020-09-20 04:19:16 +00:00
Kai Shi
dc0c7a41ea Bug fix of 6GHz band channelization
Move up 6GHz band start and end frequencies by 10MHz per IEEE 802.11ax
draft 7.0 Annex E Table E-4.
Add the special case of 6G band channel 2.

Bug: 167426957
Test: atest android.net.wifi
Test: manual test with 6GHz capable STA and AP
Change-Id: I24c9c4d38c74681cd7318a9b052d9c2cd4ddf87f
Merged-In: I24c9c4d38c74681cd7318a9b052d9c2cd4ddf87f
2020-09-19 23:17:41 +00:00
David Su
be864d3500 Remove unit test changes in "wifi: Support SAE_TRANSITION when converting to WifiConfiguration"
This partially reverts commit 43a326cdb3.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Test: Treehugger
Change-Id: I8add72b6de6e470a09a745c32b3e2fea764fc692
Merged-In: I6afba22e4081ba58884ffd1b560b81b1e9960132
2020-09-10 03:24:52 +00:00
David Su
d9d3ada818 Remove unit test changes in "[Passpoint] Changes to Unique ID"
This partially reverts commit c527eed123.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Change-Id: Ia5e9ae3bcadace1a1c2ae53a56c67343db4bef71
Test: Treehugger
Merged-In: Ice11158078b5b86c721747b0d67ecfb09731a3c5
2020-09-10 03:21:24 +00:00
David Su
beb3609dbb Remove unit test changes added in "[Suggestion] Fix setWpa3EnterpriseConfig" in rvc-qpr-dev
This partially reverts commit 08744836fe.

Reason for revert: Unit tests are out of sync with prebuilt Wifi mainline module

Bug: 168158154
Change-Id: I0cda9de836b6f00a06474515f17e67194c6246cd
Test: Treehugger
Merged-In: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
2020-09-10 02:48:47 +00:00
Hai Shalom
08744836fe [Suggestion] Fix setWpa3EnterpriseConfig
Add missing support for standard WPA3-Enterprise networks, which
are basically WPA2-Enterprise networks + PMF.
Add missing support in the Specifier as well, and add unit tests
to cover these use cases.
The logic detects 192-bit or standard mode by looking at the
certificates. If the certificates are Suite-B, then the 192-bit
mode is enabled. Otherwise, standard mode is enabled.

Bug: 166670837
Test: atest WifiNetworkSuggestionTest WifiNetworkSpecifierTest
Change-Id: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
Merged-In: I875d0d0584d71fe6dd3fedc8f5371e0b5ed2e5e5
(cherry picked from commit e1369b6275)
2020-09-03 00:35:42 +00:00
Les Lee
bae844a14d Merge "wifi: Support SAE_TRANSITION when converting to WifiConfiguration" into rvc-qpr-dev 2020-08-14 05:27:24 +00:00
lesl
43a326cdb3 wifi: Support SAE_TRANSITION when converting to WifiConfiguration
In android R, framework use SoftApConfiguratio to replace
WifiConfiguration. The mapping function between WifiConfiguration and
SoftApConfiguration was desinged to return Null when the type doesn't
support in WifiConfiguration. Likes security type WPA3_SAE_TRANSITION.
But it causes the app crash because unexpected Null config.
Solution:
Add the mapping, SAE_TRANSITION to WPA2, when converting to avoid break
the legacy apps since WPA2 config also works normally when LOHS enabled on
WPA3_SAE_TRANSITION mode.

Bug: 163687359
Test: atest FrameworksWifiTests
Test: atest frameworks/base/wifi/tests/
Test: atest -c android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSingleRequestByApps
Change-Id: I6afba22e4081ba58884ffd1b560b81b1e9960132
2020-08-13 23:28:45 +08:00
Hai Shalom
c527eed123 [Passpoint] Changes to Unique ID
Modify Unique ID calculation to use only FQDN for HomeSP hash
and modify the hash of the Credential to produce an identical
hash for user credential changes, except for username which will
result in a different hash, and generate a different hash for
SIM credential, Cert credential and realm changes.
The result would allow multiple profiles with SIM credential
or Cert credential for the same network and overwrite profiles
with updates to the user credentials with changes other than
the username.

Bug: 161008339
Test: atest com.android.server.wifi
Test: atest PasspointConfigurationTest CredentialTest
Test: Install an OSU profile, then install R1 profile for the
same network (HomeSP has a different friendly name), verify
the OSU profile has been overwritten

Change-Id: Ice11158078b5b86c721747b0d67ecfb09731a3c5
Merged-In: Ice11158078b5b86c721747b0d67ecfb09731a3c5
2020-08-12 21:28:08 +00:00
Nate Jiang
f570f1bdcc DO NOT MERGE Revert "[NetworkSuggestion] Fix getEnterpriseConfig"
This reverts commit a03bcee783.

Reason for revert: failing test because prebuild module
Bug: 162724237

Change-Id: I530123295c3366a6955076e9d9e031282c70c486
2020-08-03 16:57:21 +00:00
Nate Jiang
a03bcee783 [NetworkSuggestion] Fix getEnterpriseConfig
Return null when getEnterpriseConfig() on a non enterprise WifiConfig.

Bug: 162031037
Test: atest android.net.wifi
Merged-In: I874b2f99fef693b34bad4b075eed595a0d89f392
Change-Id: I874b2f99fef693b34bad4b075eed595a0d89f392
(cherry picked from commit 1312174396)
2020-07-29 22:24:40 +00:00
Nate Jiang
9b39089eba Use installed keystore alias to check if enterprise config is insure
Bug: 158582707
Test: atest WifiEnterpriseConfigTest
Change-Id: Ic5818db5eac19b9480e1b30a8e596b176fdbee4b
2020-06-19 22:48:31 +00:00
Nate Jiang
94268fd2ab [Suggestion] block setting insecure enterprise config
If App set insecure enterprise config to suggestion builder, an
exception will be raised.

Bug: 157822251
Test: atest android.net.wifi
Change-Id: I2e7a2421be2c1574801b853a1dddaff1d115a1b2
2020-06-05 17:36:49 -07:00
Nate Jiang
57f81d36dc WifiNetworkSuggestion setIsMetered change to tri-state
setIsMetered: true for metered; false for not metered; not set for
detect automatically
Bug: 157341534
Test: atest android.net.wifi

Change-Id: If4c028e184b44ae53db80b94fe6d9ae7d06b3cb6
2020-05-28 23:58:54 -07:00
Ahmed ElArabawy
8863a835cb Wifi: Add constant and utility method for bands
This commit adds a constant WIFI_BAND_ALL to refer to bit mask
for all bands.
It also adds a method to check on if previous scan covers all
supported bands.

Bug: 156053158
Test: atest android.net.wifi
Change-Id: I426dd3940b7efd67eaf6e12f862a1e3f0ebc177a
2020-05-12 09:33:25 -07:00
Ahmed ElArabawy
f7ccda0564 Wifi: Add definitions for bands frequency boundries
Channel frequency ranges for the three bands (2.4G, 5G, and 6G) are used
in different places with separate definitions or via literal numbers.
Also, the values are not accurate and sometimes not consistent.

This commit defines those ranges in a single place for use of other
classes. It also adds some utility methods that use those definitions.

Bug: 153896822
Test: atest android.net.wifi
Change-Id: Ifd19e245fd808c06d48d7557e30be3e92a9e7ec5
2020-05-11 09:44:53 -07:00
David Su
5d1cb4fe1e Merge "Revert "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds"" into rvc-dev 2020-05-09 00:21:18 +00:00
David Su
6cb518de87 Revert "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds"
Revert "opt/net/wifi/tests: Run mts-wifi on AOSP builds"

Revert submission 10814415-mts-wifi-com-androi-wifi

Reason for revert: Workaround no longer necessary: b/152559881#comment2
Reverted Changes:
I11baae67e:frameworks/base/wifi/tests: Run mts-wifi on AOSP b...
I66febcbb2:opt/net/wifi/tests: Run mts-wifi on AOSP builds

Bug: 152559881
Test: in continuous runs
Change-Id: I1d5f4d312f4e15ae5e2e56965b3fc76fdefcdcea
2020-05-08 20:43:10 +00:00
Roshan Pius
71709e04c9 WifiConfiguration: Add a method to check if keymgmt needs preShareKey
Bug: 153435438
Test: atest android.net.wifi
Change-Id: If67d853000d99f32204bf0b8b95465909e8740e2
2020-04-11 04:38:59 +00:00
Roshan Pius
573e3fe6be WifiNetworkSpecifier: Ensure we don't match a regular wifi network
In Android 10, ClientModeImpl would always attach a
WifiNetworkAgentSpecifier for all wifi network agents created
(regardless of whether it was created in response to a specific request
or not). In Android 11, we changed that behavior to ensure that we
attach the WifiNetworkAgentSpecifier only for agents created in response
to a specific request. However, that is exposing a bug in
WifiNetworkSpecifier matching. WifiNetworkSpecifier attached requests
should not satisfy a generic wifi network agent. Fix the
canSatisfiedBy() matching to ensure that it only matches
WifiNetworkAgentSpecifier (or itself which cannot happen during network
matching)

Bug: 149500993
Test: Add a saved network manually while running the failing ACTS test:
act.py -c wifi_manager_cross.config -tb dut-name -tc WifiNetworkRequestTest:
test_match_failure_with_invalid_ssid_pattern
Test: atest android.net.wifi

Change-Id: I38d154bd0a5685fcc38de891256a8e1d4b8cfbb5
2020-04-07 06:45:46 +00:00
Roshan Pius
12e167b30e WifiManager: Update doc for new metered change behavior
Also, explictitly mark OVERRIDE_NOT_METERED in WifiConfiguration
when suggestion is not metered.

Bug: 153127005
Test: Compiles
Change-Id: I917de747406167fc38faa05e15d98a9b867a6ce8
2020-04-03 13:27:50 -07:00
Chalard Jean
2da4f9f9ae Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
2020-03-27 23:46:30 +09:00
David Su
9c493f4722 Merge "frameworks/base/wifi/tests: Run mts-wifi on AOSP builds" into rvc-dev 2020-03-24 19:14:07 +00:00
David Su
87d6a79f2f frameworks/base/wifi/tests: Run mts-wifi on AOSP builds
This is a temporary workaround for mts-wifi to
run on AOSP builds, since on those devices the
Wifi package name is `com.android.wifi` and not
`com.google.android.wifi`.

Bug: 151836001
Test: continuous runs
Change-Id: I11baae67e10638acd8c24ae0fab92e5b2bfca6e4
2020-03-23 16:14:54 -07:00
David Su
70cd6d61e3 Merge "Remove WifiManager.getTxPacketCount" into rvc-dev 2020-03-19 23:59:14 +00:00
David Su
15c3b29222 Remove WifiManager.getTxPacketCount
This is no longer called by CTS, and has no other
clients.

This also removes the dependency on
WifiNl80211Manager.getTxPacketCounters(), so it
will no longer need test coverage.

Bug: 150978929
Test: atest FrameworksWifiApiTests
Change-Id: Ia64a6b2f5009c021ed7dd66c24e854996995778a
2020-03-19 12:51:02 -07:00
Nate Jiang
ca5ea6ca40 Merge "Set metered bit for passpoint networkSuggesiton" into rvc-dev 2020-03-19 17:16:09 +00:00
Roshan Pius
aa6527cf41 WifiMigration: Add helper to perform softap.conf to XML conversion
For softap configuration, we need to perform 2 levels of conversion:
a) AOSP softap.conf format to AOSP WifiConfigStoreSoftap.xml format
b) OEM specific customization to AOSP WifiConfigStoreSoftAp.xml format.

Moving a) from within the wifi stack to WifiMigration to allow OEM's to
adapt their customizations to the legacy conf files for b).

Bug: 149418926
Test: atest android.net.wifi
Test: Device boots up and able to turn on hotspot.
Test: Manual tests:
a) Flash Q build
b) Add hotspot config
c) Upgrade to RVC build with this CL.
d) Ensure all data has migrated over.
e) Modified hotspot config and reboot.
f) Ensured old data has not migrated over.

Change-Id: I6d900bd621873a0df81aaa17cf46ed153b073289
2020-03-18 15:38:49 -07:00
Nate Jiang
65c2b809f7 Set metered bit for passpoint networkSuggesiton
Bug: 151672224
Test: atest android.net.wifi
Change-Id: Icc850c37e84c9123ae96abaf377bbf68bd00dae6
2020-03-18 15:29:01 -07:00
Steven Liu
97f25c93fd Remove legacy "Carrier Wi-Fi" configuration constants.
They are deprecated and replaced by direct calls to the Suggestion API.

Bug: 144431927
Test: atest android.net.wifi
Change-Id: I89665bc3e891b3a0fb58be10ccb1642ec121e29b
2020-03-16 13:01:27 -07:00
Nate Jiang
81eabccd8c Merge "Remove untrusted network flag from suggestion" into rvc-dev 2020-03-16 16:58:06 +00:00
Hai Shalom
c063140b6f Merge "[Passpoint] Fix credential unique ID calculation" into rvc-dev 2020-03-14 14:37:50 +00:00
Hai Shalom
f88368556d [Passpoint] Fix credential unique ID calculation
Fix credential unique ID to allow multiple instances of same
credential type.

Bug: 151478195
Test: atest CredentialTest PasspointConfigurationTest
Change-Id: Ie99fe0430aa31ee7d461150eca5c9ce718f75aaf
2020-03-13 18:18:43 -07:00
Nate Jiang
110bc2ea99 Remove untrusted network flag from suggestion
Bug: 151150610
Test: atest android.net.wifi
Change-Id: Ieab8f45f2b75208e4d9bf9a8eb73a0fa71922589
2020-03-13 17:08:51 -07:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Les Lee
84b4877d85 Merge "wifi: API Review: API changes to SoftApConfiguration.Builder" into rvc-dev 2020-03-12 03:49:32 +00:00
David Su
3320dd6186 Merge "MTS: only run FrameworksWifiApiTest if Wifi module is installed" into rvc-dev 2020-03-11 17:58:44 +00:00
lesl
417a3b0a87 wifi: API Review: API changes to SoftApConfiguration.Builder
1. enableClientControlByUser should be renamed
to setClientControlByUserEnabled.
2. setShutdownTimeoutMillis(int) should take a long,
same for getter. Millisecond durations are always long.
3. Separate setClientList into two methods

Bug: 150855680
Test: atest frameworks/base/wifi/tests/
Change-Id: Ib065993748e186790290d3e50f4f28a09146fd65
2020-03-11 19:21:16 +08:00
Hai Shalom
ceafa21efa Merge "[SAE] Connect to networks with GCMP_256 cipher" into rvc-dev 2020-03-11 00:22:04 +00:00
Mingguang Xu
ad7b6bbf79 Merge "Extension API: Comments from API review council are addressed" into rvc-dev 2020-03-10 21:54:41 +00:00
Mingguang Xu
d54ef49075 Extension API: Comments from API review council are addressed
Addressed all comments from API review council by renaming ScoreChangeCallback, the methods in ScoreChangeCallback, and the methods in WifiConnectedNetworkScorer.

Bug: 150878285
Bug: 135573686
Bug: 122133502

Test: atest android.net.wifi

Signed-off-by: Mingguang Xu <mingguangxu@google.com>
Change-Id: I823b52a95c2501c7431295573747f2228d1f50b0
2020-03-09 18:57:10 -07:00
Ahmed ElArabawy
30caf3d28a Merge "Wifi: Add some interface annotations" into rvc-dev 2020-03-10 00:47:02 +00:00
Hai Shalom
37e10fd161 Fix WPA3 Suite-B parameters in WifiConfiguration#setSecurityParams
Add missing key management setup of IEEE8021X and WPA_EAP in
WifiConfiguration#setSecurityParams.

Bug: 151087842
Test: atest WifiConfigurationTest
Change-Id: I3569853f229eb5d463a190c7cca6e4b6d7573bfe
2020-03-09 19:13:58 +00:00
Ahmed ElArabawy
1b2fbf990e Wifi: Add some interface annotations
This commit adds some Wifi related interface annotations.
This includes:
    Annotations.WifiStandard
    Annotations.ChannelWidth
The commit also converts some APIs to @hide

Bug: 149420144
Test: Builds correctly (no new functionality in commit)
Change-Id: I007a7d828197e24e32d8f9bb558500e56d8b74dc
2020-03-06 19:32:03 -08:00
Hai Shalom
e1562532fe [SAE] Connect to networks with GCMP_256 cipher
Allow connections to WPA3-Personal SAE networks that use
GCMP_256 cipher, not only CCMP.

Bug: 150636703
Test: atest NetworkListStoreDataTest WifiConfigManagerTest WifiConfigurationTest
Test: Manually connect to AP configured as [RSN-SAE-GCMP-256]
Change-Id: I4e0191cd7561e327d9b281a20d54c447024a2351
2020-03-05 14:28:35 -08:00
David Su
6df01e928d MTS: only run FrameworksWifiApiTest if Wifi module is installed
Bug: 150650681
Test: m mts && mts-tradefed run mts-wifi
Change-Id: I3a3baeccfb6b9a385e01553b7eb483aedb55b958
2020-03-05 13:12:39 -08:00
Nate(Qiang) Jiang
758606219f Create different KeyId for saved and suggestion network
Bug: 150500247
Test: atest android.net.wifi
Change-Id: I31ee6f3a3295aca0bd7fcb83ce74327922977797
2020-03-02 16:04:00 -08:00
TreeHugger Robot
4dc071284f Merge "Fix KeyMgmt.OSEN and Eap.UNAUTH_TLS handling" into rvc-dev 2020-03-02 18:09:53 +00:00
TreeHugger Robot
bba804e8f5 Merge "Rename setMeteredOverridePasspoint to setPasspointMeteredOverride" into rvc-dev 2020-02-29 13:07:55 +00:00
Quang Luong
aa06e85a29 Rename setMeteredOverridePasspoint to setPasspointMeteredOverride
Renaming as per Android API Council request.

Bug: 150204647
Test: build
Change-Id: Id6c40eef43ce765fe379af68144d342413d3daa4
2020-02-28 11:04:52 -08:00