[PATCH ath-next] wifi: ath12k: Validate peer_id before searching for peer
Nagarajan Maran
nagarajan.maran at oss.qualcomm.com
Fri Jul 11 05:54:54 PDT 2025
From: Sriram R <quic_srirrama at quicinc.com>
In RX WBM error path, error packet is received with invalid
peer_id (0x3FFF) as there is no peer associated with that packet.
However, this invalid peer_id coincides with the ML peer_id valid
bit mask, causing an unnecessary search in the ML peer list.
Prevent searching the peer list for invalid peer_id and return NULL.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Signed-off-by: Sriram R <quic_srirrama at quicinc.com>
Signed-off-by: Nagarajan Maran <nmaran at qti.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/peer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/peer.c b/drivers/net/wireless/ath/ath12k/peer.c
index ec7236bbccc0..1a098cb22933 100644
--- a/drivers/net/wireless/ath/ath12k/peer.c
+++ b/drivers/net/wireless/ath/ath12k/peer.c
@@ -100,6 +100,9 @@ struct ath12k_peer *ath12k_peer_find_by_id(struct ath12k_base *ab,
lockdep_assert_held(&ab->base_lock);
+ if (peer_id == HAL_INVALID_PEERID)
+ return NULL;
+
if (peer_id & ATH12K_PEER_ML_ID_VALID)
return ath12k_peer_find_by_ml_id(ab, peer_id);
base-commit: 3a6df1678acc3687d49ce94e23df7b6a289f27f9
--
2.34.1
More information about the ath12k
mailing list