From cdd6b0cb8b5fee44aa845820dba337d767eefb59 Mon Sep 17 00:00:00 2001 From: c_zding Date: Fri, 26 Feb 2016 14:22:32 +0800 Subject: qcacld-2.0: Add value check for RF bands attribute of WPS IE RF bands attribute of WPS IE in Probe.Req from STA/P2P device is 2.4 and 5GHz although BandCapability=1 (2.4GHz) in qcom_cfg.ini file. Set the value of RF bands attribute of WPS IE by checking return value of function hdd_is_5g_supported and value of BandCapability in qcom_cfg.ini. Change-Id: I7a60ef79336c586dbad35308e958563c5205888a CRs-Fixed: 979025 --- CORE/HDD/src/wlan_hdd_main.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 9cff44a02a5c..44f3dab3bdb6 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -13182,21 +13182,25 @@ VOS_STATUS hdd_set_sme_chan_list(hdd_context_t *hdd_ctx) hdd_ctx->reg.cc_src); } -/**--------------------------------------------------------------------------- - - \brief hdd_is_5g_supported() - HDD function to know if hardware supports 5GHz - - \param - pHddCtx - Pointer to the hdd context - - \return - true if hardware supports 5GHz - - --------------------------------------------------------------------------*/ +/** + * hdd_is_5g_supported() - to know if ini configuration supports 5GHz + * @pHddCtx: Pointer to the hdd context + * + * Return: true if ini configuration supports 5GHz + */ boolean hdd_is_5g_supported(hdd_context_t * pHddCtx) { - /* If wcnss_wlan_iris_xo_mode() returns WCNSS_XO_48MHZ(1); - * then hardware support 5Ghz. - */ - return true; + /** + * If wcnss_wlan_iris_xo_mode() returns WCNSS_XO_48MHZ(1); + * then hardware support 5Ghz. + */ + if(!pHddCtx || !pHddCtx->cfg_ini) + return true; + + if (pHddCtx->cfg_ini->nBandCapability != eCSR_BAND_24) + return true; + else + return false; } static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx) -- cgit v1.2.3