From 9135ea57b623f3d3983bf0ed1f5da9f15f64817e Mon Sep 17 00:00:00 2001 From: lifeng Date: Wed, 25 Oct 2017 12:33:12 +0800 Subject: qcacld-2.0: Enable survey dump on SAP Since the survery dump work normally only when the device is in STA and associated with one AP, extend the feature in SAP mode now. Change-Id: Id8fa75ff91b2a1d6caf487c03b53e0637e907b60 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 25 ++++++++++++------------- CORE/SME/src/sme_common/sme_Api.c | 1 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index fa19cf1c8bc0..4dcfff97eefd 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -30897,8 +30897,8 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, if (0 != status) return status; - if ((NULL == pHddCtx->chan_info) && - (pHddCtx->cfg_ini->fEnableSNRMonitoring)) { + if ((NULL == pHddCtx->chan_info) || + (0 == pHddCtx->cfg_ini->fEnableSNRMonitoring)) { hddLog(LOGE, FL("chan_info is NULL")); return -EINVAL; } @@ -30908,19 +30908,18 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy, return -EINVAL; } - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); + if (WLAN_HDD_INFRA_STATION == pAdapter->device_mode) { + pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); - if (0 == pHddCtx->cfg_ini->fEnableSNRMonitoring || - eConnectionState_Associated != pHddStaCtx->conn_info.connState) - { - return -ENONET; - } + if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) + return -ENONET; - if (VOS_TRUE == pHddStaCtx->hdd_ReassocScenario) - { - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, - "%s: Roaming in progress, hence return ", __func__); - return -ENONET; + if (VOS_TRUE == pHddStaCtx->hdd_ReassocScenario) + { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, + "%s: Roaming in progress, hence return ", __func__); + return -ENONET; + } } halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter); diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 4f5f76a41553..8fd2e3098029 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -5177,6 +5177,7 @@ eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam) pMac->roam.configParam.sta_roam_policy.dfs_mode; pParam->csrConfig.sta_roam_policy_params.skip_unsafe_channels = pMac->roam.configParam.sta_roam_policy.skip_unsafe_channels; + pParam->snr_monitor_enabled = pMac->snr_monitor_enabled; pParam->sub20_config_info = pMac->sub20_config_info; pParam->sub20_channelwidth = pMac->sub20_channelwidth; pParam->sub20_dynamic_channelwidth = pMac->sub20_dynamic_channelwidth; -- cgit v1.2.3