diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b70fede5603c..22761531e1be 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -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); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 08ae14c70ea9..267a22948dfe 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -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; diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index db6043481744..e64702991bc1 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -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; } diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index f544878830e7..eb6e24a2eedd 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -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",