mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
qcacld-3.0: Fix set-band operation
Currently, in regulatory callback, we do not update channels that are out-of-band. For example, if the current band is set to 2.4 GHz, we do not update channels of 5 GHZ band. Now, if the band gets changed, the channel list goes wrong. Fix this issue by updating all the channels and then calling wlan_hdd_cfg80211_update_band to update wiphy for the current in-band channels. Change-Id: If6d6fee01c7a7d6b2aa0f7d3acb862decce0819e CRs-Fixed: 978660
This commit is contained in:
parent
a7bb01b460
commit
6842e8f33a
4 changed files with 5 additions and 23 deletions
|
|
@ -5441,19 +5441,9 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (CHANNEL_STATE_DISABLE == channelEnabledState ||
|
||||
CHANNEL_STATE_INVALID == channelEnabledState) {
|
||||
band->channels[j].flags |=
|
||||
IEEE80211_CHAN_DISABLED;
|
||||
} else if (CHANNEL_STATE_DFS == channelEnabledState) {
|
||||
if (CHANNEL_STATE_DISABLE != channelEnabledState)
|
||||
band->channels[j].flags &=
|
||||
~IEEE80211_CHAN_DISABLED;
|
||||
band->channels[j].flags |= IEEE80211_CHAN_RADAR;
|
||||
} else {
|
||||
band->channels[j].flags &=
|
||||
~(IEEE80211_CHAN_DISABLED |
|
||||
IEEE80211_CHAN_RADAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2433,4 +2433,6 @@ int wlan_hdd_disable_dfs_chan_scan(hdd_context_t *hdd_ctx,
|
|||
hdd_adapter_t *adapter,
|
||||
uint32_t no_dfs_flag);
|
||||
|
||||
int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy,
|
||||
eCsrBand eBand);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -360,14 +360,6 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
|
|||
|
||||
for (band_num = 0; band_num < IEEE80211_NUM_BANDS; band_num++) {
|
||||
|
||||
if (band_num == IEEE80211_BAND_2GHZ &&
|
||||
band_capability == eCSR_BAND_5G)
|
||||
continue;
|
||||
|
||||
else if (band_num == IEEE80211_BAND_5GHZ &&
|
||||
band_capability == eCSR_BAND_24)
|
||||
continue;
|
||||
|
||||
if (wiphy->bands[band_num] == NULL)
|
||||
continue;
|
||||
|
||||
|
|
@ -415,6 +407,8 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx,
|
|||
cds_chan = &(reg_channels[CHAN_ENUM_144]);
|
||||
cds_chan->state = CHANNEL_STATE_DISABLE;
|
||||
}
|
||||
|
||||
wlan_hdd_cfg80211_update_band(wiphy, band_capability);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -589,7 +583,6 @@ void hdd_reg_notifier(struct wiphy *wiphy,
|
|||
struct regulatory_request *request)
|
||||
{
|
||||
hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
|
||||
eCsrBand band_capability = eCSR_BAND_ALL;
|
||||
bool vht80_allowed;
|
||||
bool reset = false;
|
||||
uint8_t dfs_reg;
|
||||
|
|
@ -611,8 +604,6 @@ void hdd_reg_notifier(struct wiphy *wiphy,
|
|||
return;
|
||||
}
|
||||
|
||||
sme_get_freq_band(hdd_ctx->hHal, &band_capability);
|
||||
|
||||
/* first check if this callback is in response to the driver callback */
|
||||
|
||||
switch (request->initiator) {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@
|
|||
#define HDD_SET_MCBC_FILTERS_TO_FW 1
|
||||
#define HDD_DELETE_MCBC_FILTERS_FROM_FW 0
|
||||
|
||||
extern int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand);
|
||||
static int ioctl_debug;
|
||||
module_param(ioctl_debug, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue