[PATCH v2 1/5] PASN: Return distinct value for auth frame 1 TX failure

Peddolla Harshavardhan Reddy peddolla.reddy at oss.qualcomm.com
Fri Jul 31 02:52:23 PDT 2026


wpa_pasn_auth_tx_status() returned 0 for all non-final auth frames
regardless of whether they were acked or not, making it impossible
for callers to distinguish an unacked auth frame 1 from other cases.
Return 2 when trans_seq is 1 and the frame was not acked so that
callers that want to retransmit can do so unambiguously.

Update p2p_pasn_auth_tx_status() to use the new return value instead
of the previous broad condition that would have matched any unacked
non-final PASN frame.

Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
 src/p2p/p2p.c             | 2 +-
 src/pasn/pasn_initiator.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index e477d6993..ca5ffb7bc 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -7139,7 +7139,7 @@ int p2p_pasn_auth_tx_status(struct p2p_data *p2p, const u8 *data,
 	pasn = dev->pasn;
 
 	ret = wpa_pasn_auth_tx_status(pasn, data, data_len, acked);
-	if (ret != 1 && !acked && pasn->frame)
+	if (ret == 2 && pasn->frame)
 		return pasn->send_mgmt(pasn->cb_ctx, wpabuf_head(pasn->frame),
 				       wpabuf_len(pasn->frame), 0, pasn->freq,
 				       1000);
diff --git a/src/pasn/pasn_initiator.c b/src/pasn/pasn_initiator.c
index 2e58340ce..ff07906d4 100644
--- a/src/pasn/pasn_initiator.c
+++ b/src/pasn/pasn_initiator.c
@@ -1787,5 +1787,8 @@ int wpa_pasn_auth_tx_status(struct pasn_data *pasn,
 		return 1;
 	}
 
+	if (pasn->trans_seq == WLAN_AUTH_TR_SEQ_PASN_AUTH1 && !acked)
+		return 2;
+
 	return 0;
 }
-- 
2.34.1




More information about the Hostap mailing list