Merge "Revert "wlan: Channel avoidance is not working inside Screen room""
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c
index 631df4d..e5447cf 100644
--- a/CORE/SAP/src/sapApiLinkCntl.c
+++ b/CORE/SAP/src/sapApiLinkCntl.c
@@ -99,9 +99,6 @@
/*----------------------------------------------------------------------------
* Externalized Function Definitions
* -------------------------------------------------------------------------*/
-#ifdef FEATURE_WLAN_CH_AVOID
- extern safeChannelType safeChannels[];
-#endif /* FEATURE_WLAN_CH_AVOID */
/*----------------------------------------------------------------------------
* Function Declarations and Documentation
@@ -164,19 +161,6 @@
BAND(2.4GHz) as 2.4 channels are available in all the
countries*/
psapContext->channel = SAP_DEFAULT_CHANNEL;
-
-#ifdef FEATURE_WLAN_CH_AVOID
- for( i = 0; i < NUM_20MHZ_RF_CHANNELS; i++ )
- {
- if((NV_CHANNEL_ENABLE ==
- vos_nv_getChannelEnabledState(safeChannels[i].channelNumber))
- && (VOS_TRUE == safeChannels[i].isSafe))
- {
- psapContext->channel = safeChannels[i].channelNumber;
- break;
- }
- }
-#endif
}
}
else
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index 6381bb1..6d8977d 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -261,10 +261,6 @@
tHalHandle hHal;
tANI_U8 channel;
-#ifdef FEATURE_WLAN_CH_AVOID
- v_U8_t i;
-#endif
-
hHal = (tHalHandle)vos_get_context( VOS_MODULE_ID_SME, sapContext->pvosGCtx);
if (NULL == hHal)
{
@@ -351,33 +347,14 @@
sapContext->channel);
/* In case of error, switch to default channel */
sapContext->channel = SAP_DEFAULT_CHANNEL;
+
#ifdef SOFTAP_CHANNEL_RANGE
if(sapContext->channelList != NULL)
{
- for ( i = 0 ; i < sapContext->numofChannel ; i++)
- if (NV_CHANNEL_ENABLE ==
- vos_nv_getChannelEnabledState(sapContext->channelList[i]))
- {
- sapContext->channel = sapContext->channelList[i];
- }
- vos_mem_free(sapContext->channelList);
- sapContext->channelList = NULL;
+ sapContext->channel = sapContext->channelList[0];
+ vos_mem_free(sapContext->channelList);
+ sapContext->channelList = NULL;
}
-#ifdef FEATURE_WLAN_CH_AVOID
- else
- {
- for( i = 0; i < NUM_20MHZ_RF_CHANNELS; i++ )
- {
- if((NV_CHANNEL_ENABLE ==
- vos_nv_getChannelEnabledState(safeChannels[i].channelNumber))
- && (VOS_TRUE == safeChannels[i].isSafe))
- {
- sapContext->channel = safeChannels[i].channelNumber;
- break;
- }
- }
- }
-#endif
#endif
/* Fill in the event structure */
sapEventInit(sapEvent);