Browse Source

qcacld-3.0: Replace typedef tSirWifiChannel

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 tSirWifiChannel typedef does
not meet any of those criteria, so replace it with uint32_t.

Change-Id: I775fc6b79ce6c4ef7dc8b94be127127c51e0d600
CRs-Fixed: 2427170
Jeff Johnson 6 năm trước cách đây
mục cha
commit
5d1e4b8a84
2 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 1 1
      core/hdd/src/wlan_hdd_debugfs_llstat.c
  2. 3 4
      core/mac/inc/sir_api.h

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

@@ -279,7 +279,7 @@ void hdd_debugfs_process_radio_stats(struct hdd_adapter *adapter,
 			ll_stats.len += len;
 			len = scnprintf(buffer,
 				DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,
-				"\nChan width: %d, center_freq: %d, center_freq0: %d, center_freq1: %d, on_time: %d, cca_busy_time: %d",
+				"\nChan width: %u, center_freq: %u, center_freq0: %u, center_freq1: %u, on_time: %u, cca_busy_time: %u",
 				chan_stat->channel.width,
 				chan_stat->channel.centerFreq,
 				chan_stat->channel.centerFreq0,

+ 3 - 4
core/mac/inc/sir_api.h

@@ -3480,7 +3480,6 @@ typedef struct {
 /******************************LINK LAYER Statistics**********************/
 
 typedef int tSirWifiRadio;
-typedef int tSirWifiChannel;
 
 typedef struct {
 	uint32_t reqId;
@@ -3569,11 +3568,11 @@ typedef struct {
 	/* channel width (20, 40, 80, 80+80, 160) */
 	enum phy_ch_width width;
 	/* primary 20 MHz channel */
-	tSirWifiChannel centerFreq;
+	uint32_t centerFreq;
 	/* center frequency (MHz) first segment */
-	tSirWifiChannel centerFreq0;
+	uint32_t centerFreq0;
 	/* center frequency (MHz) second segment */
-	tSirWifiChannel centerFreq1;
+	uint32_t centerFreq1;
 } tSirWifiChannelInfo, *tpSirWifiChannelInfo;
 
 /* wifi rate info */