[PATCH v3 02/11] wifi: ath12k: optimize storage size for struct ath12k
Kang Yang
quic_kangyang at quicinc.com
Tue Oct 15 23:56:51 PDT 2024
Optimize storage size for struct ath12k by clean up bool variables.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Kang Yang <quic_kangyang at quicinc.com>
---
drivers/net/wireless/ath/ath12k/core.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index cbcace4671cb..0c39b37d6a47 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -531,17 +531,16 @@ struct ath12k {
u32 ht_cap_info;
u32 vht_cap_info;
struct ath12k_he ar_he;
- bool supports_6ghz;
struct {
struct completion started;
struct completion completed;
struct completion on_channel;
struct delayed_work timeout;
enum ath12k_scan_state state;
- bool is_roc;
int vdev_id;
int roc_freq;
- bool roc_notify;
+ bool is_roc:1;
+ bool roc_notify:1;
} scan;
struct {
@@ -618,7 +617,6 @@ struct ath12k {
* However there are deviations from this rule. This flag is used to
* avoid reporting garbage data.
*/
- bool ch_info_can_report_survey;
struct survey_info survey[ATH12K_NUM_CHANS];
struct completion bss_survey_done;
@@ -629,7 +627,6 @@ struct ath12k {
struct ath12k_wow wow;
struct completion target_suspend;
- bool target_suspend_ack;
struct ath12k_per_peer_tx_stats peer_tx_stats;
struct list_head ppdu_stats_info;
u32 ppdu_stat_list_depth;
@@ -641,16 +638,19 @@ struct ath12k {
struct ath12k_debug debug;
#endif
- bool dfs_block_radar_events;
- bool monitor_conf_enabled;
- bool monitor_vdev_created;
- bool monitor_started;
int monitor_vdev_id;
u32 freq_low;
u32 freq_high;
- bool nlo_enabled;
+ bool supports_6ghz:1;
+ bool ch_info_can_report_survey:1;
+ bool target_suspend_ack:1;
+ bool dfs_block_radar_events:1;
+ bool monitor_conf_enabled:1;
+ bool monitor_vdev_created:1;
+ bool monitor_started:1;
+ bool nlo_enabled:1;
};
struct ath12k_hw {
--
2.34.1
More information about the ath12k
mailing list