diff options
| author | Himanshu Agarwal <himanaga@codeaurora.org> | 2018-02-05 17:55:15 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-02-06 23:01:54 -0800 |
| commit | 44bb0cc8ebccf84fc2f84d1cc35609c551434e5c (patch) | |
| tree | 8f59b93e5db3a0ee6fc96e376aa2c320317bd591 | |
| parent | c5442d33da1f8895e527cefb68969669f99353dc (diff) | |
qcacld-3.0: Assign acs_cfg->end_ch before use
In __wlan_hdd_cfg80211_do_acs(), when gAP11ACOverride is 1,
it sets vht_enabled to 1, hw_mode to 11ac and acs_cfg->ch_width
to the value of ini gVhtChannelWidth. If acs_cfg->end_ch is less
than 14 and acs_cfg->ch_width is 80Mhz, set acs_cfg->ch_width to
40Mhz. As acs_cfg->end_ch is not assigned yet, it is 0 due to
which acs_cfg->ch_width gets assigned to 40Mhz.
Assign acs_cfg->end_ch before use when gAP11ACOverride is 1 in
__wlan_hdd_cfg80211_do_acs().
Change-Id: If8bcc7470c1693791dfc64ec0b6059c09747d739
CRs-Fixed: 2184017
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a334e23b7ad8..25d8ae0aa58a 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1765,22 +1765,24 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, hw_mode = eCSR_DOT11_MODE_11ac; sap_config->acs_cfg.ch_width = hdd_ctx->config->vhtChannelWidth; + wlan_hdd_set_acs_ch_range(sap_config, hw_mode, + ht_enabled, vht_enabled); /* No VHT80 in 2.4G so perform ACS accordingly */ if (sap_config->acs_cfg.end_ch <= 14 && sap_config->acs_cfg.ch_width == eHT_CHANNEL_WIDTH_80MHZ) sap_config->acs_cfg.ch_width = eHT_CHANNEL_WIDTH_40MHZ; + } else { + wlan_hdd_set_acs_ch_range(sap_config, hw_mode, + ht_enabled, vht_enabled); } - wlan_hdd_set_acs_ch_range(sap_config, hw_mode, - ht_enabled, vht_enabled); - if (hdd_ctx->config->auto_channel_select_weight) sap_config->auto_channel_select_weight = hdd_ctx->config->auto_channel_select_weight; hdd_debug("ACS Config for %s: HW_MODE: %d ACS_BW: %d HT: %d VHT: %d START_CH: %d END_CH: %d", adapter->dev->name, sap_config->acs_cfg.hw_mode, - ch_width, ht_enabled, vht_enabled, + sap_config->acs_cfg.ch_width, ht_enabled, vht_enabled, sap_config->acs_cfg.start_ch, sap_config->acs_cfg.end_ch); if (sap_config->acs_cfg.ch_list_count) { |
