qcacmn: Correct the return types of functions in HIF component
A few functions in HIF component returns QDF status value with return type as non QDF STATUS and vice versa. For such functions, update the correct return type. Change-Id: Ifc1068d60e62f7405a15e2b4f0738d91243bd6de CRs-Fixed: 2734818
This commit is contained in:
parent
a143607a26
commit
cb2acc0ea0
@ -1268,11 +1268,31 @@ typedef uint32_t (*ext_intr_handler)(void *, uint32_t);
|
||||
int32_t hif_get_int_ctx_irq_num(struct hif_opaque_softc *softc,
|
||||
uint8_t id);
|
||||
|
||||
uint32_t hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx);
|
||||
uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx,
|
||||
uint32_t numirq, uint32_t irq[], ext_intr_handler handler,
|
||||
void *cb_ctx, const char *context_name,
|
||||
enum hif_exec_type type, uint32_t scale);
|
||||
/**
|
||||
* hif_configure_ext_group_interrupts() - Congigure ext group intrrupts
|
||||
* @hif_ctx: hif opaque context
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx);
|
||||
|
||||
/**
|
||||
* hif_register_ext_group() - API to register external group
|
||||
* interrupt handler.
|
||||
* @hif_ctx : HIF Context
|
||||
* @numirq: number of irq's in the group
|
||||
* @irq: array of irq values
|
||||
* @handler: callback interrupt handler function
|
||||
* @cb_ctx: context to passed in callback
|
||||
* @type: napi vs tasklet
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_register_ext_group(struct hif_opaque_softc *hif_ctx,
|
||||
uint32_t numirq, uint32_t irq[],
|
||||
ext_intr_handler handler,
|
||||
void *cb_ctx, const char *context_name,
|
||||
enum hif_exec_type type, uint32_t scale);
|
||||
|
||||
void hif_deregister_exec_group(struct hif_opaque_softc *hif_ctx,
|
||||
const char *context_name);
|
||||
|
@ -3867,7 +3867,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *hif_hdl, uint16_t svc_id,
|
||||
uint8_t *ul_pipe, uint8_t *dl_pipe, int *ul_is_polled,
|
||||
int *dl_is_polled)
|
||||
{
|
||||
int status = QDF_STATUS_E_INVAL;
|
||||
int status = -EINVAL;
|
||||
unsigned int i;
|
||||
struct service_to_pipe element;
|
||||
struct service_to_pipe *tgt_svc_map_to_use;
|
||||
@ -3896,7 +3896,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *hif_hdl, uint16_t svc_id,
|
||||
*dl_pipe = element.pipenum;
|
||||
dl_updated = true;
|
||||
}
|
||||
status = QDF_STATUS_SUCCESS;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
if (ul_updated == false)
|
||||
@ -4186,7 +4186,7 @@ void hif_wlan_disable(struct hif_softc *scn)
|
||||
|
||||
int hif_get_wake_ce_id(struct hif_softc *scn, uint8_t *ce_id)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
int status;
|
||||
uint8_t ul_pipe, dl_pipe;
|
||||
int ul_is_polled, dl_is_polled;
|
||||
|
||||
@ -4197,7 +4197,7 @@ int hif_get_wake_ce_id(struct hif_softc *scn, uint8_t *ce_id)
|
||||
&ul_is_polled, &dl_is_polled);
|
||||
if (status) {
|
||||
HIF_ERROR("%s: failed to map pipe: %d", __func__, status);
|
||||
return qdf_status_to_os_return(status);
|
||||
return status;
|
||||
}
|
||||
|
||||
*ce_id = dl_pipe;
|
||||
|
@ -621,7 +621,7 @@ ce_cancel_send_next_srng(struct CE_handle *copyeng,
|
||||
uint32_t *toeplitz_hash_result)
|
||||
{
|
||||
struct CE_state *CE_state;
|
||||
int status = QDF_STATUS_E_FAILURE;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct CE_ring_state *src_ring;
|
||||
unsigned int nentries_mask;
|
||||
unsigned int sw_index;
|
||||
|
@ -168,13 +168,13 @@ int hif_dummy_bus_configure(struct hif_softc *hif_sc)
|
||||
* @config: configuration value to set
|
||||
* @config_len: configuration length
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
*/
|
||||
QDF_STATUS
|
||||
hif_dummy_get_config_item(struct hif_softc *hif_sc,
|
||||
int opcode, void *config, uint32_t config_len)
|
||||
{
|
||||
return 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -710,7 +710,7 @@ void hif_config_irq_set_perf_affinity_hint(
|
||||
qdf_export_symbol(hif_config_irq_set_perf_affinity_hint);
|
||||
#endif
|
||||
|
||||
uint32_t hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx)
|
||||
QDF_STATUS hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_ctx);
|
||||
@ -840,12 +840,13 @@ void hif_exec_kill(struct hif_opaque_softc *hif_ctx)
|
||||
* @cb_ctx: context to passed in callback
|
||||
* @type: napi vs tasklet
|
||||
*
|
||||
* Return: status
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx,
|
||||
uint32_t numirq, uint32_t irq[], ext_intr_handler handler,
|
||||
void *cb_ctx, const char *context_name,
|
||||
enum hif_exec_type type, uint32_t scale)
|
||||
QDF_STATUS hif_register_ext_group(struct hif_opaque_softc *hif_ctx,
|
||||
uint32_t numirq, uint32_t irq[],
|
||||
ext_intr_handler handler,
|
||||
void *cb_ctx, const char *context_name,
|
||||
enum hif_exec_type type, uint32_t scale)
|
||||
{
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn);
|
||||
|
@ -662,7 +662,7 @@ QDF_STATUS hif_ipci_enable_bus(struct hif_softc *ol_sc,
|
||||
if (ret) {
|
||||
HIF_ERROR("%s: failed to set dma mask error = %d",
|
||||
__func__, ret);
|
||||
return ret;
|
||||
return qdf_status_from_os_return(ret);
|
||||
}
|
||||
|
||||
sc->dev = dev;
|
||||
@ -687,11 +687,10 @@ QDF_STATUS hif_ipci_enable_bus(struct hif_softc *ol_sc,
|
||||
|
||||
if (!ol_sc->mem_pa) {
|
||||
HIF_ERROR("%s: ERROR - BAR0 uninitialized", __func__);
|
||||
ret = -EIO;
|
||||
return QDF_STATUS_E_ABORTED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
bool hif_ipci_needs_bmi(struct hif_softc *scn)
|
||||
|
@ -1434,7 +1434,7 @@ static int hif_set_hia(struct hif_softc *scn)
|
||||
NULL, NULL);
|
||||
|
||||
if (ADRASTEA_BU)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
return 0;
|
||||
|
||||
#ifdef QCA_WIFI_3_0
|
||||
i = 0;
|
||||
@ -1666,7 +1666,7 @@ static int hif_set_hia(struct hif_softc *scn)
|
||||
|
||||
done:
|
||||
|
||||
return rv;
|
||||
return qdf_status_to_os_return(rv);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3403,7 +3403,7 @@ again:
|
||||
hif_vote_link_up(hif_hdl);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
err_tgtstate:
|
||||
hif_disable_pci(sc);
|
||||
@ -3421,7 +3421,7 @@ err_enable_pci:
|
||||
qdf_mdelay(delay_time);
|
||||
goto again;
|
||||
}
|
||||
return ret;
|
||||
return qdf_status_from_os_return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,9 +47,9 @@
|
||||
*
|
||||
* Enables hif device interrupts
|
||||
*
|
||||
* Return: int
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
uint32_t hif_start(struct hif_opaque_softc *hif_ctx)
|
||||
QDF_STATUS hif_start(struct hif_opaque_softc *hif_ctx)
|
||||
{
|
||||
struct hif_sdio_softc *scn = HIF_GET_SDIO_SOFTC(hif_ctx);
|
||||
struct hif_sdio_dev *hif_device = scn->hif_handle;
|
||||
@ -128,8 +128,8 @@ QDF_STATUS hif_send_head(struct hif_opaque_softc *hif_ctx, uint8_t pipe,
|
||||
* hif_map_service_to_pipe() - maps ul/dl pipe to service id.
|
||||
* @hif_ctx: HIF hdl
|
||||
* @ServiceId: sevice index
|
||||
* @ULPipe: uplink pipe id
|
||||
* @DLPipe: down-linklink pipe id
|
||||
* @ul_pipe: uplink pipe id
|
||||
* @dl_pipe: down-linklink pipe id
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
*
|
||||
@ -142,21 +142,18 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *hif_hdl,
|
||||
{
|
||||
struct hif_sdio_softc *scn = HIF_GET_SDIO_SOFTC(hif_hdl);
|
||||
struct hif_sdio_dev *hif_device = scn->hif_handle;
|
||||
QDF_STATUS status;
|
||||
|
||||
return hif_dev_map_service_to_pipe(hif_device,
|
||||
service_id, ul_pipe, dl_pipe);
|
||||
status = hif_dev_map_service_to_pipe(hif_device,
|
||||
service_id, ul_pipe, dl_pipe);
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_map_service_to_pipe() - maps ul/dl pipe to service id.
|
||||
* hif_get_default_pipe() - get default pipe
|
||||
* @scn: HIF context
|
||||
* @ServiceId: sevice index
|
||||
* @ULPipe: uplink pipe id
|
||||
* @DLPipe: down-linklink pipe id
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: int
|
||||
* @ul_pipe: uplink pipe id
|
||||
* @dl_pipe: down-linklink pipe id
|
||||
*/
|
||||
void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ul_pipe,
|
||||
uint8_t *dl_pipe)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -494,7 +494,7 @@ void hif_get_default_pipe(struct hif_opaque_softc *scn, uint8_t *ul_pipe,
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success else an appropriate QDF_STATUS error
|
||||
* Return: status
|
||||
*/
|
||||
int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
uint8_t *ul_pipe, uint8_t *dl_pipe,
|
||||
@ -530,7 +530,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
#else
|
||||
|
||||
@ -549,7 +549,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
* @ul_is_polled: if ul is polling based
|
||||
* @ul_is_polled: if dl is polling based
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success else an appropriate QDF_STATUS error
|
||||
* Return: status
|
||||
*/
|
||||
int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
uint8_t *ul_pipe, uint8_t *dl_pipe,
|
||||
@ -614,7 +614,7 @@ int hif_map_service_to_pipe(struct hif_opaque_softc *scn, uint16_t svc_id,
|
||||
break;
|
||||
}
|
||||
|
||||
return status;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@ -106,6 +106,7 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
|
||||
uint16_t conn_flags;
|
||||
uint16_t rsp_msg_id, rsp_msg_serv_id, rsp_msg_max_msg_size;
|
||||
uint8_t rsp_msg_status, rsp_msg_end_id, rsp_msg_serv_meta_len;
|
||||
int ret;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,
|
||||
("+htc_connect_service, target:%pK SvcID:0x%X\n", target,
|
||||
@ -350,12 +351,13 @@ QDF_STATUS htc_connect_service(HTC_HANDLE HTCHandle,
|
||||
pEndpoint->EpCallBacks = pConnectReq->EpCallbacks;
|
||||
pEndpoint->async_update = 0;
|
||||
|
||||
status = hif_map_service_to_pipe(target->hif_dev,
|
||||
pEndpoint->service_id,
|
||||
&pEndpoint->UL_PipeID,
|
||||
&pEndpoint->DL_PipeID,
|
||||
&pEndpoint->ul_is_polled,
|
||||
&pEndpoint->dl_is_polled);
|
||||
ret = hif_map_service_to_pipe(target->hif_dev,
|
||||
pEndpoint->service_id,
|
||||
&pEndpoint->UL_PipeID,
|
||||
&pEndpoint->DL_PipeID,
|
||||
&pEndpoint->ul_is_polled,
|
||||
&pEndpoint->dl_is_polled);
|
||||
status = qdf_status_from_os_return(ret);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user