]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Add lockdep warn for RCU
authorRipan Deuri <quic_rdeuri@quicinc.com>
Fri, 24 Oct 2025 18:15:48 +0000 (23:45 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 27 Oct 2025 14:02:02 +0000 (07:02 -0700)
Add RCU_LOCKDEP_WARN() in following functions:

  - ath12k_dp_link_peer_to_link_sta()
  - ath12k_wifi7_dp_rx_h_mpdu()

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20251024181548.3255166-10-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp_peer.c
drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c

index 61478e66d9af557a594d8739012c5cb54faccaec..a06113bedf0d7c88c1e563550a3def8806b987bb 100644 (file)
@@ -182,6 +182,9 @@ struct ath12k_link_sta *ath12k_dp_link_peer_to_link_sta(struct ath12k_base *ab,
        struct ath12k_sta *ahsta;
        struct ath12k_link_sta *arsta;
 
+       RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
+                        "ath12k_dp_link_peer to ath12k_link_sta called without rcu lock");
+
        if (!peer->sta)
                return NULL;
 
index 87875486fb4a19bc992e46591dff4142dbbfc106..d24d0f12742eb0c4010308f5f0d1844939eff625 100644 (file)
@@ -323,6 +323,9 @@ static void ath12k_wifi7_dp_rx_h_mpdu(struct ath12k_pdev_dp *dp_pdev,
        struct ieee80211_rx_status *rx_status = rx_info->rx_status;
        u32 err_bitmap = rx_info->err_bitmap;
 
+       RCU_LOCKDEP_WARN(!rcu_read_lock_held(),
+                        "dp_rx_h_mpdu called without rcu lock");
+
        /* PN for multicast packets will be checked in mac80211 */
        rxcb = ATH12K_SKB_RXCB(msdu);
        rxcb->is_mcbc = rx_info->is_mcbc;