aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-01-04 00:20:32 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-01-04 00:20:32 +0000
commit56fb8a5a61b4d5405e2034591a638bceb5c74e25 (patch)
treee216f1023808824ac5ad947a7cae09b38ba635c5
parent0c64054d628fdb7468ea06051c3e42c4df2365e6 (diff)
parentc55112f265a524cdebd2f6a283fd33721b5f9723 (diff)
downloadwpa_supplicant_8-android13-qpr2-s8-release.tar.gz
Change-Id: I6353ed0ca4027930056cae2e63567df995ebbe10
-rw-r--r--src/common/ieee802_11_defs.h4
-rw-r--r--src/drivers/driver.h8
-rw-r--r--src/drivers/driver_nl80211.c32
-rw-r--r--wpa_supplicant/events.c12
-rw-r--r--wpa_supplicant/wpa_supplicant.c12
-rw-r--r--wpa_supplicant/wpas_glue.c4
6 files changed, 36 insertions, 36 deletions
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index c341a1d5..32cbaaaf 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -2680,9 +2680,9 @@ enum dscp_policy_request_type {
#define WFA_CAPA_QM_DSCP_POLICY BIT(0)
#define WFA_CAPA_QM_UNSOLIC_DSCP BIT(1)
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
#define WPA_KEY_MGMT_CROSS_AKM_ROAM (WPA_KEY_MGMT_SAE | WPA_KEY_MGMT_PSK)
#define IS_CROSS_AKM_ROAM_KEY_MGMT(key_mgmt) \
((key_mgmt & WPA_KEY_MGMT_CROSS_AKM_ROAM) == WPA_KEY_MGMT_CROSS_AKM_ROAM)
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
#endif /* IEEE802_11_DEFS_H */
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 46cee442..33925622 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1229,12 +1229,12 @@ struct wpa_driver_associate_params {
* 2 = both hunting-and-pecking loop and hash-to-element enabled
*/
int sae_pwe;
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
/**
* td_policy - Transition Disable Policy
*/
u32 td_policy;
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
};
enum hide_ssid {
@@ -2557,9 +2557,9 @@ enum wpa_drv_update_connect_params_mask {
WPA_DRV_UPDATE_ASSOC_IES = BIT(0),
WPA_DRV_UPDATE_FILS_ERP_INFO = BIT(1),
WPA_DRV_UPDATE_AUTH_TYPE = BIT(2),
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
WPA_DRV_UPDATE_TD_POLICY = BIT(3),
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
};
/**
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5892fc1d..6bd88be2 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -199,9 +199,9 @@ static int nl80211_put_mesh_config(struct nl_msg *msg,
#endif /* CONFIG_MESH */
static int i802_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
u16 reason);
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
static int nl80211_set_td_policy(void *priv, u32 td_policy);
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
/* Converts nl80211_chan_width to a common format */
enum chan_width convert2width(int width)
@@ -3245,7 +3245,7 @@ fail:
}
#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
static int wpa_cross_akm_key_mgmt_to_suites(unsigned int key_mgmt_suites, u32 suites[],
int max_suites)
{
@@ -3261,7 +3261,7 @@ static int wpa_cross_akm_key_mgmt_to_suites(unsigned int key_mgmt_suites, u32 su
return num_suites;
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
#ifdef CONFIG_DRIVER_NL80211_QCA
static int issue_key_mgmt_set_key(struct wpa_driver_nl80211_data *drv,
@@ -6435,7 +6435,7 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
return -1;
}
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
if (IS_CROSS_AKM_ROAM_KEY_MGMT(params->key_mgmt_suite)) {
int num_suites;
u32 suites[NL80211_MAX_NR_AKM_SUITES];
@@ -6450,7 +6450,7 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
return -1;
}
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
if (params->req_handshake_offload &&
(drv->capa.flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_8021X)) {
wpa_printf(MSG_DEBUG, " * WANT_1X_4WAY_HS");
@@ -6514,11 +6514,11 @@ static int nl80211_connect_common(struct wpa_driver_nl80211_data *drv,
return -1;
if ((
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
(params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
#else
params->key_mgmt_suite == WPA_KEY_MGMT_SAE ||
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE) &&
(!(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) &&
nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT))
@@ -6570,11 +6570,11 @@ static int wpa_driver_nl80211_try_connect(
#ifdef CONFIG_SAE
if ((
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
(params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
#else
params->key_mgmt_suite == WPA_KEY_MGMT_SAE ||
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE) &&
nl80211_put_sae_pwe(msg, params->sae_pwe) < 0)
goto fail;
@@ -6684,11 +6684,11 @@ static int wpa_driver_nl80211_associate(
if (wpa_driver_nl80211_set_mode(priv, nlmode) < 0)
return -1;
if (
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
(params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
#else
params->key_mgmt_suite == WPA_KEY_MGMT_SAE ||
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE)
bss->use_nl_connect = 1;
else
@@ -12194,7 +12194,7 @@ static int nl80211_update_connection_params(
return 0;
/* Handle any connection param update here which might receive kernel handling in future */
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
if (mask & WPA_DRV_UPDATE_TD_POLICY) {
ret = nl80211_set_td_policy(priv, params->td_policy);
if (ret) {
@@ -12204,7 +12204,7 @@ static int nl80211_update_connection_params(
}
return ret;
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
msg = nl80211_drv_msg(drv, 0, NL80211_CMD_UPDATE_CONNECT_PARAMS);
if (!msg)
@@ -12359,7 +12359,7 @@ static int nl80211_dpp_listen(void *priv, bool enable)
}
#endif /* CONFIG_DPP */
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
static int nl80211_set_td_policy(void *priv, u32 td_policy)
{
struct i802_bss *bss = priv;
@@ -12388,7 +12388,7 @@ static int nl80211_set_td_policy(void *priv, u32 td_policy)
return ret;
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
#ifdef CONFIG_TESTING_OPTIONS
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 7234de45..266de4c5 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1365,9 +1365,9 @@ static bool wpa_scan_res_ok(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
if ((wpa_s->conf->sae_pwe == 1 || is_6ghz_freq(bss->freq) ||
ssid->sae_password_id) &&
wpa_s->conf->sae_pwe != 3 && wpa_key_mgmt_sae(ssid->key_mgmt) &&
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
!(wpa_key_mgmt_wpa_psk_no_sae(ssid->key_mgmt)) &&
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
!(rsnxe_capa & BIT(WLAN_RSNX_CAPAB_SAE_H2E))) {
if (debug_print)
wpa_dbg(wpa_s, MSG_DEBUG,
@@ -2942,9 +2942,9 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
const u8 *p;
u8 bssid[ETH_ALEN];
bool bssid_known;
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
struct wpa_ie_data ie;
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
wpa_dbg(wpa_s, MSG_DEBUG, "Association info event");
bssid_known = wpa_drv_get_bssid(wpa_s, bssid) == 0;
@@ -3071,7 +3071,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
if (!found_x && data->assoc_info.req_ies)
wpa_sm_set_assoc_rsnxe(wpa_s->wpa, NULL, 0);
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
/* The WPA/RSN IE has been updated at this point. Since the Firmware could have roamed
* to a different security type, update the current supplicant configuration to use the AKM
* and pairwise suites from the assoc IE passed by the driver.
@@ -3115,7 +3115,7 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
// TODO: Notify the framework about security type change b/230766005
}
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
#ifdef CONFIG_FILS
#ifdef CONFIG_SME
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 05766b5b..f871b9ea 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1905,7 +1905,7 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_DENY_PTK0_REKEY, 0);
}
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
if ((wpa_s->key_mgmt & WPA_KEY_MGMT_CROSS_AKM_ROAM) &&
IS_CROSS_AKM_ROAM_KEY_MGMT(ssid->key_mgmt) &&
(wpa_s->group_cipher == WPA_CIPHER_CCMP) &&
@@ -1915,7 +1915,7 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
wpa_dbg(wpa_s, MSG_INFO,
"WPA: Updating to KEY_MGMT SAE+PSK for seamless roaming");
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
return 0;
}
@@ -3934,11 +3934,11 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_4WAY_HANDSHAKE_PSK) &&
(
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
(params.key_mgmt_suite & WPA_KEY_MGMT_PSK) ||
#else
params.key_mgmt_suite == WPA_KEY_MGMT_PSK ||
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
params.key_mgmt_suite == WPA_KEY_MGMT_FT_PSK)) {
params.passphrase = ssid->passphrase;
if (ssid->psk_set)
@@ -3964,11 +3964,11 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
params.req_key_mgmt_offload = 1;
if ((
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
(params.key_mgmt_suite & WPA_KEY_MGMT_PSK) ||
#else
params.key_mgmt_suite == WPA_KEY_MGMT_PSK ||
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
params.key_mgmt_suite == WPA_KEY_MGMT_PSK_SHA256 ||
params.key_mgmt_suite == WPA_KEY_MGMT_FT_PSK) &&
ssid->psk_set)
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index c2bd45f2..68236da5 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -1374,7 +1374,7 @@ static void wpa_supplicant_transition_disable(void *_wpa_s, u8 bitmap)
changed = 1;
}
-#ifdef CONFIG_DRIVER_NL80211_BRCM
+#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
/* driver call for transition disable */
{
struct wpa_driver_associate_params params;
@@ -1383,7 +1383,7 @@ static void wpa_supplicant_transition_disable(void *_wpa_s, u8 bitmap)
params.td_policy = bitmap;
wpa_drv_update_connect_params(wpa_s, &params, WPA_DRV_UPDATE_TD_POLICY);
}
-#endif /* CONFIG_DRIVER_NL80211_BRCM */
+#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
wpas_notify_transition_disable(wpa_s, ssid, bitmap);