summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-04-21 17:49:31 -0700
committerHai Shalom <haishalom@google.com>2020-04-21 17:49:31 -0700
commit2bdea8391e029b88e8d8fcce0f06205a9e000999 (patch)
tree9e24ab9b8c3015583e803c2d899588f3c99fbcae /service
parent2cdbd0860a83e252ea3b0da27cf4d5d0e86d50d7 (diff)
[SupplicantHal] Check HAL version before setting GCMP_256
Check SupplicantStaNetworkHal v1.2 or higher before passing PairwiseCipher and GroupCipher of GCMP_256 down to the HAL. These bits were added in 1.2, and enabled by default. Causes connection error when running latest framework version with a 1.1 or older HAL. Bug: 153923541 Test: atest SupplicantStaNetworkHalTest Change-Id: I67cb190a627cb64fb799bad30dc4cc461316ee42
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/SupplicantStaNetworkHal.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
index 8571109cd..0507a8867 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
@@ -884,7 +884,7 @@ public class SupplicantStaNetworkHal {
break;
case WifiConfiguration.GroupCipher.GCMP_256:
mask |= android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
- .GroupCipherMask.GCMP_256;
+ .GroupCipherMask.GCMP_256;
break;
case WifiConfiguration.GroupCipher.SMS4:
mask |= android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
@@ -1126,8 +1126,8 @@ public class SupplicantStaNetworkHal {
mask, ISupplicantStaNetwork.GroupCipherMask.CCMP, bitset,
WifiConfiguration.GroupCipher.CCMP);
mask = supplicantMaskValueToWifiConfigurationBitSet(mask,
- android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.GroupCipherMask
- .GCMP_256, bitset, WifiConfiguration.GroupCipher.GCMP_256);
+ android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+ .GroupCipherMask.GCMP_256, bitset, WifiConfiguration.GroupCipher.GCMP_256);
mask = supplicantMaskValueToWifiConfigurationBitSet(
mask, ISupplicantStaNetwork.GroupCipherMask.GTK_NOT_USED, bitset,
WifiConfiguration.GroupCipher.GTK_NOT_USED);
@@ -1432,6 +1432,9 @@ public class SupplicantStaNetworkHal {
* Requires HAL v1.2 or higher */
status = iSupplicantStaNetworkV12.setGroupCipher_1_2(groupCipherMask);
} else {
+ // Clear GCMP_256 group cipher which is not supported before v1.2
+ groupCipherMask &= ~android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+ .GroupCipherMask.GCMP_256;
status = mISupplicantStaNetwork.setGroupCipher(
groupCipherMask);
}
@@ -1516,6 +1519,9 @@ public class SupplicantStaNetworkHal {
* Requires HAL v1.2 or higher */
status = iSupplicantStaNetworkV12.setPairwiseCipher_1_2(pairwiseCipherMask);
} else {
+ // Clear GCMP_256 pairwise cipher which is not supported before v1.2
+ pairwiseCipherMask &= ~android.hardware.wifi.supplicant.V1_2
+ .ISupplicantStaNetwork.PairwiseCipherMask.GCMP_256;
status =
mISupplicantStaNetwork.setPairwiseCipher(pairwiseCipherMask);
}
@@ -1546,7 +1552,6 @@ public class SupplicantStaNetworkHal {
} else {
return false;
}
-
} catch (RemoteException e) {
handleRemoteException(e, methodStr);
return false;