summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c16
-rw-r--r--CORE/SAP/inc/sapApi.h5
2 files changed, 16 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index bfa90a3dfc53..0afd5f732381 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -18073,17 +18073,17 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
* VHT80 depends on HT40 config.
*/
if (pConfig->SapHw_mode == eCSR_DOT11_MODE_11ac)
- if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_40)
+ if (pConfig->ch_width_orig_usr == NL80211_CHAN_WIDTH_40)
pConfig->ch_width_orig = iniConfig->vhtChannelWidth;
#endif
- if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_80 &&
+ if (pConfig->ch_width_orig_usr == NL80211_CHAN_WIDTH_80 &&
!pHddCtx->cfg_ini->sap_force_11n_for_11ac) {
if (pHddCtx->isVHT80Allowed == false)
pConfig->ch_width_orig = eHT_CHANNEL_WIDTH_40MHZ;
else
pConfig->ch_width_orig = eHT_CHANNEL_WIDTH_80MHZ;
- } else if (pConfig->ch_width_orig == NL80211_CHAN_WIDTH_40)
+ } else if (pConfig->ch_width_orig_usr == NL80211_CHAN_WIDTH_40)
pConfig->ch_width_orig = eHT_CHANNEL_WIDTH_40MHZ;
else
pConfig->ch_width_orig = eHT_CHANNEL_WIDTH_20MHZ;
@@ -18996,7 +18996,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) || defined(WITH_BACKPORTS)
- pAdapter->sessionCtx.ap.sapConfig.ch_width_orig =
+ pAdapter->sessionCtx.ap.sapConfig.ch_width_orig_usr =
params->chandef.width;
#endif
@@ -30751,6 +30751,10 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
smeConfig.csrConfig.channelBondingMode24GHz =
eCSR_INI_SINGLE_CHANNEL_CENTERED;
sme_UpdateConfig(pHddCtx->hHal, &smeConfig);
+ pAdapter->sessionCtx.ap.sapConfig.ch_width_orig_usr =
+ chandef->width;
+ pAdapter->sessionCtx.ap.sapConfig.ch_width_orig =
+ eHT_CHANNEL_WIDTH_20MHZ;
cbModeChange = TRUE;
}
break;
@@ -30765,6 +30769,10 @@ __wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
smeConfig.csrConfig.channelBondingMode24GHz =
eCSR_INI_DOUBLE_CHANNEL_LOW_PRIMARY;
sme_UpdateConfig(pHddCtx->hHal, &smeConfig);
+ pAdapter->sessionCtx.ap.sapConfig.ch_width_orig_usr =
+ chandef->width;
+ pAdapter->sessionCtx.ap.sapConfig.ch_width_orig =
+ eHT_CHANNEL_WIDTH_40MHZ;
cbModeChange = TRUE;
}
break;
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index 9cc3f09e4854..4db548590a17 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -549,7 +549,10 @@ typedef struct sap_Config {
v_U8_t channel; /* Operation channel */
uint8_t sec_ch;
uint16_t vht_channel_width;
- uint16_t ch_width_orig;
+ /* record value of "enum nl80211_chan_width" from usr */
+ uint32_t ch_width_orig_usr;
+ /* convert to value of "tSirMacHTChannelWidth" per ch_width_orig_usr */
+ tSirMacHTChannelWidth ch_width_orig;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
uint16_t ch_width_24g_orig;
uint16_t ch_width_5g_orig;