]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: Add Support to Parse TPC Event from Firmware
authorSowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
Thu, 30 Jan 2025 06:11:03 +0000 (11:41 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 4 Feb 2025 01:07:32 +0000 (17:07 -0800)
commitf0c3bb78e42f2f67403b2314486e42f40737b15c
treeeafd491ac52e1fe953bf7a501553887cca10b4bb
parent7a3e8eec8d183d7b293bfb69caab9f213e0a6bbd
wifi: ath12k: Add Support to Parse TPC Event from Firmware

Host receives four Transmit Power Control(TPC) events from firmware on
sending TPC request. Fixed param TLV is present as part of all event to
indicate the event count and end of event. TPC config parameters along
with regulatory power array comes as first event. Rates array comes as
second and third event as it cannot be packed in single event.
Conformance Test Limit (CTL) power array comes as the fourth event.
Firmware packs different sets of array params which includes array
length and type inside master TLV as different subtlvs. And the actual
content of array is packed one after the other inside a separate TLV as
single buffer.

Parse various events and save it in local structures. Create tpc_stats
file using debugfs to store these local structures. Create function to
handle TPC stats read to relay the information to the user.

Command usage:
cat > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/tpc_stats

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sowmiya Sree Elavalagan <quic_ssreeela@quicinc.com>
Co-developed-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Signed-off-by: Ramya Gnanasekar <quic_rgnanase@quicinc.com>
Co-developed-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
Signed-off-by: Roopni Devanathan <quic_rdevanat@quicinc.com>
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250130061104.962124-2-quic_rdevanat@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.c
drivers/net/wireless/ath/ath12k/debugfs.h
drivers/net/wireless/ath/ath12k/wmi.c
drivers/net/wireless/ath/ath12k/wmi.h