summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/SAP/src/sapFsm.c11
-rw-r--r--CORE/SAP/src/sapModule.c17
2 files changed, 20 insertions, 8 deletions
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index a238036c8dbf..7eddfb1f0846 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -2323,11 +2323,14 @@ sapGotoChannelSel
__func__, sapContext->channel);
if (VOS_TRUE == sapDoAcsPreStartBss)
{
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- "In %s, ACS Disabled, Configured Ch= %d",
- __func__, sapContext->channel);
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
+ "In %s, ACS end due to channel override, Selected Ch= %d",
+ __func__, sapContext->channel);
- return VOS_STATUS_E_FAILURE;
+ sapContext->acs_cfg->pri_ch = sapContext->channel;
+ sapContext->acs_cfg->ch_width = sapContext->ch_width_orig;
+ sap_config_acs_result(hHal, sapContext, 0);
+ return VOS_STATUS_E_CANCELED;
}
else
{
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;