qcacld-3.0: Replace NL80211_BAND_2GHZ with HDD_NL80211_BAND_2GHZ

warning: implicit conversion from enumeration type 'enum
nl80211_band' to different enumeration type 'enum ieee80211_band'
[-Wenum-conversion]

Replace NL80211_BAND_2GHZ with HDD_NL80211_BAND_2GHZ and
NL80211_BAND_5GHZ with HDD_NL80211_BAND_5GHZ.

Change-Id: I15a905a599b87fc1a876c5f1b7bd6d69b2ba0f15
CRs-Fixed: 2055487
This commit is contained in:
Srinivas Girigowda 2017-06-27 20:06:21 -07:00 • committed by snandini
commit 11c28e0022
4 changed files with 34 additions and 33 deletions

View file

@ -168,7 +168,7 @@
#define IBSS_CFG_PROTECTION_ENABLE_MASK 0x8282
#define HDD2GHZCHAN(freq, chan, flag) { \
.band = NL80211_BAND_2GHZ, \
.band = HDD_NL80211_BAND_2GHZ, \
.center_freq = (freq), \
.hw_value = (chan), \
.flags = (flag), \
@ -334,7 +334,7 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_ghz = {
static struct ieee80211_supported_band wlan_hdd_band_5_ghz = {
.channels = NULL,
.n_channels = ARRAY_SIZE(hdd_channels_5_ghz),
.band = NL80211_BAND_5GHZ,
.band = HDD_NL80211_BAND_5GHZ,
.bitrates = a_mode_rates,
.n_bitrates = a_mode_rates_size,
.ht_cap.ht_supported = 1,
@ -9916,10 +9916,10 @@ static int wlan_hdd_cfg80211_sar_convert_band(u32 nl80211_value, u32 *wmi_value)
int ret = 0;
switch (nl80211_value) {
case NL80211_BAND_2GHZ:
case HDD_NL80211_BAND_2GHZ:
*wmi_value = WMI_SAR_2G_ID;
break;
case NL80211_BAND_5GHZ:
case HDD_NL80211_BAND_5GHZ:
*wmi_value = WMI_SAR_5G_ID;
break;
default:
@ -11217,7 +11217,8 @@ int wlan_hdd_cfg80211_update_band(hdd_context_t *hdd_ctx, struct wiphy *wiphy,
hdd_ctx->hdd_pdev,
band->channels[j].hw_value);
if (NL80211_BAND_2GHZ == i && eCSR_BAND_5G == eBand) {
if (HDD_NL80211_BAND_2GHZ == i &&
eCSR_BAND_5G == eBand) {
/* 5G only */
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
/* Enable Social channels for P2P */
@ -11232,7 +11233,7 @@ int wlan_hdd_cfg80211_update_band(hdd_context_t *hdd_ctx, struct wiphy *wiphy,
band->channels[j].flags |=
IEEE80211_CHAN_DISABLED;
continue;
} else if (NL80211_BAND_5GHZ == i &&
} else if (HDD_NL80211_BAND_5GHZ == i &&
eCSR_BAND_24 == eBand) {
/* 2G only */
band->channels[j].flags |=
@ -11375,14 +11376,14 @@ int wlan_hdd_cfg80211_init(struct device *dev,
* wiphy flags don't get reset because of static memory.
* It's better not to store channel in static memory.
*/
wiphy->bands[NL80211_BAND_2GHZ] = &wlan_hdd_band_2_4_ghz;
wiphy->bands[NL80211_BAND_2GHZ]->channels =
wiphy->bands[HDD_NL80211_BAND_2GHZ] = &wlan_hdd_band_2_4_ghz;
wiphy->bands[HDD_NL80211_BAND_2GHZ]->channels =
qdf_mem_malloc(sizeof(hdd_channels_2_4_ghz));
if (wiphy->bands[NL80211_BAND_2GHZ]->channels == NULL) {
if (wiphy->bands[HDD_NL80211_BAND_2GHZ]->channels == NULL) {
hdd_err("Not enough memory to allocate channels");
return -ENOMEM;
}
qdf_mem_copy(wiphy->bands[NL80211_BAND_2GHZ]->channels,
qdf_mem_copy(wiphy->bands[HDD_NL80211_BAND_2GHZ]->channels,
&hdd_channels_2_4_ghz[0],
sizeof(hdd_channels_2_4_ghz));
if ((hdd_is_5g_supported(pHddCtx)) &&
@ -11390,17 +11391,17 @@ int wlan_hdd_cfg80211_init(struct device *dev,
(eHDD_DOT11_MODE_11g != pCfg->dot11Mode) &&
(eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) &&
(eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) {
wiphy->bands[NL80211_BAND_5GHZ] = &wlan_hdd_band_5_ghz;
wiphy->bands[NL80211_BAND_5GHZ]->channels =
wiphy->bands[HDD_NL80211_BAND_5GHZ] = &wlan_hdd_band_5_ghz;
wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels =
qdf_mem_malloc(sizeof(hdd_channels_5_ghz));
if (wiphy->bands[NL80211_BAND_5GHZ]->channels == NULL) {
if (wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels == NULL) {
hdd_err("Not enough memory to allocate channels");
qdf_mem_free(wiphy->
bands[NL80211_BAND_2GHZ]->channels);
wiphy->bands[NL80211_BAND_2GHZ]->channels = NULL;
bands[HDD_NL80211_BAND_2GHZ]->channels);
wiphy->bands[HDD_NL80211_BAND_2GHZ]->channels = NULL;
return -ENOMEM;
}
qdf_mem_copy(wiphy->bands[NL80211_BAND_5GHZ]->channels,
qdf_mem_copy(wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels,
&hdd_channels_5_ghz[0],
sizeof(hdd_channels_5_ghz));
}
@ -11413,7 +11414,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
for (j = 0; j < wiphy->bands[i]->n_channels; j++) {
struct ieee80211_supported_band *band = wiphy->bands[i];
if (NL80211_BAND_2GHZ == i &&
if (HDD_NL80211_BAND_2GHZ == i &&
eCSR_BAND_5G == pCfg->nBandCapability) {
/* 5G only */
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
@ -11427,7 +11428,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
band->channels[j].flags |=
IEEE80211_CHAN_DISABLED;
continue;
} else if (NL80211_BAND_5GHZ == i &&
} else if (HDD_NL80211_BAND_5GHZ == i &&
eCSR_BAND_24 == pCfg->nBandCapability) {
/* 2G only */
band->channels[j].flags |=
@ -11528,21 +11529,21 @@ static void wlan_hdd_update_band_cap(hdd_context_t *hdd_ctx)
ht_cap_info = (tSirMacHTCapabilityInfo *)&val16;
if (ht_cap_info->txSTBC == true) {
if (NULL != hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ])
hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->ht_cap.cap |=
if (NULL != hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ])
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ]->ht_cap.cap |=
IEEE80211_HT_CAP_TX_STBC;
if (NULL != hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ])
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap |=
if (NULL != hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ])
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->ht_cap.cap |=
IEEE80211_HT_CAP_TX_STBC;
}
if (!sme_is_feature_supported_by_fw(DOT11AC)) {
hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ]->
vht_cap.vht_supported = 0;
hdd_ctx->wiphy->bands[NL80211_BAND_2GHZ]->vht_cap.cap = 0;
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_2GHZ]->vht_cap.cap = 0;
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->
vht_cap.vht_supported = 0;
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap = 0;
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->vht_cap.cap = 0;
}
}
@ -13464,12 +13465,12 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
}
if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_ghz) &&
(wiphy->bands[NL80211_BAND_2GHZ] != NULL)) {
(wiphy->bands[HDD_NL80211_BAND_2GHZ] != NULL)) {
freq =
ieee80211_channel_to_frequency(chan_no,
HDD_NL80211_BAND_2GHZ);
} else if ((chan_no > ARRAY_SIZE(hdd_channels_2_4_ghz))
&& (wiphy->bands[NL80211_BAND_5GHZ] != NULL)) {
&& (wiphy->bands[HDD_NL80211_BAND_5GHZ] != NULL)) {
freq =
ieee80211_channel_to_frequency(chan_no,
HDD_NL80211_BAND_5GHZ);

View file

@ -1061,7 +1061,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
struct hdd_config *pconfig = hdd_ctx->config;
struct wiphy *wiphy = hdd_ctx->wiphy;
struct ieee80211_supported_band *band_5g =
wiphy->bands[NL80211_BAND_5GHZ];
wiphy->bands[HDD_NL80211_BAND_5GHZ];
uint32_t temp = 0;
uint32_t ch_width = eHT_CHANNEL_WIDTH_80MHZ;

View file

@ -259,9 +259,9 @@ static void hdd_regulatory_wiphy_init(hdd_context_t *hdd_ctx,
* disable 2.4 Ghz channels that dont have 20 mhz bw
*/
for (chan_num = 0;
chan_num < wiphy->bands[NL80211_BAND_2GHZ]->n_channels;
chan_num < wiphy->bands[HDD_NL80211_BAND_2GHZ]->n_channels;
chan_num++) {
chan = &(wiphy->bands[NL80211_BAND_2GHZ]->channels[chan_num]);
chan = &(wiphy->bands[HDD_NL80211_BAND_2GHZ]->channels[chan_num]);
if (chan->flags & IEEE80211_CHAN_NO_20MHZ)
chan->flags |= IEEE80211_CHAN_DISABLED;
}

View file

@ -7569,10 +7569,10 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
return -EIO;
}
if (phddctx->config->nChannelBondingMode5GHz)
phddctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap
phddctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->ht_cap.cap
|= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
else
phddctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap
phddctx->wiphy->bands[HDD_NL80211_BAND_5GHZ]->ht_cap.cap
&= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
hdd_debug("New_Phymode= %d ch_bonding=%d band=%d VHT_ch_width=%u",