qcacmn: Correct the return types of HIF functions
A few functions in HIF component returns QDF status value with return type as non QDF STATUS. For such functions, update the return type as QDF_STATUS. Change-Id: I69644a2206266ffe2c2d105056f9fec452f5d972 CRs-Fixed: 2734818
This commit is contained in:

committed by
snandini

parent
30f2d61e6d
commit
b87eec2b53
@@ -665,15 +665,25 @@ bool hif_is_polled_mode_enabled(struct hif_opaque_softc *hif_ctx);
|
||||
void hif_enable_fastpath(struct hif_opaque_softc *hif_ctx);
|
||||
bool hif_is_fastpath_mode_enabled(struct hif_opaque_softc *hif_ctx);
|
||||
void *hif_get_ce_handle(struct hif_opaque_softc *hif_ctx, int ret);
|
||||
int hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
|
||||
/**
|
||||
* hif_ce_fastpath_cb_register() - Register callback for fastpath msg handler
|
||||
* @handler: Callback funtcion
|
||||
* @context: handle for callback function
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E_FAILURE
|
||||
*/
|
||||
QDF_STATUS hif_ce_fastpath_cb_register(
|
||||
struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler, void *context);
|
||||
#else
|
||||
static inline int hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler,
|
||||
void *context)
|
||||
static inline QDF_STATUS hif_ce_fastpath_cb_register(
|
||||
struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler, void *context)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static inline void *hif_get_ce_handle(struct hif_opaque_softc *hif_ctx, int ret)
|
||||
{
|
||||
return NULL;
|
||||
|
@@ -143,13 +143,13 @@ struct CE_attr;
|
||||
* nbytes - number of bytes to send
|
||||
* transfer_id - arbitrary ID; reflected to destination
|
||||
* flags - CE_SEND_FLAG_* values
|
||||
* Returns 0 on success; otherwise an error status.
|
||||
* Returns QDF_STATUS.
|
||||
*
|
||||
* Note: If no flags are specified, use CE's default data swap mode.
|
||||
*
|
||||
* Implementation note: pushes 1 buffer to Source ring
|
||||
*/
|
||||
int ce_send(struct CE_handle *copyeng,
|
||||
QDF_STATUS ce_send(struct CE_handle *copyeng,
|
||||
void *per_transfer_send_context,
|
||||
qdf_dma_addr_t buffer,
|
||||
unsigned int nbytes,
|
||||
@@ -194,8 +194,17 @@ unsigned int ce_sendlist_sizeof(void);
|
||||
/* Initialize a sendlist */
|
||||
void ce_sendlist_init(struct ce_sendlist *sendlist);
|
||||
|
||||
/* Append a simple buffer (address/length) to a sendlist. */
|
||||
int ce_sendlist_buf_add(struct ce_sendlist *sendlist,
|
||||
/**
|
||||
* ce_sendlist_buf_add() - Append a simple buffer (address/length) to a sendlist
|
||||
* @sendlist: Sendlist
|
||||
* @buffer: buffer
|
||||
* @nbytes: numer of bytes to append
|
||||
* @flags: flags
|
||||
* @user_flags: user flags
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS ce_sendlist_buf_add(struct ce_sendlist *sendlist,
|
||||
qdf_dma_addr_t buffer,
|
||||
unsigned int nbytes,
|
||||
/* OR-ed with internal flags */
|
||||
@@ -203,16 +212,18 @@ int ce_sendlist_buf_add(struct ce_sendlist *sendlist,
|
||||
uint32_t user_flags);
|
||||
|
||||
/*
|
||||
* Queue a "sendlist" of buffers to be sent using gather to a single
|
||||
* anonymous destination buffer
|
||||
* copyeng - which copy engine to use
|
||||
* sendlist - list of simple buffers to send using gather
|
||||
* transfer_id - arbitrary ID; reflected to destination
|
||||
* Returns 0 on success; otherwise an error status.
|
||||
* ce_sendlist_send() - Queue a "sendlist" of buffers to be sent using gather to
|
||||
* a single anonymous destination buffer
|
||||
* @copyeng: which copy engine to use
|
||||
* @per_transfer_send_context: Per transfer send context
|
||||
* @sendlist: list of simple buffers to send using gather
|
||||
* @transfer_id: arbitrary ID; reflected to destination
|
||||
*
|
||||
* Implementation note: Pushes multiple buffers with Gather to Source ring.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
int ce_sendlist_send(struct CE_handle *copyeng,
|
||||
QDF_STATUS ce_sendlist_send(struct CE_handle *copyeng,
|
||||
void *per_transfer_send_context,
|
||||
struct ce_sendlist *sendlist,
|
||||
unsigned int transfer_id);
|
||||
@@ -499,16 +510,17 @@ struct ce_ops {
|
||||
int (*ce_ring_setup)(struct hif_softc *scn, uint8_t ring_type,
|
||||
uint32_t ce_id, struct CE_ring_state *ring,
|
||||
struct CE_attr *attr);
|
||||
int (*ce_send_nolock)(struct CE_handle *copyeng,
|
||||
QDF_STATUS (*ce_send_nolock)(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
qdf_dma_addr_t buffer,
|
||||
uint32_t nbytes,
|
||||
uint32_t transfer_id,
|
||||
uint32_t flags,
|
||||
uint32_t user_flags);
|
||||
int (*ce_sendlist_send)(struct CE_handle *copyeng,
|
||||
QDF_STATUS (*ce_sendlist_send)(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
struct ce_sendlist *sendlist, unsigned int transfer_id);
|
||||
struct ce_sendlist *sendlist,
|
||||
unsigned int transfer_id);
|
||||
QDF_STATUS (*ce_revoke_recv_next)(struct CE_handle *copyeng,
|
||||
void **per_CE_contextp,
|
||||
void **per_transfer_contextp,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-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
|
||||
@@ -134,7 +134,7 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
|
||||
struct CE_handle *ce_send_hdl = send_pipe_info->ce_hdl;
|
||||
qdf_dma_addr_t CE_request, CE_response = 0;
|
||||
struct BMI_transaction *transaction = NULL;
|
||||
int status = QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct HIF_CE_pipe_info *recv_pipe_info =
|
||||
&(hif_state->pipe_info[BMI_CE_NUM_TO_HOST]);
|
||||
struct CE_handle *ce_recv = recv_pipe_info->ce_hdl;
|
||||
|
@@ -2068,7 +2068,8 @@ hif_send_head(struct hif_opaque_softc *hif_ctx,
|
||||
struct CE_handle *ce_hdl = pipe_info->ce_hdl;
|
||||
int bytes = nbytes, nfrags = 0;
|
||||
struct ce_sendlist sendlist;
|
||||
int status, i = 0;
|
||||
int i = 0;
|
||||
QDF_STATUS status;
|
||||
unsigned int mux_id = 0;
|
||||
|
||||
if (nbytes > qdf_nbuf_len(nbuf)) {
|
||||
|
@@ -375,7 +375,7 @@ void war_ce_src_ring_write_idx_set(struct hif_softc *scn,
|
||||
|
||||
qdf_export_symbol(war_ce_src_ring_write_idx_set);
|
||||
|
||||
int
|
||||
QDF_STATUS
|
||||
ce_send(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
qdf_dma_addr_t buffer,
|
||||
@@ -385,7 +385,7 @@ ce_send(struct CE_handle *copyeng,
|
||||
uint32_t user_flag)
|
||||
{
|
||||
struct CE_state *CE_state = (struct CE_state *)copyeng;
|
||||
int status;
|
||||
QDF_STATUS status;
|
||||
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn);
|
||||
|
||||
qdf_spin_lock_bh(&CE_state->ce_index_lock);
|
||||
@@ -410,7 +410,7 @@ void ce_sendlist_init(struct ce_sendlist *sendlist)
|
||||
sl->num_items = 0;
|
||||
}
|
||||
|
||||
int
|
||||
QDF_STATUS
|
||||
ce_sendlist_buf_add(struct ce_sendlist *sendlist,
|
||||
qdf_dma_addr_t buffer,
|
||||
uint32_t nbytes,
|
||||
@@ -436,7 +436,7 @@ ce_sendlist_buf_add(struct ce_sendlist *sendlist,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
QDF_STATUS
|
||||
ce_sendlist_send(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
struct ce_sendlist *sendlist, unsigned int transfer_id)
|
||||
|
@@ -522,7 +522,7 @@ static inline bool ce_is_fastpath_enabled(struct hif_softc *scn)
|
||||
}
|
||||
#endif /* WLAN_FEATURE_FASTPATH */
|
||||
|
||||
static int
|
||||
static QDF_STATUS
|
||||
ce_send_nolock_legacy(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
qdf_dma_addr_t buffer,
|
||||
@@ -531,7 +531,7 @@ ce_send_nolock_legacy(struct CE_handle *copyeng,
|
||||
uint32_t flags,
|
||||
uint32_t user_flags)
|
||||
{
|
||||
int status;
|
||||
QDF_STATUS status;
|
||||
struct CE_state *CE_state = (struct CE_state *)copyeng;
|
||||
struct CE_ring_state *src_ring = CE_state->src_ring;
|
||||
uint32_t ctrl_addr = CE_state->ctrl_addr;
|
||||
@@ -622,12 +622,12 @@ ce_send_nolock_legacy(struct CE_handle *copyeng,
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
static QDF_STATUS
|
||||
ce_sendlist_send_legacy(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
struct ce_sendlist *sendlist, unsigned int transfer_id)
|
||||
{
|
||||
int status = -ENOMEM;
|
||||
QDF_STATUS status = QDF_STATUS_E_NOMEM;
|
||||
struct ce_sendlist_s *sl = (struct ce_sendlist_s *)sendlist;
|
||||
struct CE_state *CE_state = (struct CE_state *)copyeng;
|
||||
struct CE_ring_state *src_ring = CE_state->src_ring;
|
||||
|
@@ -132,7 +132,7 @@ void hif_record_ce_srng_desc_event(struct hif_softc *scn, int ce_id,
|
||||
}
|
||||
#endif /* HIF_CONFIG_SLUB_DEBUG_ON || HIF_CE_DEBUG_DATA_BUF */
|
||||
|
||||
static int
|
||||
static QDF_STATUS
|
||||
ce_send_nolock_srng(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
qdf_dma_addr_t buffer,
|
||||
@@ -141,7 +141,7 @@ ce_send_nolock_srng(struct CE_handle *copyeng,
|
||||
uint32_t flags,
|
||||
uint32_t user_flags)
|
||||
{
|
||||
int status;
|
||||
QDF_STATUS status;
|
||||
struct CE_state *CE_state = (struct CE_state *)copyeng;
|
||||
struct CE_ring_state *src_ring = CE_state->src_ring;
|
||||
unsigned int nentries_mask = src_ring->nentries_mask;
|
||||
@@ -215,12 +215,12 @@ ce_send_nolock_srng(struct CE_handle *copyeng,
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
static QDF_STATUS
|
||||
ce_sendlist_send_srng(struct CE_handle *copyeng,
|
||||
void *per_transfer_context,
|
||||
struct ce_sendlist *sendlist, unsigned int transfer_id)
|
||||
{
|
||||
int status = -ENOMEM;
|
||||
QDF_STATUS status = QDF_STATUS_E_NOMEM;
|
||||
struct ce_sendlist_s *sl = (struct ce_sendlist_s *)sendlist;
|
||||
struct CE_state *CE_state = (struct CE_state *)copyeng;
|
||||
struct CE_ring_state *src_ring = CE_state->src_ring;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018, 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
|
||||
@@ -56,7 +56,7 @@ qdf_export_symbol(hif_send_fast);
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E_FAILURE
|
||||
*/
|
||||
int hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
QDF_STATUS hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler,
|
||||
void *context)
|
||||
{
|
||||
|
@@ -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
|
||||
@@ -109,7 +109,7 @@ void hif_sdio_stop(struct hif_softc *hif_ctx)
|
||||
*
|
||||
* send tx data on a given pipe id
|
||||
*
|
||||
* Return: int
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS hif_send_head(struct hif_opaque_softc *hif_ctx, uint8_t pipe,
|
||||
uint32_t transfer_id, uint32_t nbytes, qdf_nbuf_t buf,
|
||||
|
Reference in New Issue
Block a user