Browse Source

qcacld-3.0: Replace typedef hdd_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_stats_t typedef does not
meet any of those criteria, so replace it with a well named struct.

Change-Id: Ie4340278dc449f7d0bd65be726a8d573506e4f1a
CRs-Fixed: 2092843
Jeff Johnson 7 years ago
parent
commit
07f9474753
2 changed files with 13 additions and 4 deletions
  1. 12 3
      core/hdd/inc/wlan_hdd_main.h
  2. 1 1
      core/hdd/src/wlan_hdd_wext.c

+ 12 - 3
core/hdd/inc/wlan_hdd_main.h

@@ -408,7 +408,16 @@ typedef struct hdd_pmf_stats_s {
 } hdd_pmf_stats_t;
 #endif
 
-typedef struct hdd_stats_s {
+/**
+ * struct hdd_stats - per-adapter statistics
+ * @summary_stat: Summary stats reported by firmware
+ * @ClassA_stat: "Class A" stats reported by firmware
+ * @ClassD_stat: "Class D" stats reported by firmware
+ * @per_chain_rssi_stats: Per-chain RSSI stats
+ * @hddTxRxStats: Tx & Rx stats
+ * @hddPmfStats: Protercted Management Frame stats
+ */
+struct hdd_stats {
 	tCsrSummaryStatsInfo summary_stat;
 	tCsrGlobalClassAStatsInfo ClassA_stat;
 	tCsrGlobalClassDStatsInfo ClassD_stat;
@@ -417,7 +426,7 @@ typedef struct hdd_stats_s {
 #ifdef WLAN_FEATURE_11W
 	hdd_pmf_stats_t hddPmfStats;
 #endif
-} hdd_stats_t;
+};
 
 enum hdd_roam_state {
 	HDD_ROAM_STATE_NONE,
@@ -988,7 +997,7 @@ struct hdd_adapter {
 	/**Device TX/RX statistics*/
 	struct net_device_stats stats;
 	/** HDD statistics*/
-	hdd_stats_t hdd_stats;
+	struct hdd_stats hdd_stats;
 
 	/* estimated link speed */
 	uint32_t estimated_linkspeed;

+ 1 - 1
core/hdd/src/wlan_hdd_wext.c

@@ -3899,7 +3899,7 @@ int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed)
 static void hdd_statistics_cb(void *pStats, void *pContext)
 {
 	hdd_adapter_t *pAdapter = (hdd_adapter_t *) pContext;
-	hdd_stats_t *pStatsCache = NULL;
+	struct hdd_stats *pStatsCache = NULL;
 	hdd_wext_state_t *pWextState;
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;