]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath12k: Move DP specific link stats to DP link peer
authorHarsh Kumar Bijlani <quic_hbijlani@quicinc.com>
Mon, 3 Nov 2025 11:21:02 +0000 (16:51 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 5 Nov 2025 15:16:54 +0000 (07:16 -0800)
commit35fcf4fa196c9e30012b32a05c65762d5552a712
tree0914bd6f79d21d7992719428c6ecd453a8374ea2
parent775fe5acc18df4de4bad774faa50c88ee65882eb
wifi: ath12k: Move DP specific link stats to DP link peer

As part of peer modularization in the Driver Framework, the station view is as
follows:

            Common Path                      Data Path
    -------------------------------------------------------------------
    ath12k_sta                           ath12k_dp_peer
        |                                       |
        |-> ath12k_link_sta    <---->           |-> ath12k_dp_link_peer
        |                                       |
        |-> ath12k_link_sta    <---->           |-> ath12k_dp_link_peer
        |                                       |
        |-> ath12k_link_sta    <---->           |-> ath12k_dp_link_peer

Currently ath12k_link_sta has data path stats updated in tx_htt and rx monitor
path. Move those stats from ath12_link_sta to ath12k_dp_link_peer to align with
peer modularization model as shown above.

This allows datapath to use only ath12k_dp_link_peer without having to reach out
to other objects for updating stats, thereby improving the cache locality.

Add following API to fetch rate info from DP link peer:

ath12k_dp_link_peer_get_sta_rate_info_stats()

This wrapper API populates link stats in 'struct ath12k_dp_link_peer_rate_info',
which can be extended to support out-of-band retrieval of various rate stats.

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: Harsh Kumar Bijlani <quic_hbijlani@quicinc.com>
Signed-off-by: Ripan Deuri <quic_rdeuri@quicinc.com>
Reviewed-by: Karthikeyan Periyasamy <karthikeyan.periyasamy@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20251103112111.2260639-4-quic_rdeuri@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/debugfs_sta.c
drivers/net/wireless/ath/ath12k/dp_cmn.h
drivers/net/wireless/ath/ath12k/dp_htt.c
drivers/net/wireless/ath/ath12k/dp_mon.c
drivers/net/wireless/ath/ath12k/dp_peer.c
drivers/net/wireless/ath/ath12k/dp_peer.h
drivers/net/wireless/ath/ath12k/hal.h
drivers/net/wireless/ath/ath12k/mac.c
drivers/net/wireless/ath/ath12k/peer.c
drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c