Bug 219715

Summary: ath12k: Driver supplies incorrect/incomplete bitrates
Product: Drivers Reporter: MHartman (mjhartman42)
Component: network-wirelessAssignee: Jeff Johnson (jeff.johnson)
Status: RESOLVED CODE_FIX    
Severity: normal CC: jeff.johnson
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:

Description MHartman 2025-01-22 21:21:55 UTC
When running "iw dev <ath12k_device> station dump" the ath12k driver reports (via NL80211_STA_INFO_RX_BITRATE | TX_BITRATE) no tx_bitrate info, and always an rx_bitrate of 6Mbps, despite passing traffic at 11be rates.

Driver and kernel are self-compiled from ath12k repo master branch, no patches.  Observed this problem for several months, consistently reproducible, last observed at tag 'ath-pending-202412111922'.  Devices are Intel NUC-like derivatives running Ubuntu 24.04 in shielded WiFi testbed where accurate device rate reporting is critical.

Details:
Linux sdev-14 6.13.0-rc6-wt-ath+ #3 SMP PREEMPT_DYNAMIC Thu Jan 16 19:16:29 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

01:00.0 "Network controller [0280]" "Qualcomm Technologies, Inc [17cb]" "WCN785x Wi-Fi 7(802.11be) 320MHz 2x2 [FastConnect 7800] [1107]" -r01 -p00 "Quectel Wireless Solutions Co., Ltd. [1eac]" "Device [8000]"

73056f1d2aff886ce9bff313f455e963  /lib/firmware/ath12k/WCN7850/hw2.0/m3.bin
d0ee61498bf1a205147cdbcf645391e7  /lib/firmware/ath12k/WCN7850/hw2.0/Notice.txt
ec6dfe7a067a3f4d067b811bd86cc853  /lib/firmware/ath12k/WCN7850/hw2.0/board-2.bin
d3750b67b1013fe82358d0538fb131b0  /lib/firmware/ath12k/WCN7850/hw2.0/amss.bin

[    5.298744] ath12k_pci 0000:01:00.0: BAR 0 [mem 0x81000000-0x811fffff 64bit]: assigned
[    5.298770] ath12k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[    5.299044] ath12k_pci 0000:01:00.0: MSI vectors: 16
[    5.299052] ath12k_pci 0000:01:00.0: Hardware name: wcn7850 hw2.0
[    5.870794] ath12k_pci 0000:01:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size
[    5.882913] ath12k_pci 0000:01:00.0: chip_id 0x2 chip_family 0x4 board_id 0xff soc_id 0x40170200
[    5.882923] ath12k_pci 0000:01:00.0: fw_version 0x100301e1 fw_build_timestamp 2023-12-06 04:05 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3[    6.111622] ath12k_pci 0000:01:00.0 wlp1s0: renamed from wlan0

$ iw dev wlp1s0 station dump
Station 0c:7f:b2:b2:0b:70 (on wlp1s0)
	inactive time:	0 ms
	rx bytes:	1517050
	rx packets:	15542
	tx bytes:	714520957
	tx packets:	465840
	tx retries:	165
	tx failed:	0
	beacon loss:	0
	beacon rx:	400
	rx drop misc:	14
	signal:  	0 dBm
	beacon signal avg:	-37 dBm
	tx duration:	0 us
	rx bitrate:	6.0 MBit/s       <-- bad rx bitrate, no tx bitrate
	rx duration:	0 us
	authorized:	yes
	authenticated:	yes
	associated:	yes
	preamble:	long
	WMM/WME:	yes
	MFP:		yes
	TDLS peer:	no
	DTIM period:	3
	beacon interval:100
	short slot time:yes
	connected time:	42 seconds
	associated at [boottime]:	68.795s
	associated at:	1737402321033 ms
	current time:	1737402362861 ms
Comment 1 Jeff Johnson 2025-01-22 22:08:21 UTC
Can you try the patch that is under review:

https://lore.kernel.org/linux-wireless/20250115063537.35797-1-quic_lingbok@quicinc.com/
Comment 2 MHartman 2025-01-23 19:21:20 UTC
Thumbs up!  Tested patch, and it corrects this issue.  

$ iw dev wlp1s0 station dump
Station 0c:7f:b2:b2:0b:70 (on wlp1s0)
	inactive time:	4621 ms
	rx bytes:	11436357
	rx packets:	127119
	tx bytes:	2866427868
	tx packets:	1868662
	tx retries:	173
	tx failed:	0
	beacon loss:	0
	beacon rx:	1168
	rx drop misc:	16
	signal:  	-38 dBm
	beacon signal avg:	-37 dBm
==>	tx bitrate:	2882.3 MBit/s 160MHz EHT-MCS 13 EHT-NSS 2 EHT-GI 0
	tx duration:	0 us
==>	rx bitrate:	2593.5 MBit/s 160MHz EHT-MCS 12 EHT-NSS 2 EHT-GI 0
	rx duration:	0 us
	authorized:	yes
	authenticated:	yes
	associated:	yes
	preamble:	long
	WMM/WME:	yes
	MFP:		yes
	TDLS peer:	no
	DTIM period:	3
	beacon interval:100
	short slot time:yes
	connected time:	125 seconds
	associated at [boottime]:	87.894s
	associated at:	1737649716396 ms
	current time:	1737649838969 ms
Comment 3 MHartman 2025-01-31 16:25:25 UTC
Confirmed fixed in ath-202501270256