[PATCH 14/16] PR: Clean up session state on PASN auth RX failure

Peddolla Harshavardhan Reddy peddolla.reddy at oss.qualcomm.com
Sun Jul 12 23:30:02 PDT 2026


When pr_pasn_auth_rx() returns an error during PASN frame processing,
the PASN timeout, auth radio work, PD wdev, and ranging params are
left active. This prevents subsequent PR_PASN_START requests from
succeeding and blocks other radio work.

Cancel the PASN timeout, release the auth radio work, stop the PD wdev,
and clear the ranging params when pr_pasn_auth_rx() returns a negative
value.

Fixes: da95d9da51a1 ("PR: Deliver received PR PASN auth frames for processing")
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
 wpa_supplicant/pr_supplicant.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/pr_supplicant.c b/wpa_supplicant/pr_supplicant.c
index bb070a6e7..fabc8061d 100644
--- a/wpa_supplicant/pr_supplicant.c
+++ b/wpa_supplicant/pr_supplicant.c
@@ -1650,6 +1650,7 @@ int wpas_pr_pasn_auth_rx(struct wpa_supplicant *wpa_s,
 			 int freq)
 {
 	struct pr_data *pr = wpa_s->global->pr;
+	int ret;
 
 	if (!pr)
 		return -2;
@@ -1696,7 +1697,16 @@ int wpas_pr_pasn_auth_rx(struct wpa_supplicant *wpa_s,
 		}
 	}
 
-	return pr_pasn_auth_rx(pr, mgmt, len, freq);
+	ret = pr_pasn_auth_rx(pr, mgmt, len, freq);
+
+	if (ret < 0) {
+		eloop_cancel_timeout(wpas_pr_pasn_timeout, wpa_s, NULL);
+		wpas_pr_pasn_auth_work_done(wpa_s);
+		wpas_pr_pd_stop(wpa_s);
+		wpas_pr_clear_ranging_params(wpa_s->global->pr);
+	}
+
+	return ret;
 }
 
 
-- 
2.34.1




More information about the Hostap mailing list