qcacmn: Change return type to QDF_STATUS

wmi_unified_register_event has a return type of QDF_STATUS.
Handle the same return type in the following callers:

1. target_if_dfs_reg_ocac_event
2. target_if_dfs_reg_offload_events
3. target_if_reg_phyerr_events_dfs2

Change-Id: I622f6f6c4ff3b428a6407b6526e823083cc1fd8a
CRs-Fixed: 2767507
This commit is contained in:
Hariharan Basuthkar 2020-09-01 21:23:12 +05:30 • committed by snandini
commit 547c60d7d7
2 changed files with 10 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -172,7 +172,7 @@ static int target_if_radar_event_handler(
static QDF_STATUS target_if_reg_phyerr_events_dfs2(
struct wlan_objmgr_psoc *psoc)
{
int ret;
QDF_STATUS ret;
wmi_unified_t wmi_handle;
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
@ -184,7 +184,7 @@ static QDF_STATUS target_if_reg_phyerr_events_dfs2(
ret = wmi_unified_register_event(wmi_handle,
wmi_dfs_radar_event_id,
target_if_radar_event_handler);
if (ret) {
if (QDF_IS_STATUS_ERROR(ret)) {
target_if_err("failed to register wmi_dfs_radar_event_id");
return QDF_STATUS_E_FAILURE;
}

View file

@ -256,10 +256,10 @@ static int target_if_dfs_radar_detection_event_handler(
* for full offload.
* @psoc: Pointer to psoc object.
*
* Return: 0 on successful registration.
* Return: QDF_STATUS_SUCCESS on successful registration.
*/
#if defined(QCA_SUPPORT_AGILE_DFS)
static int target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
static QDF_STATUS target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
{
return wmi_unified_register_event(
get_wmi_unified_hdl_from_psoc(psoc),
@ -267,9 +267,9 @@ static int target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
target_if_dfs_ocac_complete_event_handler);
}
#else
static int target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
static QDF_STATUS target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
{
return 0;
return QDF_STATUS_SUCCESS;
}
#endif
@ -277,7 +277,7 @@ static int target_if_dfs_reg_ocac_event(struct wlan_objmgr_psoc *psoc)
QDF_STATUS target_if_dfs_reg_offload_events(
struct wlan_objmgr_psoc *psoc)
{
int ret1, ret2, ret3;
QDF_STATUS ret1, ret2, ret3;
ret1 = wmi_unified_register_event(
get_wmi_unified_hdl_from_psoc(psoc),
@ -294,7 +294,8 @@ QDF_STATUS target_if_dfs_reg_offload_events(
ret3 = target_if_dfs_reg_ocac_event(psoc);
target_if_debug("wmi_vdev_ocac_complete_event_id ret=%d", ret3);
if (ret1 || ret2 || ret3)
if (QDF_IS_STATUS_ERROR(ret1) || QDF_IS_STATUS_ERROR(ret2) ||
QDF_IS_STATUS_ERROR(ret3))
return QDF_STATUS_E_FAILURE;
else
return QDF_STATUS_SUCCESS;