qcacld-3.0: Remove redundant init and check in policy_mgr_skip_dfs_ch

Remove redundant initialization for local variable dfs_master_capable
and always pass check for skip_dfs_channel in policy_mgr_skip_dfs_ch.

Change-Id: Icf3ca4e297a54646114d414f1d0bd8543e59ea37
CRs-Fixed: 2482890
This commit is contained in:
Abhinav Kumar
2019-07-02 18:02:54 +05:30
committato da nshrivas
parent 9e2ddeb7cb
commit 182883df50

Vedi File

@@ -340,7 +340,7 @@ static QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
bool *skip_dfs_channel)
{
bool sta_sap_scc_on_dfs_chan;
bool dfs_master_capable = true;
bool dfs_master_capable;
QDF_STATUS status;
status = ucfg_mlme_get_dfs_master_capability(psoc,
@@ -355,21 +355,19 @@ static QDF_STATUS policy_mgr_skip_dfs_ch(struct wlan_objmgr_psoc *psoc,
policy_mgr_debug("skip DFS ch for SAP/Go dfs master cap %d",
dfs_master_capable);
*skip_dfs_channel = true;
return QDF_STATUS_SUCCESS;
}
if (!*skip_dfs_channel) {
sta_sap_scc_on_dfs_chan =
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
if ((policy_mgr_mode_specific_connection_count(psoc,
PM_STA_MODE,
NULL) > 0) &&
!sta_sap_scc_on_dfs_chan) {
policy_mgr_debug("SAP/Go skips DFS ch if sta connects");
*skip_dfs_channel = true;
}
sta_sap_scc_on_dfs_chan =
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
if ((policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
NULL) > 0) &&
!sta_sap_scc_on_dfs_chan) {
policy_mgr_debug("SAP/Go skips DFS ch if sta connects");
*skip_dfs_channel = true;
}
return status;
return QDF_STATUS_SUCCESS;
}
/**