diff --git a/wmi_unified_api.h b/wmi_unified_api.h index 4fd9b981d4..5036f3198d 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -73,11 +73,6 @@ typedef qdf_nbuf_t wmi_buf_t; #define WMI_LOGA(args ...) #endif -/* wrapper to keep WMI agnostic of event handler execution context */ -#define wmi_unified_register_event(wmi_handle, event_id, handler_func) \ - wmi_unified_register_event_handler(wmi_handle, \ - event_id, handler_func, WMI_RX_UMAC_CTX) - struct wmi_soc; /** * struct wmi_ops - service callbacks to upper layer @@ -192,6 +187,21 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen, uint32_t cmd_id); +/** + * wmi_unified_register_event() - WMI event handler + * registration function for converged components + * + * @wmi_handle: handle to WMI. + * @event_id: WMI event ID + * @handler_func: Event handler call back function + * + * @return 0 on success and -ve on failure. + */ +int +wmi_unified_register_event(wmi_unified_t wmi_handle, + uint32_t event_id, + wmi_unified_event_handler handler_func); + /** * wmi_unified_register_event_handler() - WMI event handler * registration function diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 760e7ee1f2..112fceb5cb 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -1347,10 +1347,10 @@ struct wmi_unified { struct wmi_ops *ops; bool use_cookie; bool wmi_stopinprogress; + uint32_t *wmi_events; #ifndef CONFIG_MCL /* WMI service bitmap recieved from target */ uint32_t *wmi_service_bitmap; - uint32_t *wmi_events; uint32_t *pdev_param; uint32_t *vdev_param; uint32_t *services; @@ -1374,10 +1374,10 @@ struct wmi_soc { HTC_ENDPOINT_ID wmi_endpoint_id[WMI_MAX_RADIOS]; uint16_t max_msg_len[WMI_MAX_RADIOS]; struct wmi_ops *ops; + uint32_t wmi_events[wmi_events_max]; #ifndef CONFIG_MCL /* WMI service bitmap recieved from target */ uint32_t wmi_service_bitmap[wmi_services_max]; - uint32_t wmi_events[wmi_events_max]; uint32_t pdev_param[wmi_pdev_param_max]; uint32_t vdev_param[wmi_vdev_param_max]; uint32_t services[wmi_services_max];