qcacmn: Add raw buffer support in WMI layer

To send received raw event buffer to event handler
Send without processed buffer to registered event with buffer
type WMI_RX_RAW_BUFF

Change-Id: I2a401e2e7afbfd8f32d4bd521d184ed9ddcdb264
This commit is contained in:
aloksing
2020-08-05 16:27:25 +05:30
committed by snandini
parent b08f3994ef
commit f103f00807
4 changed files with 116 additions and 70 deletions

View File

@@ -163,6 +163,17 @@ enum wmi_rx_exec_ctx {
WMI_RX_SERIALIZER_CTX = 2
};
/**
* enum wmi_rx_buff_type - wmi rx event buffer type
* @WMI_RX_PROCESSED_BUFF: processed event buffer provided by WMI layer
* @WMI_RX_RAW_BUFF: raw event buffer provided by WMI layer
*
*/
enum wmi_rx_buff_type {
WMI_RX_PROCESSED_BUFF,
WMI_RX_RAW_BUFF
};
/**
* enum wmi_fw_mem_prio - defines FW Memory requirement type
* @WMI_FW_MEM_HIGH_PRIORITY: Memory requires contiguous memory allocation
@@ -196,6 +207,16 @@ struct wmi_unified_attach_params {
uint32_t soc_id;
};
/**
* struct wmi_unified_exec_ctx - wmi execution ctx and handler buff
* @exec_ctx: execution context of event
* @buff_type: buffer type for event handler
*/
struct wmi_unified_exec_ctx {
enum wmi_rx_exec_ctx exec_ctx;
enum wmi_rx_buff_type buff_type;
};
/**
* attach for unified WMI
*
@@ -394,6 +415,24 @@ int
wmi_unified_unregister_event(wmi_unified_t wmi_handle,
uint32_t event_id);
/**
* wmi_unified_register_raw_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
*
* Register event handler to get struct wmi_raw_event_buffer as arg
*
* @return: 0 on success and -ve on failure.
*/
int
wmi_unified_register_raw_event_handler(wmi_unified_t wmi_handle,
wmi_conv_event_id event_id,
wmi_unified_event_handler handler_func,
enum wmi_rx_exec_ctx rx_ctx);
/**
* WMI event handler unregister function
*