Do not auto-downgrade WPA3->Transition mode if password too short
Hotspot security is auto-downgraded from WPA3->Transition mode if the band is changed from 6Ghz -> 2.4/5GHz. However, Transition mode requires a password of 8 chars or more, but WPA3 SAE does not. Avoid changing the security type if the current password is less than 8 chars. Flag: EXEMPT minor bugfix Bug: 366452667 Test: atest WifiHotspotRepositoryTest Change-Id: I1abadd59966e170b51899782746b9f14e33e6186
This commit is contained in:
committed by
Quang Luong
parent
a4b2757458
commit
5aa95553cd
@@ -356,10 +356,11 @@ public class WifiHotspotRepository {
|
||||
log("setSpeedType(), setBand(BAND_2GHZ)");
|
||||
configBuilder.setBand(BAND_2GHZ);
|
||||
}
|
||||
// Set the security type back to WPA2/WPA3 if we're moving from 6GHz to something else.
|
||||
if ((config.getBand() & BAND_6GHZ) != 0) {
|
||||
configBuilder.setPassphrase(
|
||||
generatePassword(config), SECURITY_TYPE_WPA3_SAE_TRANSITION);
|
||||
// Set the security type back to WPA2/WPA3 if the password is at least 8 characters and
|
||||
// we're moving from 6GHz to something else.
|
||||
String passphrase = generatePassword(config);
|
||||
if ((passphrase.length() >= 8) && (config.getBand() & BAND_6GHZ) != 0) {
|
||||
configBuilder.setPassphrase(passphrase, SECURITY_TYPE_WPA3_SAE_TRANSITION);
|
||||
}
|
||||
}
|
||||
setSoftApConfiguration(configBuilder.build());
|
||||
|
Reference in New Issue
Block a user