[PATCH 08/92] PASN: Remove an unused variable
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Wed Apr 22 05:22:59 PDT 2026
From: Avraham Stern <avraham.stern at intel.com>
The password variable in the PASN data is never used. Remove it.
Signed-off-by: Avraham Stern <avraham.stern at intel.com>
---
src/ap/ieee802_11.c | 3 +--
src/common/proximity_ranging.c | 2 --
src/p2p/p2p.c | 2 --
src/pasn/pasn_common.c | 8 --------
src/pasn/pasn_common.h | 2 --
src/pasn/pasn_responder.c | 4 +---
6 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index de2702eb14..985423cd53 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3921,8 +3921,7 @@ static void hapd_initialize_pasn(struct hostapd_data *hapd,
pasn_enable_kdk_derivation(pasn);
#endif /* CONFIG_TESTING_OPTIONS */
pasn->use_anti_clogging = use_anti_clogging(hapd);
- pasn_set_password(pasn, sae_get_password(hapd, sta, NULL, 0, NULL,
- &pasn->pt, NULL));
+ sae_get_password(hapd, sta, NULL, 0, NULL, &pasn->pt, NULL);
#ifdef CONFIG_SAE
/* Register a callback so the PASN responder can look up the correct
* SAE PT when the STA's commit frame contains a password identifier
diff --git a/src/common/proximity_ranging.c b/src/common/proximity_ranging.c
index 8d5fb3a4a8..96cb8194dc 100644
--- a/src/common/proximity_ranging.c
+++ b/src/common/proximity_ranging.c
@@ -1679,8 +1679,6 @@ static void pr_pasn_set_password(struct pasn_data *pasn, u8 pasn_type,
pasn->pt = sae_derive_pt(pasn_groups, (const u8 *) PR_PASN_SSID,
os_strlen(PR_PASN_SSID),
(const u8 *) passphrase, len, NULL, 0);
- /* Set passphrase for PASN responder to validate Auth 1 frame */
- pasn->password = passphrase;
}
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index cf0b4236c5..e477d6993c 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -6403,8 +6403,6 @@ static void p2p_pairing_set_password(struct pasn_data *pasn, u8 pasn_type,
pasn->pt = sae_derive_pt(pasn_groups, (const u8 *) P2P_PAIRING_SSID,
os_strlen(P2P_PAIRING_SSID),
(const u8 *) passphrase, len, NULL, 0);
- /* Set passphrase for pairing responder to validate PASN auth 1 frame */
- pasn->password = passphrase;
}
diff --git a/src/pasn/pasn_common.c b/src/pasn/pasn_common.c
index dc6cec1023..ab9e551bb8 100644
--- a/src/pasn/pasn_common.c
+++ b/src/pasn/pasn_common.c
@@ -152,14 +152,6 @@ int pasn_set_pt(struct pasn_data *pasn, struct sae_pt *pt)
}
-void pasn_set_password(struct pasn_data *pasn, const char *password)
-{
- if (!pasn)
- return;
- pasn->password = password;
-}
-
-
void pasn_set_wpa_key_mgmt(struct pasn_data *pasn, int key_mgmt)
{
if (!pasn)
diff --git a/src/pasn/pasn_common.h b/src/pasn/pasn_common.h
index 910cdf5919..d74720eccc 100644
--- a/src/pasn/pasn_common.h
+++ b/src/pasn/pasn_common.h
@@ -64,7 +64,6 @@ struct pasn_data {
#endif /* CONFIG_SAE */
/* Responder */
- const char *password;
int wpa_key_mgmt;
int rsn_pairwise;
u64 rsnxe_capab;
@@ -327,7 +326,6 @@ void pasn_initiator_pmksa_cache_flush(struct rsn_pmksa_cache *pmksa);
/* Responder */
void pasn_set_noauth(struct pasn_data *pasn, bool noauth);
-void pasn_set_password(struct pasn_data *pasn, const char *password);
void pasn_set_wpa_key_mgmt(struct pasn_data *pasn, int key_mgmt);
void pasn_set_rsn_pairwise(struct pasn_data *pasn, int rsn_pairwise);
void pasn_set_rsne(struct pasn_data *pasn, const u8 *rsne);
diff --git a/src/pasn/pasn_responder.c b/src/pasn/pasn_responder.c
index faf57dc6ed..84487c34e7 100644
--- a/src/pasn/pasn_responder.c
+++ b/src/pasn/pasn_responder.c
@@ -187,11 +187,9 @@ static int pasn_wd_handle_sae_commit(struct pasn_data *pasn,
os_free(pasn->dec_pw_id);
pasn->dec_pw_id = dec_pw_id;
pasn->dec_pw_id_len = dec_pw_id_len;
- if (pw)
- pasn_set_password(pasn, pw);
}
- if (!pasn->password || (!pt && !pasn->pt)) {
+ if (!pt && !pasn->pt) {
wpa_printf(MSG_DEBUG, "PASN: No SAE PT found");
return -1;
}
--
2.53.0
More information about the Hostap
mailing list