qcacld-2.0: Skip channel validation in case of acs

As per current implementaion whenever ACS is enabled via
INI all the update beacon from cfg80211 module fails because
sapconfig channel points to AUTO_CHANNEL_SELECT(0).

When driver ACS is enabled skip channel validation to fix
this issue.

Change-Id: Ie3e7d19332629fc860752b2240690fd6a15bb0a2
CRs-Fixed: 977101
This commit is contained in:
Arun Khandavalli 2016-02-15 15:05:49 +05:30 committed by syphyr
parent baf02223fb
commit e70758eb5b
1 changed files with 21 additions and 16 deletions

View File

@ -11835,23 +11835,28 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
}
}
if(VOS_STATUS_SUCCESS != wlan_hdd_validate_operation_channel(pHostapdAdapter,pConfig->channel))
{
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: Invalid Channel [%d]", __func__, pConfig->channel);
ret = -EINVAL;
/*
* If auto channel is configured i.e. channel is 0,
* so skip channel validation.
*/
if (AUTO_CHANNEL_SELECT != pConfig->channel) {
if (VOS_STATUS_SUCCESS != wlan_hdd_validate_operation_channel
(pHostapdAdapter,pConfig->channel)) {
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: Invalid Channel [%d]", __func__, pConfig->channel);
ret = -EINVAL;
goto error;
}
/* reject SAP if DFS channel scan is not allowed */
if ((pHddCtx->cfg_ini->enableDFSChnlScan == false) &&
(NV_CHANNEL_DFS ==
vos_nv_getChannelEnabledState(pConfig->channel))) {
hddLog(LOGE, FL("not allowed to start SAP on DFS channel"));
ret = -EOPNOTSUPP;
goto error;
}
/* reject SAP if DFS channel scan is not allowed */
if ((pHddCtx->cfg_ini->enableDFSChnlScan == false) &&
(NV_CHANNEL_DFS ==
vos_nv_getChannelEnabledState(pConfig->channel))) {
hddLog(LOGE, FL("not allowed to start SAP on DFS channel"));
ret = -EOPNOTSUPP;
goto error;
}
}
}
/*
* Set the JAPAN W53 disabled INI param
* in to SAP DFS for restricting these