qcacld-3.0: 4.8 Kernel Migration - Remove ieee80211_band
Update references from enum ieee80211_band to nl80211_band, as ieee80211_band was removed in version 4.7 of the Linux Kernel. Change-Id: Id42cf6e20c3ebe921546d11fd22c3909aeb84ddd CRs-Fixed: 1077221 (cherry picked from commit 8e62ee9836406b81fe3e418028cdb2ae8f5ec039)
This commit is contained in:
@@ -6661,11 +6661,11 @@ static bool cds_sta_p2pgo_concur_handle(hdd_adapter_t *sta_adapter,
|
|||||||
if (p2pgo_channel_num <= 14) {
|
if (p2pgo_channel_num <= 14) {
|
||||||
freq = ieee80211_channel_to_frequency(
|
freq = ieee80211_channel_to_frequency(
|
||||||
p2pgo_channel_num,
|
p2pgo_channel_num,
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
} else {
|
} else {
|
||||||
freq = ieee80211_channel_to_frequency(
|
freq = ieee80211_channel_to_frequency(
|
||||||
p2pgo_channel_num,
|
p2pgo_channel_num,
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
}
|
}
|
||||||
qdf_mem_zero(&hdd_avoid_freq_list,
|
qdf_mem_zero(&hdd_avoid_freq_list,
|
||||||
sizeof(hdd_avoid_freq_list));
|
sizeof(hdd_avoid_freq_list));
|
||||||
|
@@ -3004,10 +3004,10 @@ static void hdd_roam_ibss_indication_handler(hdd_adapter_t *pAdapter,
|
|||||||
|
|
||||||
if (chan_no <= 14)
|
if (chan_no <= 14)
|
||||||
freq = ieee80211_channel_to_frequency(chan_no,
|
freq = ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
else
|
else
|
||||||
freq = ieee80211_channel_to_frequency(chan_no,
|
freq = ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
|
|
||||||
chan = ieee80211_get_channel(pAdapter->wdev.wiphy, freq);
|
chan = ieee80211_get_channel(pAdapter->wdev.wiphy, freq);
|
||||||
|
|
||||||
|
@@ -118,7 +118,7 @@
|
|||||||
#define IBSS_CFG_PROTECTION_ENABLE_MASK 0x8282
|
#define IBSS_CFG_PROTECTION_ENABLE_MASK 0x8282
|
||||||
|
|
||||||
#define HDD2GHZCHAN(freq, chan, flag) { \
|
#define HDD2GHZCHAN(freq, chan, flag) { \
|
||||||
.band = IEEE80211_BAND_2GHZ, \
|
.band = NL80211_BAND_2GHZ, \
|
||||||
.center_freq = (freq), \
|
.center_freq = (freq), \
|
||||||
.hw_value = (chan), \
|
.hw_value = (chan), \
|
||||||
.flags = (flag), \
|
.flags = (flag), \
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define HDD5GHZCHAN(freq, chan, flag) { \
|
#define HDD5GHZCHAN(freq, chan, flag) { \
|
||||||
.band = IEEE80211_BAND_5GHZ, \
|
.band = NL80211_BAND_5GHZ, \
|
||||||
.center_freq = (freq), \
|
.center_freq = (freq), \
|
||||||
.hw_value = (chan), \
|
.hw_value = (chan), \
|
||||||
.flags = (flag), \
|
.flags = (flag), \
|
||||||
@@ -265,7 +265,7 @@ static struct ieee80211_rate a_mode_rates[] = {
|
|||||||
static struct ieee80211_supported_band wlan_hdd_band_2_4_ghz = {
|
static struct ieee80211_supported_band wlan_hdd_band_2_4_ghz = {
|
||||||
.channels = NULL,
|
.channels = NULL,
|
||||||
.n_channels = ARRAY_SIZE(hdd_channels_2_4_ghz),
|
.n_channels = ARRAY_SIZE(hdd_channels_2_4_ghz),
|
||||||
.band = IEEE80211_BAND_2GHZ,
|
.band = NL80211_BAND_2GHZ,
|
||||||
.bitrates = g_mode_rates,
|
.bitrates = g_mode_rates,
|
||||||
.n_bitrates = g_mode_rates_size,
|
.n_bitrates = g_mode_rates_size,
|
||||||
.ht_cap.ht_supported = 1,
|
.ht_cap.ht_supported = 1,
|
||||||
@@ -284,7 +284,7 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_ghz = {
|
|||||||
static struct ieee80211_supported_band wlan_hdd_band_5_ghz = {
|
static struct ieee80211_supported_band wlan_hdd_band_5_ghz = {
|
||||||
.channels = NULL,
|
.channels = NULL,
|
||||||
.n_channels = ARRAY_SIZE(hdd_channels_5_ghz),
|
.n_channels = ARRAY_SIZE(hdd_channels_5_ghz),
|
||||||
.band = IEEE80211_BAND_5GHZ,
|
.band = NL80211_BAND_5GHZ,
|
||||||
.bitrates = a_mode_rates,
|
.bitrates = a_mode_rates,
|
||||||
.n_bitrates = a_mode_rates_size,
|
.n_bitrates = a_mode_rates_size,
|
||||||
.ht_cap.ht_supported = 1,
|
.ht_cap.ht_supported = 1,
|
||||||
@@ -5265,11 +5265,11 @@ static int __wlan_hdd_cfg80211_get_preferred_freq_list(struct wiphy *wiphy,
|
|||||||
if (pcl[i] <= ARRAY_SIZE(hdd_channels_2_4_ghz))
|
if (pcl[i] <= ARRAY_SIZE(hdd_channels_2_4_ghz))
|
||||||
freq_list[i] =
|
freq_list[i] =
|
||||||
ieee80211_channel_to_frequency(pcl[i],
|
ieee80211_channel_to_frequency(pcl[i],
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
else
|
else
|
||||||
freq_list[i] =
|
freq_list[i] =
|
||||||
ieee80211_channel_to_frequency(pcl[i],
|
ieee80211_channel_to_frequency(pcl[i],
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send the freq_list back to supplicant */
|
/* send the freq_list back to supplicant */
|
||||||
@@ -8625,7 +8625,7 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
|
|||||||
|
|
||||||
ENTER();
|
ENTER();
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||||
|
|
||||||
if (NULL == wiphy->bands[i])
|
if (NULL == wiphy->bands[i])
|
||||||
continue;
|
continue;
|
||||||
@@ -8637,7 +8637,7 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
|
|||||||
cds_get_channel_state(band->channels[j].
|
cds_get_channel_state(band->channels[j].
|
||||||
hw_value);
|
hw_value);
|
||||||
|
|
||||||
if (IEEE80211_BAND_2GHZ == i && eCSR_BAND_5G == eBand) {
|
if (NL80211_BAND_2GHZ == i && eCSR_BAND_5G == eBand) {
|
||||||
/* 5G only */
|
/* 5G only */
|
||||||
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
|
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
|
||||||
/* Enable Social channels for P2P */
|
/* Enable Social channels for P2P */
|
||||||
@@ -8652,7 +8652,7 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
|
|||||||
band->channels[j].flags |=
|
band->channels[j].flags |=
|
||||||
IEEE80211_CHAN_DISABLED;
|
IEEE80211_CHAN_DISABLED;
|
||||||
continue;
|
continue;
|
||||||
} else if (IEEE80211_BAND_5GHZ == i &&
|
} else if (NL80211_BAND_5GHZ == i &&
|
||||||
eCSR_BAND_24 == eBand) {
|
eCSR_BAND_24 == eBand) {
|
||||||
/* 2G only */
|
/* 2G only */
|
||||||
band->channels[j].flags |=
|
band->channels[j].flags |=
|
||||||
@@ -8812,14 +8812,14 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||||||
* wiphy flags don't get reset because of static memory.
|
* wiphy flags don't get reset because of static memory.
|
||||||
* It's better not to store channel in static memory.
|
* It's better not to store channel in static memory.
|
||||||
*/
|
*/
|
||||||
wiphy->bands[IEEE80211_BAND_2GHZ] = &wlan_hdd_band_2_4_ghz;
|
wiphy->bands[NL80211_BAND_2GHZ] = &wlan_hdd_band_2_4_ghz;
|
||||||
wiphy->bands[IEEE80211_BAND_2GHZ]->channels =
|
wiphy->bands[NL80211_BAND_2GHZ]->channels =
|
||||||
qdf_mem_malloc(sizeof(hdd_channels_2_4_ghz));
|
qdf_mem_malloc(sizeof(hdd_channels_2_4_ghz));
|
||||||
if (wiphy->bands[IEEE80211_BAND_2GHZ]->channels == NULL) {
|
if (wiphy->bands[NL80211_BAND_2GHZ]->channels == NULL) {
|
||||||
hdd_err("Not enough memory to allocate channels");
|
hdd_err("Not enough memory to allocate channels");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
qdf_mem_copy(wiphy->bands[IEEE80211_BAND_2GHZ]->channels,
|
qdf_mem_copy(wiphy->bands[NL80211_BAND_2GHZ]->channels,
|
||||||
&hdd_channels_2_4_ghz[0],
|
&hdd_channels_2_4_ghz[0],
|
||||||
sizeof(hdd_channels_2_4_ghz));
|
sizeof(hdd_channels_2_4_ghz));
|
||||||
if ((hdd_is_5g_supported(pHddCtx)) &&
|
if ((hdd_is_5g_supported(pHddCtx)) &&
|
||||||
@@ -8827,22 +8827,22 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||||||
(eHDD_DOT11_MODE_11g != pCfg->dot11Mode) &&
|
(eHDD_DOT11_MODE_11g != pCfg->dot11Mode) &&
|
||||||
(eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) &&
|
(eHDD_DOT11_MODE_11b_ONLY != pCfg->dot11Mode) &&
|
||||||
(eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) {
|
(eHDD_DOT11_MODE_11g_ONLY != pCfg->dot11Mode))) {
|
||||||
wiphy->bands[IEEE80211_BAND_5GHZ] = &wlan_hdd_band_5_ghz;
|
wiphy->bands[NL80211_BAND_5GHZ] = &wlan_hdd_band_5_ghz;
|
||||||
wiphy->bands[IEEE80211_BAND_5GHZ]->channels =
|
wiphy->bands[NL80211_BAND_5GHZ]->channels =
|
||||||
qdf_mem_malloc(sizeof(hdd_channels_5_ghz));
|
qdf_mem_malloc(sizeof(hdd_channels_5_ghz));
|
||||||
if (wiphy->bands[IEEE80211_BAND_5GHZ]->channels == NULL) {
|
if (wiphy->bands[NL80211_BAND_5GHZ]->channels == NULL) {
|
||||||
hdd_err("Not enough memory to allocate channels");
|
hdd_err("Not enough memory to allocate channels");
|
||||||
qdf_mem_free(wiphy->
|
qdf_mem_free(wiphy->
|
||||||
bands[IEEE80211_BAND_2GHZ]->channels);
|
bands[NL80211_BAND_2GHZ]->channels);
|
||||||
wiphy->bands[IEEE80211_BAND_2GHZ]->channels = NULL;
|
wiphy->bands[NL80211_BAND_2GHZ]->channels = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
qdf_mem_copy(wiphy->bands[IEEE80211_BAND_5GHZ]->channels,
|
qdf_mem_copy(wiphy->bands[NL80211_BAND_5GHZ]->channels,
|
||||||
&hdd_channels_5_ghz[0],
|
&hdd_channels_5_ghz[0],
|
||||||
sizeof(hdd_channels_5_ghz));
|
sizeof(hdd_channels_5_ghz));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||||
|
|
||||||
if (NULL == wiphy->bands[i])
|
if (NULL == wiphy->bands[i])
|
||||||
continue;
|
continue;
|
||||||
@@ -8850,7 +8850,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||||||
for (j = 0; j < wiphy->bands[i]->n_channels; j++) {
|
for (j = 0; j < wiphy->bands[i]->n_channels; j++) {
|
||||||
struct ieee80211_supported_band *band = wiphy->bands[i];
|
struct ieee80211_supported_band *band = wiphy->bands[i];
|
||||||
|
|
||||||
if (IEEE80211_BAND_2GHZ == i &&
|
if (NL80211_BAND_2GHZ == i &&
|
||||||
eCSR_BAND_5G == pCfg->nBandCapability) {
|
eCSR_BAND_5G == pCfg->nBandCapability) {
|
||||||
/* 5G only */
|
/* 5G only */
|
||||||
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
|
#ifdef WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
|
||||||
@@ -8864,7 +8864,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
|
|||||||
band->channels[j].flags |=
|
band->channels[j].flags |=
|
||||||
IEEE80211_CHAN_DISABLED;
|
IEEE80211_CHAN_DISABLED;
|
||||||
continue;
|
continue;
|
||||||
} else if (IEEE80211_BAND_5GHZ == i &&
|
} else if (NL80211_BAND_5GHZ == i &&
|
||||||
eCSR_BAND_24 == pCfg->nBandCapability) {
|
eCSR_BAND_24 == pCfg->nBandCapability) {
|
||||||
/* 2G only */
|
/* 2G only */
|
||||||
band->channels[j].flags |=
|
band->channels[j].flags |=
|
||||||
@@ -8921,7 +8921,7 @@ void wlan_hdd_cfg80211_deinit(struct wiphy *wiphy)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||||
if (NULL != wiphy->bands[i] &&
|
if (NULL != wiphy->bands[i] &&
|
||||||
(NULL != wiphy->bands[i]->channels)) {
|
(NULL != wiphy->bands[i]->channels)) {
|
||||||
qdf_mem_free(wiphy->bands[i]->channels);
|
qdf_mem_free(wiphy->bands[i]->channels);
|
||||||
@@ -10698,15 +10698,15 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_ghz) &&
|
if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_ghz) &&
|
||||||
(wiphy->bands[IEEE80211_BAND_2GHZ] != NULL)) {
|
(wiphy->bands[NL80211_BAND_2GHZ] != NULL)) {
|
||||||
freq =
|
freq =
|
||||||
ieee80211_channel_to_frequency(chan_no,
|
ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
} else if ((chan_no > ARRAY_SIZE(hdd_channels_2_4_ghz))
|
} else if ((chan_no > ARRAY_SIZE(hdd_channels_2_4_ghz))
|
||||||
&& (wiphy->bands[IEEE80211_BAND_5GHZ] != NULL)) {
|
&& (wiphy->bands[NL80211_BAND_5GHZ] != NULL)) {
|
||||||
freq =
|
freq =
|
||||||
ieee80211_channel_to_frequency(chan_no,
|
ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
} else {
|
} else {
|
||||||
hdd_err("Invalid chan_no %d", chan_no);
|
hdd_err("Invalid chan_no %d", chan_no);
|
||||||
kfree(mgmt);
|
kfree(mgmt);
|
||||||
|
@@ -3224,4 +3224,13 @@ static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
|
|||||||
#endif
|
#endif
|
||||||
struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
|
struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
|
||||||
tSirBssDescription *bss_desc);
|
tSirBssDescription *bss_desc);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* As of 4.7, ieee80211_band is removed; add shims so we can reference
|
||||||
|
* nl80211_band instead
|
||||||
|
*/
|
||||||
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||||
|
#define NUM_NL80211_BANDS ((enum nl80211_band)IEEE80211_NUM_BANDS)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2455,7 +2455,7 @@ static void hdd_remove_indoor_channels(struct wiphy *wiphy, uint32_t *chan_list,
|
|||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
|
||||||
for (i = 0; i < *num_channels; i++)
|
for (i = 0; i < *num_channels; i++)
|
||||||
for (j = 0; j < IEEE80211_NUM_BANDS; j++) {
|
for (j = 0; j < NUM_NL80211_BANDS; j++) {
|
||||||
if (wiphy->bands[j] == NULL)
|
if (wiphy->bands[j] == NULL)
|
||||||
continue;
|
continue;
|
||||||
for (k = 0; k < wiphy->bands[j]->n_channels; k++) {
|
for (k = 0; k < wiphy->bands[j]->n_channels; k++) {
|
||||||
|
@@ -998,7 +998,7 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
|
|||||||
struct hdd_config *pconfig = hdd_ctx->config;
|
struct hdd_config *pconfig = hdd_ctx->config;
|
||||||
struct wiphy *wiphy = hdd_ctx->wiphy;
|
struct wiphy *wiphy = hdd_ctx->wiphy;
|
||||||
struct ieee80211_supported_band *band_5g =
|
struct ieee80211_supported_band *band_5g =
|
||||||
wiphy->bands[IEEE80211_BAND_5GHZ];
|
wiphy->bands[NL80211_BAND_5GHZ];
|
||||||
uint32_t temp = 0;
|
uint32_t temp = 0;
|
||||||
|
|
||||||
if (!band_5g) {
|
if (!band_5g) {
|
||||||
@@ -3992,10 +3992,10 @@ void hdd_connect_result(struct net_device *dev, const u8 *bssid,
|
|||||||
|
|
||||||
if (chan_no <= 14)
|
if (chan_no <= 14)
|
||||||
freq = ieee80211_channel_to_frequency(chan_no,
|
freq = ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
else
|
else
|
||||||
freq = ieee80211_channel_to_frequency(chan_no,
|
freq = ieee80211_channel_to_frequency(chan_no,
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
|
|
||||||
chan = ieee80211_get_channel(padapter->wdev.wiphy, freq);
|
chan = ieee80211_get_channel(padapter->wdev.wiphy, freq);
|
||||||
bss = hdd_cfg80211_get_bss(padapter->wdev.wiphy, chan, bssid,
|
bss = hdd_cfg80211_get_bss(padapter->wdev.wiphy, chan, bssid,
|
||||||
|
@@ -145,7 +145,7 @@ static int dot11p_validate_channel(struct wiphy *wiphy,
|
|||||||
struct ieee80211_supported_band *current_band;
|
struct ieee80211_supported_band *current_band;
|
||||||
struct ieee80211_channel *current_channel;
|
struct ieee80211_channel *current_channel;
|
||||||
|
|
||||||
for (band_idx = 0; band_idx < IEEE80211_NUM_BANDS; band_idx++) {
|
for (band_idx = 0; band_idx < NUM_NL80211_BANDS; band_idx++) {
|
||||||
current_band = wiphy->bands[band_idx];
|
current_band = wiphy->bands[band_idx];
|
||||||
if (!current_band)
|
if (!current_band)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -2309,10 +2309,10 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
|
|||||||
/* Indicate an action frame. */
|
/* Indicate an action frame. */
|
||||||
if (rxChan <= MAX_NO_OF_2_4_CHANNELS)
|
if (rxChan <= MAX_NO_OF_2_4_CHANNELS)
|
||||||
freq = ieee80211_channel_to_frequency(rxChan,
|
freq = ieee80211_channel_to_frequency(rxChan,
|
||||||
IEEE80211_BAND_2GHZ);
|
NL80211_BAND_2GHZ);
|
||||||
else
|
else
|
||||||
freq = ieee80211_channel_to_frequency(rxChan,
|
freq = ieee80211_channel_to_frequency(rxChan,
|
||||||
IEEE80211_BAND_5GHZ);
|
NL80211_BAND_5GHZ);
|
||||||
|
|
||||||
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
|
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
|
||||||
|
|
||||||
|
@@ -386,7 +386,7 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
|
|||||||
band_capability = hdd_ctx->config->nBandCapability;
|
band_capability = hdd_ctx->config->nBandCapability;
|
||||||
hdd_ctx->isVHT80Allowed = 0;
|
hdd_ctx->isVHT80Allowed = 0;
|
||||||
|
|
||||||
for (band_num = 0; band_num < IEEE80211_NUM_BANDS; band_num++) {
|
for (band_num = 0; band_num < NUM_NL80211_BANDS; band_num++) {
|
||||||
|
|
||||||
if (wiphy->bands[band_num] == NULL)
|
if (wiphy->bands[band_num] == NULL)
|
||||||
continue;
|
continue;
|
||||||
@@ -570,7 +570,7 @@ static void hdd_restore_custom_reg_settings(struct wiphy *wiphy,
|
|||||||
bool *reset)
|
bool *reset)
|
||||||
{
|
{
|
||||||
struct ieee80211_supported_band *sband;
|
struct ieee80211_supported_band *sband;
|
||||||
enum ieee80211_band band;
|
enum nl80211_band band;
|
||||||
struct ieee80211_channel *chan;
|
struct ieee80211_channel *chan;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -578,7 +578,7 @@ static void hdd_restore_custom_reg_settings(struct wiphy *wiphy,
|
|||||||
(country_alpha2[1] == '0') &&
|
(country_alpha2[1] == '0') &&
|
||||||
(wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)) {
|
(wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY)) {
|
||||||
|
|
||||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||||
sband = wiphy->bands[band];
|
sband = wiphy->bands[band];
|
||||||
if (!sband)
|
if (!sband)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -1798,7 +1798,7 @@ int wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|||||||
* Return: o for failure, rate bitmap for success
|
* Return: o for failure, rate bitmap for success
|
||||||
*/
|
*/
|
||||||
static uint32_t wlan_hdd_get_rates(struct wiphy *wiphy,
|
static uint32_t wlan_hdd_get_rates(struct wiphy *wiphy,
|
||||||
enum ieee80211_band band,
|
enum nl80211_band band,
|
||||||
const u8 *rates, unsigned int rate_count)
|
const u8 *rates, unsigned int rate_count)
|
||||||
{
|
{
|
||||||
uint32_t j, count, rate_bitmap = 0;
|
uint32_t j, count, rate_bitmap = 0;
|
||||||
@@ -1885,7 +1885,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||||||
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1];
|
struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1];
|
||||||
struct cfg80211_scan_request *request = NULL;
|
struct cfg80211_scan_request *request = NULL;
|
||||||
struct nlattr *attr;
|
struct nlattr *attr;
|
||||||
enum ieee80211_band band;
|
enum nl80211_band band;
|
||||||
uint8_t n_channels = 0, n_ssid = 0, ie_len = 0;
|
uint8_t n_channels = 0, n_ssid = 0, ie_len = 0;
|
||||||
uint32_t tmp, count, j;
|
uint32_t tmp, count, j;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
@@ -1910,7 +1910,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||||||
tb[QCA_WLAN_VENDOR_ATTR_SCAN_FREQUENCIES], tmp)
|
tb[QCA_WLAN_VENDOR_ATTR_SCAN_FREQUENCIES], tmp)
|
||||||
n_channels++;
|
n_channels++;
|
||||||
} else {
|
} else {
|
||||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++)
|
for (band = 0; band < NUM_NL80211_BANDS; band++)
|
||||||
if (wiphy->bands[band])
|
if (wiphy->bands[band])
|
||||||
n_channels += wiphy->bands[band]->n_channels;
|
n_channels += wiphy->bands[band]->n_channels;
|
||||||
}
|
}
|
||||||
@@ -1965,7 +1965,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||||
if (!wiphy->bands[band])
|
if (!wiphy->bands[band])
|
||||||
continue;
|
continue;
|
||||||
for (j = 0; j < wiphy->bands[band]->n_channels;
|
for (j = 0; j < wiphy->bands[band]->n_channels;
|
||||||
@@ -2001,7 +2001,7 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
|
|||||||
request->ie_len);
|
request->ie_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (count = 0; count < IEEE80211_NUM_BANDS; count++)
|
for (count = 0; count < NUM_NL80211_BANDS; count++)
|
||||||
if (wiphy->bands[count])
|
if (wiphy->bands[count])
|
||||||
request->rates[count] =
|
request->rates[count] =
|
||||||
(1 << wiphy->bands[count]->n_bitrates) - 1;
|
(1 << wiphy->bands[count]->n_bitrates) - 1;
|
||||||
|
@@ -2355,7 +2355,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||||||
sme_get_operation_channel(halHandle, &channel, pAdapter->sessionId);
|
sme_get_operation_channel(halHandle, &channel, pAdapter->sessionId);
|
||||||
hdd_wlan_get_freq(channel, &freq);
|
hdd_wlan_get_freq(channel, &freq);
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||||
if (NULL == wiphy->bands[i])
|
if (NULL == wiphy->bands[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -5086,10 +5086,10 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
if (phddctx->config->nChannelBondingMode5GHz)
|
if (phddctx->config->nChannelBondingMode5GHz)
|
||||||
phddctx->wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap.cap
|
phddctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap
|
||||||
|= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
|= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||||
else
|
else
|
||||||
phddctx->wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap.cap
|
phddctx->wiphy->bands[NL80211_BAND_5GHZ]->ht_cap.cap
|
||||||
&= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
&= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||||
|
|
||||||
hdd_warn("New_Phymode= %d ch_bonding=%d band=%d VHT_ch_width=%u",
|
hdd_warn("New_Phymode= %d ch_bonding=%d band=%d VHT_ch_width=%u",
|
||||||
|
Reference in New Issue
Block a user