qcacmn: support of common wmi rx event handling for common wmi layer
Remove hard-coded rx execution context of wmi event callbacks. UMAC layer needs to register execution context while registering events with wmi layer. Execute wmi rx event callbacks in following context- 1) work queue context provided by wmi layer. 2) umac provided context, umac can choose to execute in thread context or default tasklet context based on umac implementation. CRs-Fixed: 978619 Change-Id: Id9b1f1e5157e8a203f93a62791f85a8145cc1599
This commit is contained in:
@@ -51,11 +51,9 @@ typedef cdf_nbuf_t wmi_buf_t;
|
||||
* @wma_process_fw_event_handler_cbk: generic event handler callback
|
||||
*/
|
||||
struct wmi_rx_ops {
|
||||
void (*service_ready_cbk)(void *ctx, void *ev);
|
||||
void (*service_ready_ext_cbk)(void *ctx, void *ev);
|
||||
void (*ready_cbk)(void *ctx, void *ev);
|
||||
|
||||
int (*wma_process_fw_event_handler_cbk)(void *ctx,
|
||||
void *ev);
|
||||
void *ev, uint8_t rx_ctx);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -69,6 +67,17 @@ enum wmi_target_type {
|
||||
WMI_NON_TLV_TARGET
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wmi_rx_exec_ctx - wmi rx execution context
|
||||
* @WMI_RX_WORK_CTX: work queue context execution provided by WMI layer
|
||||
* @WMI_RX_UMAC_CTX: execution context provided by umac layer
|
||||
*
|
||||
*/
|
||||
enum wmi_rx_exec_ctx {
|
||||
WMI_RX_WORK_CTX,
|
||||
WMI_RX_UMAC_CTX
|
||||
};
|
||||
|
||||
/**
|
||||
* attach for unified WMI
|
||||
*
|
||||
@@ -126,17 +135,21 @@ wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
|
||||
WMI_CMD_ID cmd_id);
|
||||
|
||||
/**
|
||||
* WMI event handler register function
|
||||
* wmi_unified_register_event_handler() - WMI event handler
|
||||
* registration function
|
||||
*
|
||||
* @wmi_handle: handle to WMI.
|
||||
* @event_id: WMI event ID
|
||||
* @handler_func: Event handler call back function
|
||||
* @rx_ctx: rx event processing context
|
||||
*
|
||||
* @param wmi_handle : handle to WMI.
|
||||
* @param event_id : WMI event ID
|
||||
* @param handler_func : Event handler call back function
|
||||
* @return 0 on success and -ve on failure.
|
||||
*/
|
||||
int
|
||||
wmi_unified_register_event_handler(wmi_unified_t wmi_handle,
|
||||
WMI_EVT_ID event_id,
|
||||
wmi_unified_event_handler handler_func);
|
||||
wmi_unified_event_handler handler_func,
|
||||
uint8_t rx_ctx);
|
||||
|
||||
/**
|
||||
* WMI event handler unregister function
|
||||
@@ -179,7 +192,6 @@ int wmi_get_pending_cmds(wmi_unified_t wmi_handle);
|
||||
/**
|
||||
WMI API to set target suspend state
|
||||
*/
|
||||
|
||||
void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val);
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
@@ -198,6 +210,7 @@ static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* WMA Callback to process fw event.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user