Skip to content

Commit 100a995

Browse files
committed
wifi: ath12k: Validate peer_id before searching for peer
JIRA: https://issues.redhat.com/browse/RHEL-114889 commit 136aad1 Author: Sriram R <quic_srirrama@quicinc.com> Date: Mon Jul 14 16:44:38 2025 +0530 wifi: ath12k: Validate peer_id before searching for peer 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@quicinc.com> Signed-off-by: Nagarajan Maran <nagarajan.maran@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250714111438.1134438-1-nagarajan.maran@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 721cb31 commit 100a995

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+3
-0
lines changed

drivers/net/wireless/ath/ath12k/peer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ struct ath12k_peer *ath12k_peer_find_by_id(struct ath12k_base *ab,
100100

101101
lockdep_assert_held(&ab->base_lock);
102102

103+
if (peer_id == HAL_INVALID_PEERID)
104+
return NULL;
105+
103106
if (peer_id & ATH12K_PEER_ML_ID_VALID)
104107
return ath12k_peer_find_by_ml_id(ab, peer_id);
105108

0 commit comments

Comments
 (0)