qcacmn: Add hif_ctx to fastpath_cb_register api
Hif apis can't rely on a global context. Change-Id: I2cad80573fc0102f210bb0f7c3f9e22c5f8e16f9 CRs-Fixed: 1009274
此提交包含在:

提交者
Gerrit - the friendly Code Review server

父節點
fa260aa2eb
當前提交
127467f040
@@ -311,9 +311,11 @@ typedef void (*fastpath_msg_handler)(void *, qdf_nbuf_t *, uint32_t);
|
||||
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);
|
||||
int hif_ce_fastpath_cb_register(fastpath_msg_handler handler, void *context);
|
||||
int 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(fastpath_msg_handler handler,
|
||||
static inline int hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler,
|
||||
void *context)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
@@ -48,7 +48,6 @@
|
||||
#include "ce_tasklet.h"
|
||||
#include "platform_icnss.h"
|
||||
#include "qwlan_version.h"
|
||||
#include <cds_api.h>
|
||||
|
||||
#define CE_POLL_TIMEOUT 10 /* ms */
|
||||
|
||||
@@ -1960,11 +1959,12 @@ err:
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success or QDF_STATUS_E_FAILURE
|
||||
*/
|
||||
int hif_ce_fastpath_cb_register(fastpath_msg_handler handler, void *context)
|
||||
int hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
|
||||
fastpath_msg_handler handler,
|
||||
void *context)
|
||||
{
|
||||
struct hif_softc *scn =
|
||||
(struct hif_softc *)cds_get_context(QDF_MODULE_ID_HIF);
|
||||
struct CE_state *ce_state;
|
||||
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
|
||||
int i;
|
||||
|
||||
QDF_ASSERT(scn != NULL);
|
||||
|
新增問題並參考
封鎖使用者