[PATCH ath12k-ng 0/9] wifi: ath12k: Modularization of peer object

Ripan Deuri quic_rdeuri at quicinc.com
Fri Oct 24 11:15:39 PDT 2025


struct ath12k_sta has an array of struct ath12k_link_sta wherein each index
represents one link of the connected station.

For each ath12k_link_sta, there is a corresponding data path peer which is
represented by struct ath12k_peer.

Diagrammatic view of the station is a below:

        ath12k_sta
            |
            |-> ath12k_link_sta <--> ath12k_peer
            |
            |-> ath12k_link_sta <--> ath12k_peer
            |
            |-> ath12k_link_sta <--> ath12k_peer

Currently, in control path, ath12k_link_sta and ath12k_peer are used
interchangeably, while the data path makes use of ath12k_peer only.

With ath12k next-generation driver framework, in order to have a clean
segregation between control and data path, the plan is to use ath12k_link_sta
only for control path operations.

Station view for the data path is revamped as below:

        ath12k_dp_peer
               |
               |-> ath12k_dp_link_peer
               |
               |-> ath12k_dp_link_peer
               |
               |-> ath12k_dp_link_peer

where:
ath12k_dp_peer is newly introduced structure and represents the data path
version of corresponding ath12k_sta.

This ath12k_dp_peer contains the fields used in the per packet Tx Rx paths
applicable across all the links and maintains an array of ath12k_dp_link_peer.
Per packet Tx and Rx path operates on ath12k_dp_peer. This ath12k_dp_peer is a
standalone new object and has back pointer reference to ieee80211_sta.

ath12k_peer has been renamed to ath12k_dp_link_peer and the fields which
are common across all the links are moved to ath12k_dp_peer. ath12k_dp_link_peer
contains the fields specific to a link and these are mostly for statistics and
monitor usage.

Final view of station is shown below:

            Control 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

To achieve this, following set of changes are done in this patch series:
1. Refactor functions present in file peer.c in such a way to retain functions
   operating on ath12k_link_sta in peer.c and move functions operating on
   ath12k_peer to dp_peer.c
2. Rename ath12k_peer to ath12k_dp_link_peer and change find APIs
   correspondingly
3. Add hash table for ath12k_link_sta in ath12k_base
4. Move peer linked list from ath12k_base to ath12k_dp
5. Add hash table for ath12k_dp_link_peer in ath12k_dp
6. Define ath12k_dp_peer structure and APIs for creation and deletion
7. APIs for assign and unassignment of ath12k_dp_link_peer to ath12k_dp_peer
8. Use ath12k_dp_peer in per packet Tx and Rx path
---
Harsh Kumar Bijlani (8):
  wifi: ath12k: Move DP related functions from peer.c to dp_peer.c file
  wifi: ath12k: Rename ath12k_peer to ath12k_dp_link_peer
  wifi: ath12k: Add hash table for ath12k_link_sta in ath12k_base
  wifi: ath12k: Move ath12k_dp_link_peer list from ath12k_base to
    ath12k_dp
  wifi: ath12k: Add hash table for ath12k_dp_link_peer
  wifi: ath12k: Define ath12k_dp_peer structure & APIs for create &
    delete
  wifi: ath12k: Attach and detach ath12k_dp_link_peer to ath12k_dp_peer
  wifi: ath12k: Use ath12k_dp_peer in per packet Tx & Rx paths

Ripan Deuri (1):
  wifi: ath12k: Add lockdep warn for RCU

 drivers/net/wireless/ath/ath12k/Makefile      |   1 +
 drivers/net/wireless/ath/ath12k/core.c        |  12 +-
 drivers/net/wireless/ath/ath12k/core.h        |  17 +-
 drivers/net/wireless/ath/ath12k/dp.c          |  48 +-
 drivers/net/wireless/ath/ath12k/dp.h          |  17 +-
 drivers/net/wireless/ath/ath12k/dp_cmn.h      |  28 +-
 drivers/net/wireless/ath/ath12k/dp_htt.c      |  44 +-
 drivers/net/wireless/ath/ath12k/dp_mon.c      |  30 +-
 drivers/net/wireless/ath/ath12k/dp_peer.c     | 627 ++++++++++++++++++
 drivers/net/wireless/ath/ath12k/dp_peer.h     | 125 ++++
 drivers/net/wireless/ath/ath12k/dp_rx.c       | 151 +++--
 drivers/net/wireless/ath/ath12k/dp_rx.h       |  19 +-
 drivers/net/wireless/ath/ath12k/mac.c         | 381 ++++++++---
 drivers/net/wireless/ath/ath12k/mac.h         |   1 +
 drivers/net/wireless/ath/ath12k/peer.c        | 439 +++++-------
 drivers/net/wireless/ath/ath12k/peer.h        | 112 +---
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c |  47 +-
 drivers/net/wireless/ath/ath12k/wifi7/dp_rx.h |   6 +-
 drivers/net/wireless/ath/ath12k/wifi7/dp_tx.c |  24 +-
 .../net/wireless/ath/ath12k/wifi7/hal_rx.c    |   5 +-
 .../net/wireless/ath/ath12k/wifi7/hal_rx.h    |   1 +
 drivers/net/wireless/ath/ath12k/wifi7/hw.c    |  19 +-
 drivers/net/wireless/ath/ath12k/wmi.c         |  14 +-
 23 files changed, 1504 insertions(+), 664 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath12k/dp_peer.c
 create mode 100644 drivers/net/wireless/ath/ath12k/dp_peer.h


base-commit: 25122460e7f96864a80b59ffe6c953911516d3b3
-- 
2.34.1




More information about the ath12k mailing list