Merge "Aidl: P2P: Add support for EDMG channels"
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index 8ee2033..db46d95 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -2850,8 +2850,9 @@
}
/* Look for the realm of the anonymous identity. */
- realm = strnchr(config->anonymous_identity,
- config->anonymous_identity_len, '@');
+ identity = config->anonymous_identity;
+ identity_len = config->anonymous_identity_len;
+ realm = strnchr(identity, identity_len, '@');
if (NULL != realm) {
wpa_printf(MSG_DEBUG, "Get the realm from anonymous identity.");
*len = identity_len - (realm - identity);
@@ -2859,8 +2860,9 @@
}
/* Look for the realm of the real identity. */
- realm = strnchr(config->imsi_identity,
- config->imsi_identity_len, '@');
+ identity = config->imsi_identity;
+ identity_len = config->imsi_identity_len;
+ realm = strnchr(identity, identity_len, '@');
if (NULL != realm) {
wpa_printf(MSG_DEBUG, "Get the realm from IMSI identity.");
*len = identity_len - (realm - identity);
diff --git a/wpa_supplicant/aidl/sta_network.cpp b/wpa_supplicant/aidl/sta_network.cpp
index fe4a760..4bab592 100644
--- a/wpa_supplicant/aidl/sta_network.cpp
+++ b/wpa_supplicant/aidl/sta_network.cpp
@@ -2160,6 +2160,7 @@
if (key_mgmt_mask & WPA_KEY_MGMT_OWE) {
// Do not allow to connect to Open network when OWE is selected
wpa_ssid->owe_only = 1;
+ wpa_ssid->owe_ptk_workaround = 1;
}
wpa_ssid->key_mgmt = key_mgmt_mask;
wpa_printf(MSG_MSGDUMP, "key_mgmt: 0x%x", wpa_ssid->key_mgmt);
@@ -2488,6 +2489,26 @@
key_mgmt_mask |= WPA_KEY_MGMT_FT_SAE;
}
#endif
+#ifdef CONFIG_FILS
+ if ((key_mgmt_mask & WPA_KEY_MGMT_FILS_SHA256) &&
+ (capa.key_mgmt_iftype[WPA_IF_STATION] &
+ WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA256)) {
+ key_mgmt_mask |= WPA_KEY_MGMT_FT_FILS_SHA256;
+ }
+
+ if ((key_mgmt_mask & WPA_KEY_MGMT_FILS_SHA384) &&
+ (capa.key_mgmt_iftype[WPA_IF_STATION] &
+ WPA_DRIVER_CAPA_KEY_MGMT_FT_FILS_SHA384)) {
+ key_mgmt_mask |= WPA_KEY_MGMT_FT_FILS_SHA384;
+ }
+#endif
+#ifdef CONFIG_SUITEB192
+ if ((key_mgmt_mask & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) &&
+ (capa.key_mgmt_iftype[WPA_IF_STATION] &
+ WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384)) {
+ key_mgmt_mask |= WPA_KEY_MGMT_FT_IEEE8021X_SHA384;
+ }
+#endif
#endif
}
@@ -2512,6 +2533,20 @@
key_mgmt_mask &= ~WPA_KEY_MGMT_FT_SAE;
}
#endif
+#ifdef CONFIG_FILS
+ if (key_mgmt_mask & WPA_KEY_MGMT_FILS_SHA256) {
+ key_mgmt_mask &= ~WPA_KEY_MGMT_FT_FILS_SHA256;
+ }
+
+ if (key_mgmt_mask & WPA_KEY_MGMT_FILS_SHA384) {
+ key_mgmt_mask &= ~WPA_KEY_MGMT_FT_FILS_SHA384;
+ }
+#endif
+#ifdef CONFIG_SUITEB192
+ if (key_mgmt_mask & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) {
+ key_mgmt_mask &= ~WPA_KEY_MGMT_FT_IEEE8021X_SHA384;
+ }
+#endif
#endif
}
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 78efba0..c63f3b2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1908,7 +1908,9 @@
#ifdef CONFIG_DRIVER_NL80211_BRCM
if ((wpa_s->key_mgmt & WPA_KEY_MGMT_CROSS_AKM_ROAM) &&
- IS_CROSS_AKM_ROAM_KEY_MGMT(ssid->key_mgmt)) {
+ IS_CROSS_AKM_ROAM_KEY_MGMT(ssid->key_mgmt) &&
+ (wpa_s->group_cipher == WPA_CIPHER_CCMP) &&
+ (wpa_s->pairwise_cipher == WPA_CIPHER_CCMP)) {
wpa_s->key_mgmt = WPA_KEY_MGMT_SAE | WPA_KEY_MGMT_PSK;
wpa_dbg(wpa_s, MSG_INFO,
"WPA: Updating to KEY_MGMT SAE+PSK for seamless roaming");