qcacld-3.0: Replace typedef tSirWifiChannelInfo

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 tSirWifiChannelInfo typedef
does not meet any of those criteria, so replace it (and the "tp"
variant) with a properly named struct.

In addition the Linux Coding Style frowns upon mixed-case names so
rename the members which are currently not compliant.

Change-Id: I2c0647cc48d0ed805974dd9ea399ca742aabc17f
CRs-Fixed: 2427171
This commit is contained in:
Jeff Johnson
2019-03-30 08:34:14 -07:00
zatwierdzone przez nshrivas
rodzic 5d1e4b8a84
commit 17ba70aefb
3 zmienionych plików z 19 dodań i 17 usunięć

Wyświetl plik

@@ -281,9 +281,9 @@ void hdd_debugfs_process_radio_stats(struct hdd_adapter *adapter,
DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len, DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,
"\nChan width: %u, center_freq: %u, center_freq0: %u, center_freq1: %u, on_time: %u, cca_busy_time: %u", "\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.width,
chan_stat->channel.centerFreq, chan_stat->channel.center_freq,
chan_stat->channel.centerFreq0, chan_stat->channel.center_freq0,
chan_stat->channel.centerFreq1, chan_stat->channel.center_freq1,
chan_stat->onTime, chan_stat->ccaBusyTime); chan_stat->onTime, chan_stat->ccaBusyTime);
} }

Wyświetl plik

@@ -813,13 +813,13 @@ static int hdd_llstats_radio_fill_channels(struct hdd_adapter *adapter,
channel_stats->channel.width) || channel_stats->channel.width) ||
nla_put_u32(vendor_event, nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ, QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ,
channel_stats->channel.centerFreq) || channel_stats->channel.center_freq) ||
nla_put_u32(vendor_event, nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ0, QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ0,
channel_stats->channel.centerFreq0) || channel_stats->channel.center_freq0) ||
nla_put_u32(vendor_event, nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ1, QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_INFO_CENTER_FREQ1,
channel_stats->channel.centerFreq1) || channel_stats->channel.center_freq1) ||
nla_put_u32(vendor_event, nla_put_u32(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_ON_TIME, QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_ON_TIME,
channel_stats->onTime) || channel_stats->onTime) ||

Wyświetl plik

@@ -3563,17 +3563,19 @@ struct wifi_interface_info {
uint8_t countryStr[CFG_COUNTRY_CODE_LEN]; uint8_t countryStr[CFG_COUNTRY_CODE_LEN];
}; };
/* channel information */ /**
typedef struct { * struct wifi_channel_info - channel information
/* channel width (20, 40, 80, 80+80, 160) */ * @width: channel width (20, 40, 80, 80+80, 160)
* @center_freq: primary 20 MHz channel
* @center_freq0: center frequency (MHz) first segment
* @center_freq1: center frequency (MHz) second segment
*/
struct wifi_channel_info {
enum phy_ch_width width; enum phy_ch_width width;
/* primary 20 MHz channel */ uint32_t center_freq;
uint32_t centerFreq; uint32_t center_freq0;
/* center frequency (MHz) first segment */ uint32_t center_freq1;
uint32_t centerFreq0; };
/* center frequency (MHz) second segment */
uint32_t centerFreq1;
} tSirWifiChannelInfo, *tpSirWifiChannelInfo;
/* wifi rate info */ /* wifi rate info */
typedef struct { typedef struct {
@@ -3595,7 +3597,7 @@ typedef struct {
/* channel statistics */ /* channel statistics */
typedef struct { typedef struct {
/* channel */ /* channel */
tSirWifiChannelInfo channel; struct wifi_channel_info channel;
/* msecs the radio is awake (32 bits number accruing over time) */ /* msecs the radio is awake (32 bits number accruing over time) */
uint32_t onTime; uint32_t onTime;
/* msecs the CCA register is busy (32 bits number accruing over time) */ /* msecs the CCA register is busy (32 bits number accruing over time) */