summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc_zding <c_zding@qti.qualcomm.com>2016-02-26 14:22:32 +0800
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-01 14:44:47 +0530
commitcdd6b0cb8b5fee44aa845820dba337d767eefb59 (patch)
treeeb9fb1ef217bd4817674dcc11dac8dde8e671aec
parent14e2216b3dbff64d8e8401b07fecb1d25c512b4e (diff)
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
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c30
1 files 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)