* [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs
@ 2025-07-02 21:29 Jeff Johnson
2025-07-08 3:58 ` Vasanthakumar Thiagarajan
2025-07-10 14:36 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Jeff Johnson @ 2025-07-02 21:29 UTC (permalink / raw)
To: Jeff Johnson, Aditya Kumar Singh, Lingbo Kong
Cc: linux-wireless, ath12k, linux-kernel, Jeff Johnson
In order to ensure the HTT DebugFS structs shared with firmware have
matching alignment, the structs should be packed. Most of the structs
are correctly packed, however the following are not:
ath12k_htt_tx_pdev_rate_stats_tlv
ath12k_htt_rx_pdev_rate_stats_tlv
ath12k_htt_rx_pdev_rate_ext_stats_tlv
So pack those structs.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: ba42b22aa336 ("wifi: ath12k: Dump PDEV transmit rate HTT stats")
Fixes: a24cd7583003 ("wifi: ath12k: Dump PDEV receive rate HTT stats")
Fixes: 7a3e8eec8d18 ("wifi: ath12k: Dump additional PDEV receive rate HTT stats")
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
index 13fbfb069ead4062487e40bfb17ef0f423f33b3f..9bd3a632b002d02db6c1f7fb173635b6119cc62c 100644
--- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
+++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h
@@ -490,7 +490,7 @@ struct ath12k_htt_tx_pdev_rate_stats_tlv {
[ATH12K_HTT_TX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
__le32 tx_mcs_ext_2[ATH12K_HTT_TX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
__le32 tx_bw_320mhz;
-};
+} __packed;
struct ath12k_htt_tx_histogram_stats_tlv {
__le32 rate_retry_mcs_drop_cnt;
@@ -579,7 +579,7 @@ struct ath12k_htt_rx_pdev_rate_stats_tlv {
__le32 rx_ulofdma_non_data_nusers[ATH12K_HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
__le32 rx_ulofdma_data_nusers[ATH12K_HTT_RX_PDEV_MAX_OFDMA_NUM_USER];
__le32 rx_mcs_ext[ATH12K_HTT_RX_PDEV_STATS_NUM_EXTRA_MCS_COUNTERS];
-};
+} __packed;
#define ATH12K_HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS 4
#define ATH12K_HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT 14
@@ -609,7 +609,7 @@ struct ath12k_htt_rx_pdev_rate_ext_stats_tlv {
__le32 rx_gi_ext_2[ATH12K_HTT_RX_PDEV_STATS_NUM_GI_COUNTERS]
[ATH12K_HTT_RX_PDEV_STATS_NUM_EXTRA2_MCS_COUNTERS];
__le32 rx_su_punctured_mode[ATH12K_HTT_RX_PDEV_STATS_NUM_PUNCTURED_MODE_COUNTERS];
-};
+} __packed;
#define ATH12K_HTT_TX_PDEV_STATS_SCHED_PER_TXQ_MAC_ID GENMASK(7, 0)
#define ATH12K_HTT_TX_PDEV_STATS_SCHED_PER_TXQ_ID GENMASK(15, 8)
---
base-commit: 0339e1433e228fbbbb106d9284dcc8b35ae6c4e6
change-id: 20250630-debugfs_htt_packed-fd4a079785c3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs
2025-07-02 21:29 [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs Jeff Johnson
@ 2025-07-08 3:58 ` Vasanthakumar Thiagarajan
2025-07-10 14:36 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2025-07-08 3:58 UTC (permalink / raw)
To: Jeff Johnson, Jeff Johnson, Aditya Kumar Singh, Lingbo Kong
Cc: linux-wireless, ath12k, linux-kernel
On 7/3/2025 2:59 AM, Jeff Johnson wrote:
> In order to ensure the HTT DebugFS structs shared with firmware have
> matching alignment, the structs should be packed. Most of the structs
> are correctly packed, however the following are not:
>
> ath12k_htt_tx_pdev_rate_stats_tlv
> ath12k_htt_rx_pdev_rate_stats_tlv
> ath12k_htt_rx_pdev_rate_ext_stats_tlv
>
> So pack those structs.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Fixes: ba42b22aa336 ("wifi: ath12k: Dump PDEV transmit rate HTT stats")
> Fixes: a24cd7583003 ("wifi: ath12k: Dump PDEV receive rate HTT stats")
> Fixes: 7a3e8eec8d18 ("wifi: ath12k: Dump additional PDEV receive rate HTT stats")
> Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs
2025-07-02 21:29 [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs Jeff Johnson
2025-07-08 3:58 ` Vasanthakumar Thiagarajan
@ 2025-07-10 14:36 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2025-07-10 14:36 UTC (permalink / raw)
To: Jeff Johnson, Aditya Kumar Singh, Lingbo Kong, Jeff Johnson
Cc: linux-wireless, ath12k, linux-kernel
On Wed, 02 Jul 2025 14:29:12 -0700, Jeff Johnson wrote:
> In order to ensure the HTT DebugFS structs shared with firmware have
> matching alignment, the structs should be packed. Most of the structs
> are correctly packed, however the following are not:
>
> ath12k_htt_tx_pdev_rate_stats_tlv
> ath12k_htt_rx_pdev_rate_stats_tlv
> ath12k_htt_rx_pdev_rate_ext_stats_tlv
>
> [...]
Applied, thanks!
[1/1] wifi: ath12k: pack HTT pdev rate stats structs
commit: fee9b1f6691120182136edacf590f52d62d9de7f
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-10 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 21:29 [PATCH ath-next] wifi: ath12k: pack HTT pdev rate stats structs Jeff Johnson
2025-07-08 3:58 ` Vasanthakumar Thiagarajan
2025-07-10 14:36 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).