summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManikandan Mohan <manikand@qca.qualcomm.com>2014-11-17 12:25:40 -0800
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2014-11-20 16:57:59 +0530
commit54fcad86b5aa1b8f847bbdfacb7822d2befaeb73 (patch)
treedd2332b9be267356443ce23b86865adcc68ab087
parent7db94853f35517877fa10b5529ed3d3a308c1f84 (diff)
qcacld SAP: Fail SAP Start BSS on ACS fail
When no channel could be selected by Auto channel select due to DFS, LTE-Coex and concurrent mode restrictions, we used to return first channel in given ACS range or ACS band. Changed this behavior to fail BSS startup if ACS failed to find a channel. Change-Id: I423ddda9d1b0c3b4eabcc21d487cfd2e0e895d40 CRs-fixed: 758178
-rw-r--r--CORE/SAP/src/sapApiLinkCntl.c44
-rw-r--r--CORE/SAP/src/sapFsm.c8
-rw-r--r--CORE/SAP/src/sapFsm_ext.h1
3 files changed, 14 insertions, 39 deletions
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c
index 2f84fe876850..a6970407d638 100644
--- a/CORE/SAP/src/sapApiLinkCntl.c
+++ b/CORE/SAP/src/sapApiLinkCntl.c
@@ -142,10 +142,6 @@ WLANSAP_ScanCallback
tpAniSirGlobal pMac = NULL;
v_U32_t vhtChannelWidth;
#ifdef SOFTAP_CHANNEL_RANGE
-#if !defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) && \
- !defined(WLAN_FEATURE_MBSSID)
- v_U32_t operatingBand;
-#endif
v_U32_t event;
#endif
@@ -204,43 +200,15 @@ WLANSAP_ScanCallback
if (operChannel == SAP_CHANNEL_NOT_SELECTED)
#ifdef SOFTAP_CHANNEL_RANGE
{
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
- "%s: No suitable channel selected",
- __func__);
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ "%s: No suitable channel selected due to DFS, LTE-Coex and "
+ "Concurrent mode restrictions", __func__);
if ( eCSR_BAND_ALL == psapContext->scanBandPreference ||
psapContext->allBandScanned == eSAP_TRUE)
{
-#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || \
- defined(WLAN_FEATURE_MBSSID)
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- "%s: ACS failed due to concurrent mode restrictions.. \n"
- "Setting SAP channel to default ch (%d)", __func__,
- SAP_DEFAULT_24GHZ_CHANNEL);
- /* If there is no valid channel in the selected ACS range select
- * default 2.4GHz channel only. 5GHz channels were purposely
- * avoided due to DFS and Concurrent mode restrictions
- */
- psapContext->channel = SAP_DEFAULT_24GHZ_CHANNEL;
-#else
-
- if(psapContext->channelList != NULL)
- {
- psapContext->channel = psapContext->channelList[0];
- }
- else
- {
- /* if the channel list is empty then there is no valid channel
- in the selected sub-band so select default channel in the
- BAND(2.4GHz/5GHZ) */
- ccmCfgGetInt( halHandle,
- WNI_CFG_SAP_CHANNEL_SELECT_OPERATING_BAND, &operatingBand);
- if(eSAP_RF_SUBBAND_2_4_GHZ == operatingBand )
- psapContext->channel = SAP_DEFAULT_24GHZ_CHANNEL;
- else
- psapContext->channel = SAP_DEFAULT_5GHZ_CHANNEL;
- }
-#endif
+ psapContext->sapsMachine = eSAP_CH_SELECT;
+ event = eSAP_CHANNEL_SELECTION_FAILED;
}
else
{
@@ -255,7 +223,7 @@ WLANSAP_ScanCallback
psapContext->allBandScanned = eSAP_TRUE;
//go back to DISCONNECT state, scan next band
psapContext->sapsMachine = eSAP_DISCONNECTED;
- event = eSAP_CHANNEL_SELECTION_FAILED;
+ event = eSAP_CHANNEL_SELECTION_RETRY;
}
}
#else
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 7241c5a8f4f2..dd78a44146de 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -3224,7 +3224,7 @@ sapFsm
vosStatus = sap_CacStartNotify(hHal);
}
- else if (msg == eSAP_CHANNEL_SELECTION_FAILED)
+ else if (msg == eSAP_CHANNEL_SELECTION_RETRY)
{
/* Set SAP device role */
sapContext->sapsMachine = eSAP_CH_SELECT;
@@ -3418,6 +3418,12 @@ sapFsm
}
vosStatus = sapGotoStarting( sapContext, sapEvent, eCSR_BSS_TYPE_INFRA_AP);
}
+ else if (msg == eSAP_CHANNEL_SELECTION_FAILED) {
+ sapContext->sapsMachine = eSAP_DISCONNECTED;
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ "\n\n***In %s, Cannot start BSS, ACS Fail***\n\n",
+ __func__);
+ }
else
{
VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, "In %s, in state %s, invalid event msg %d",
diff --git a/CORE/SAP/src/sapFsm_ext.h b/CORE/SAP/src/sapFsm_ext.h
index 58d77e527428..23c806d0de24 100644
--- a/CORE/SAP/src/sapFsm_ext.h
+++ b/CORE/SAP/src/sapFsm_ext.h
@@ -55,6 +55,7 @@ typedef enum
eSAP_DFS_CHANNEL_CAC_END,
eSAP_DFS_CHNL_SWITCH_ANNOUNCEMENT_START,
eSAP_OPERATING_CHANNEL_CHANGED,
+ eSAP_CHANNEL_SELECTION_RETRY,
eSAP_NO_MSG
}eSapMsg_t;