[PATCH ath-next 0/6] wifi: ath11k: Add single shot/periodic CFR capture support

Yu Zhang(Yuriy) posted 6 patches 1 month, 2 weeks ago
There is a newer version of this series
drivers/net/wireless/ath/ath11k/Kconfig       |  11 +
drivers/net/wireless/ath/ath11k/Makefile      |   1 +
drivers/net/wireless/ath/ath11k/cfr.c         | 991 ++++++++++++++++++
drivers/net/wireless/ath/ath11k/cfr.h         | 301 ++++++
drivers/net/wireless/ath/ath11k/core.c        |  41 +-
drivers/net/wireless/ath/ath11k/core.h        |  19 +-
drivers/net/wireless/ath/ath11k/dbring.c      |  50 +-
drivers/net/wireless/ath/ath11k/dbring.h      |   8 +-
drivers/net/wireless/ath/ath11k/debug.h       |   8 +-
drivers/net/wireless/ath/ath11k/debugfs_sta.c | 143 ++-
drivers/net/wireless/ath/ath11k/hal.c         |   3 +-
drivers/net/wireless/ath/ath11k/hw.h          |   5 +-
drivers/net/wireless/ath/ath11k/mac.c         |  17 +-
drivers/net/wireless/ath/ath11k/wmi.c         | 147 ++-
drivers/net/wireless/ath/ath11k/wmi.h         |  97 +-
15 files changed, 1816 insertions(+), 26 deletions(-)
create mode 100644 drivers/net/wireless/ath/ath11k/cfr.c
create mode 100644 drivers/net/wireless/ath/ath11k/cfr.h
[PATCH ath-next 0/6] wifi: ath11k: Add single shot/periodic CFR capture support
Posted by Yu Zhang(Yuriy) 1 month, 2 weeks ago
To enable/disable cfr feature use command,

echo <val> > /sys/kernel/debug/ieee80211/phyX/ath11k/enable_cfr

where, val: 0 to disable CFR and 1 to enable CFR.

To enable CFR capture for associated peers,

echo "<val> <bw> <periodicity> <method>"
 >
/sys/kernel/debug/ieee80211/phyX/netdev\:wlanx/stations/<mac>/cfr_capture

val: 0 - stop CFR capture
     1 - start CFR capture
bw: CFR capture bandwidth
     0 - 20MHZ
     1 - 40MHZ
     2 - 80MHZ
Periodicity: Periodicity at which hardware is expceted to collect CFR
dump.
     0 - single shot capture.
     non zero - for Periodic captures (value should be multiple of 10
ms)
method: Method used by hardware to collect the CFR dump.
     0 - from the ACKs of QOS NULL packets.

To enable CFR capture for unassociated clients,

echo “<mac address> <val> <periodicity>”
 > /sys/kernel/debug/ieee80211/phyX/ath11k/cfr_unassoc

Mac address: mac address of the client.
Val: 0 - start CFR capture
     1 – stop CFR capture
Periodicity: Periodicity at which hardware is expceted to collect CFR
dump.
     0 - single shot capture.
     non zero - for Periodic captures (value should be multiple of 10
ms)

To collect the cfr dump,
cat /sys/kernel/debug/ieee80211/phy0/ath11k/cfr_capture0 > /tmp/cfr.bin

Previous link:
https://lore.kernel.org/all/1645005922-7252-1-git-send-email-quic_vnaralas@quicinc.com/

Signed-off-by: Yu Zhang(Yuriy) <yu.zhang@oss.qualcomm.com>
---
Venkateswara Naralasetty (6):
  wifi: ath11k: Add initialization and deinitialization sequence for CFR
    module
  wifi: ath11k: Register debugfs for CFR configuration
  wifi: ath11k: Add support unassociated client CFR
  wifi: ath11k: Register relayfs entries for CFR dump
  wifi: ath11k: Register DBR event handler for CFR data
  wifi: ath11k: Register handler for CFR capture event

 drivers/net/wireless/ath/ath11k/Kconfig       |  11 +
 drivers/net/wireless/ath/ath11k/Makefile      |   1 +
 drivers/net/wireless/ath/ath11k/cfr.c         | 991 ++++++++++++++++++
 drivers/net/wireless/ath/ath11k/cfr.h         | 301 ++++++
 drivers/net/wireless/ath/ath11k/core.c        |  41 +-
 drivers/net/wireless/ath/ath11k/core.h        |  19 +-
 drivers/net/wireless/ath/ath11k/dbring.c      |  50 +-
 drivers/net/wireless/ath/ath11k/dbring.h      |   8 +-
 drivers/net/wireless/ath/ath11k/debug.h       |   8 +-
 drivers/net/wireless/ath/ath11k/debugfs_sta.c | 143 ++-
 drivers/net/wireless/ath/ath11k/hal.c         |   3 +-
 drivers/net/wireless/ath/ath11k/hw.h          |   5 +-
 drivers/net/wireless/ath/ath11k/mac.c         |  17 +-
 drivers/net/wireless/ath/ath11k/wmi.c         | 147 ++-
 drivers/net/wireless/ath/ath11k/wmi.h         |  97 +-
 15 files changed, 1816 insertions(+), 26 deletions(-)
 create mode 100644 drivers/net/wireless/ath/ath11k/cfr.c
 create mode 100644 drivers/net/wireless/ath/ath11k/cfr.h


