summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c17
-rw-r--r--CORE/SME/inc/sme_Api.h1
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c13
3 files changed, 24 insertions, 7 deletions
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index b1ac539c23b9..c8b399682065 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -471,9 +471,11 @@ static inline void hdd_update_channel_bw_info(hdd_context_t *hdd_ctx,
uint16_t sec_ch_2g = 0;
uint8_t vht_capable;
WLAN_PHY_MODE phy_mode;
- uint8_t dot11_mode = hdd_ctx->cfg_ini->dot11Mode;
+ uint32_t wni_dot11_mode;
- vht_capable = IS_DOT11_MODE_VHT(dot11_mode);
+ wni_dot11_mode = sme_get_wni_dot11_mode(hdd_ctx->hHal);
+
+ vht_capable = IS_DOT11_MODE_VHT(wni_dot11_mode);
if (chan <= SIR_11B_CHANNEL_END) {
if (chan <= 5)
@@ -488,15 +490,16 @@ static inline void hdd_update_channel_bw_info(hdd_context_t *hdd_ctx,
vos_set_channel_params(chan, sec_ch_2g, &ch_params);
if (ch_params.center_freq_seg0)
- hdd_chan_info->band_center_freq1 = ch_params.center_freq_seg0;
+ hdd_chan_info->band_center_freq1 =
+ ch_params.center_freq_seg0;
hddLog(LOG1,
- FL("chan %d ch_width %d sec offset %d center_freq_seg0 %d"),
- chan, ch_params.ch_width, ch_params.sec_ch_offset,
- ch_params.center_freq_seg0);
+ FL("chan %d wni_dot11_mode %d ch_width %d sec offset %d center_freq_seg0 %d"),
+ chan, wni_dot11_mode, ch_params.ch_width,
+ ch_params.sec_ch_offset, ch_params.center_freq_seg0);
phy_mode = wma_chan_to_mode(chan, ch_params.sec_ch_offset,
- vht_capable, dot11_mode);
+ vht_capable, wni_dot11_mode);
WMI_SET_CHANNEL_MODE(hdd_chan_info, phy_mode);
}
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 06250009356b..02a42b743ccf 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -3739,6 +3739,7 @@ eHalStatus sme_SetHT2040Mode(tHalHandle hHal, tANI_U8 sessionId,
eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
tANI_U32 *regInfo1, tANI_U32 *regInfo2);
+uint32_t sme_get_wni_dot11_mode(tHalHandle hal);
#ifdef FEATURE_WLAN_TDLS
eHalStatus sme_UpdateFwTdlsState(tHalHandle hHal, void *psmeTdlsParams,
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 69b4db2a8065..7e74be03beb5 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -14595,6 +14595,19 @@ eHalStatus sme_getRegInfo(tHalHandle hHal, tANI_U8 chanId,
return status;
}
+/* sme_get_wni_dot11_mode() - return configured wni dot11mode
+ * @hHal: hal pointer
+ *
+ * Return: wni dot11 mode.
+ */
+uint32_t sme_get_wni_dot11_mode(tHalHandle hal)
+{
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
+
+ return csrTranslateToWNICfgDot11Mode(mac_ctx,
+ mac_ctx->roam.configParam.uCfgDot11Mode);
+}
+
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
/* ---------------------------------------------------------------------------
\fn sme_auto_shutdown_cb