wifi: ath12k: pack HTT pdev rate stats structs
PATCH 1/1 wifi: ath12k: pack HTT pdev rate stats structs
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_tlvath12k_htt_rx_pdev_rate_stats_tlvath12k_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
--- drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath12k/debugfs_htt_stats.h +3 -3
@@ -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
Quoted 8 lines · 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_tlvath12k_htt_rx_pdev_rate_stats_tlvath12k_htt_rx_pdev_rate_ext_stats_tlv
Quoted 8 lines
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 <[email protected]>
Jeff Johnson
AppliedQuoted 9 lines · 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_tlvath12k_htt_rx_pdev_rate_stats_tlvath12k_htt_rx_pdev_rate_ext_stats_tlv[...]
Applied, thanks!
[1/1] wifi: ath12k: pack HTT pdev rate stats structs
commit: fee9b1f6691120182136edacf590f52d62d9de7f
Best regards,
Signature · 1 line
Jeff Johnson <[email protected]>