base-commit: 197498315de711140bcc4722fdeb7c1761777100
-- 
2.34.1

Re: [PATCH ath-next 0/6] wifi: ath11k: Add single shot/periodic CFR capture support
Posted by Vasanthakumar Thiagarajan 1 month, 2 weeks ago

On 10/30/2025 10:01 AM, Yu Zhang(Yuriy) wrote:
> To enable/disable cfr feature use command,
> 
> echo <val> > /sys/kernel/debug/ieee80211/phyX/ath11k/enable_cfr
> 
> where, val: 0 to disable CFR and 1 to enable CFR.
> 
> To enable CFR capture for associated peers,
> 
> echo "<val> <bw> <periodicity> <method>"
>   >
> /sys/kernel/debug/ieee80211/phyX/netdev\:wlanx/stations/<mac>/cfr_capture
> 
> val: 0 - stop CFR capture
>       1 - start CFR capture
> bw: CFR capture bandwidth
>       0 - 20MHZ
>       1 - 40MHZ
>       2 - 80MHZ
> Periodicity: Periodicity at which hardware is expceted to collect CFR
> dump.
>       0 - single shot capture.
>       non zero - for Periodic captures (value should be multiple of 10
> ms)
> method: Method used by hardware to collect the CFR dump.
>       0 - from the ACKs of QOS NULL packets.
> 
> To enable CFR capture for unassociated clients,
> 
> echo “<mac address> <val> <periodicity>”
>   > /sys/kernel/debug/ieee80211/phyX/ath11k/cfr_unassoc
> 
> Mac address: mac address of the client.
> Val: 0 - start CFR capture
>       1 – stop CFR capture
> Periodicity: Periodicity at which hardware is expceted to collect CFR
> dump.
>       0 - single shot capture.
>       non zero - for Periodic captures (value should be multiple of 10
> ms)
> 
> To collect the cfr dump,
> cat /sys/kernel/debug/ieee80211/phy0/ath11k/cfr_capture0 > /tmp/cfr.bin
> 
> Previous link:
> https://lore.kernel.org/all/1645005922-7252-1-git-send-email-quic_vnaralas@quicinc.com/
> 
> Signed-off-by: Yu Zhang(Yuriy) <yu.zhang@oss.qualcomm.com>
> ---
> Venkateswara Naralasetty (6):
>    wifi: ath11k: Add initialization and deinitialization sequence for CFR
>      module
>    wifi: ath11k: Register debugfs for CFR configuration
>    wifi: ath11k: Add support unassociated client CFR
>    wifi: ath11k: Register relayfs entries for CFR dump
>    wifi: ath11k: Register DBR event handler for CFR data
>    wifi: ath11k: Register handler for CFR capture event
> 
>   drivers/net/wireless/ath/ath11k/Kconfig       |  11 +
>   drivers/net/wireless/ath/ath11k/Makefile      |   1 +
>   drivers/net/wireless/ath/ath11k/cfr.c         | 991 ++++++++++++++++++
>   drivers/net/wireless/ath/ath11k/cfr.h         | 301 ++++++
>   drivers/net/wireless/ath/ath11k/core.c        |  41 +-
>   drivers/net/wireless/ath/ath11k/core.h        |  19 +-
>   drivers/net/wireless/ath/ath11k/dbring.c      |  50 +-
>   drivers/net/wireless/ath/ath11k/dbring.h      |   8 +-
>   drivers/net/wireless/ath/ath11k/debug.h       |   8 +-
>   drivers/net/wireless/ath/ath11k/debugfs_sta.c | 143 ++-
>   drivers/net/wireless/ath/ath11k/hal.c         |   3 +-
>   drivers/net/wireless/ath/ath11k/hw.h          |   5 +-
>   drivers/net/wireless/ath/ath11k/mac.c         |  17 +-
>   drivers/net/wireless/ath/ath11k/wmi.c         | 147 ++-
>   drivers/net/wireless/ath/ath11k/wmi.h         |  97 +-
>   15 files changed, 1816 insertions(+), 26 deletions(-)
>   create mode 100644 drivers/net/wireless/ath/ath11k/cfr.c
>   create mode 100644 drivers/net/wireless/ath/ath11k/cfr.h
> 

Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>