From ba1d0cad25bf13d8ebdbf105f67952437ef9030b Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 30 Sep 2017 16:24:31 -0700 Subject: [PATCH] qcacld-3.0: Replace typedef hdd_tx_rx_stats_t The Linux Coding Style enumerates a few special cases where typedefs are useful, but stresses "NEVER EVER use a typedef unless you can clearly match one of those rules." The hdd_tx_rx_stats_t typedef does not meet any of those criteria, so replace references to it with a reference to the underlying struct. Change-Id: Ic3ff995d10e65f949ee069b134d9826583461b1e CRs-Fixed: 2119524 --- core/hdd/inc/wlan_hdd_main.h | 6 +++--- core/hdd/src/wlan_hdd_wext.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index b404ea1b4635..84b943796ab0 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -418,7 +418,7 @@ struct hdd_tx_rx_histogram { uint64_t qtime; }; -typedef struct hdd_tx_rx_stats { +struct hdd_tx_rx_stats { /* start_xmit stats */ __u32 txXmitCalled; __u32 txXmitDropped; @@ -437,7 +437,7 @@ typedef struct hdd_tx_rx_stats { __u32 txflow_pause_cnt; __u32 txflow_unpause_cnt; __u32 txflow_timer_cnt; -} hdd_tx_rx_stats_t; +}; #ifdef WLAN_FEATURE_11W /** @@ -479,7 +479,7 @@ struct hdd_stats { tCsrGlobalClassAStatsInfo ClassA_stat; tCsrGlobalClassDStatsInfo ClassD_stat; struct csr_per_chain_rssi_stats_info per_chain_rssi_stats; - hdd_tx_rx_stats_t hddTxRxStats; + struct hdd_tx_rx_stats hddTxRxStats; struct hdd_arp_stats_s hdd_arp_stats; #ifdef WLAN_FEATURE_11W struct hdd_pmf_stats hddPmfStats; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 6e71c5bfe835..1870b9e49c58 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -3003,7 +3003,7 @@ int hdd_check_private_wext_control(struct hdd_context *hdd_ctx, void hdd_wlan_get_stats(struct hdd_adapter *pAdapter, uint16_t *length, char *buffer, uint16_t buf_len) { - hdd_tx_rx_stats_t *pStats = &pAdapter->hdd_stats.hddTxRxStats; + struct hdd_tx_rx_stats *pStats = &pAdapter->hdd_stats.hddTxRxStats; uint32_t len = 0; uint32_t total_rx_pkt = 0, total_rx_dropped = 0; uint32_t total_rx_delv = 0, total_rx_refused = 0;