summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kumar <quic_rajekuma@quicinc.com>2019-06-04 12:03:20 +0530
committerSunil Ravi <sunilravi@google.com>2019-07-02 00:45:24 +0000
commit3ea58d0f8321f0448efd2d75ec237a3c9885e4c0 (patch)
treee28ef3baac48aaa60b5de39d3453a79243f351bc
parent7d4b05ac12d6a1b5d5247da35ae7e370a2cba07d (diff)
downloadqca-wfi-host-cmn-3ea58d0f8321f0448efd2d75ec237a3c9885e4c0.tar.gz
qcacmn: Remove the unused varibale status from skip dfs API
Remove the unused varibale status, which is not initialized, and hence returning of that varibale without any assignment can lead to the API returning a non zero status (garbage value as it is not initialized) which can lead to SAP restart fail due to unsafe channel event received. Fix is to remove the variable, and directly return success. Change-Id: Ieabc820ffcee0489877e1c333ec4049c66f6884a CRs-Fixed: 2453167 Bug: 135637196 Signed-off-by: Rajeev Kumar <quic_rajekuma@quicinc.com>
-rw-r--r--umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c
index a42f133f9..9f35f0903 100644
--- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c
+++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c
@@ -335,8 +335,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;
- QDF_STATUS status;
+ bool dfs_master_capable;
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
@@ -352,21 +351,18 @@ 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;
}
/**