summaryrefslogtreecommitdiff
path: root/CORE/SAP/src/sapModule.c
diff options
context:
space:
mode:
authorManikandan Mohan <manikand@qca.qualcomm.com>2015-07-10 19:45:57 -0700
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-07-15 17:32:39 +0530
commit1689e26ad6927dd1dcde58e67904af3d899ec504 (patch)
treee34063106b563ba74ae011793b6717c71a8d37b4 /CORE/SAP/src/sapModule.c
parentb52534f5ff87958e7e0745017d9e996029171526 (diff)
qcacld: Fix SAP start fail after MCC to SCC switch
Fix a bug where SAP configured with ACS fails to start when MCC to SCC overrides the ACS channel during ACS selection procedure. Change-Id: I9b008c17651e6e6affa37d1688eca179bb8e900a CRs-fixed: 870558
Diffstat (limited to 'CORE/SAP/src/sapModule.c')
-rw-r--r--CORE/SAP/src/sapModule.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index 16f37a178770..e6e66396f42d 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -3909,17 +3909,26 @@ WLANSAP_ACS_CHSelect(v_PVOID_t pvosGCtx,
else if (VOS_STATUS_E_CANCELED == vosStatus) {
/*
* ERROR is returned when either the SME scan request
- * failed or ACS is not enabled. So, default channel
- * is selected and this default channel should be sent
- * to the HDD.
+ * failed or ACS is overridden due to other constraints
+ * So send this channel to HDD.
*/
VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- FL("Scan Req Failed/ACS not enabled,default channel = %d"),
+ FL("Scan Req Failed/ACS Overridden, Selected channel = %d"),
sapContext->channel);
+
halStatus = sapSignalHDDevent(sapContext, NULL,
eSAP_ACS_CHANNEL_SELECTED,
(v_PVOID_t) eSAP_STATUS_SUCCESS);
+ if (sapContext->isScanSessionOpen == eSAP_TRUE) {
+ /* acs scan not needed so close the session */
+ tHalHandle hHal = VOS_GET_HAL_CB(sapContext->pvosGCtx);
+ if (eHAL_STATUS_SUCCESS == sme_CloseSession(hHal,
+ sapContext->sessionId, NULL, NULL))
+ sapContext->isScanSessionOpen = eSAP_FALSE;
+ sapContext->sessionId = 0xff;
+ }
+
if (eHAL_STATUS_SUCCESS == halStatus) {
vosStatus = VOS_STATUS_SUCCESS;
return vosStatus;