فهرست منبع

qcacmn: Add new WMI API

Add new API to allow components to move to common eventid space.

Change-Id: Ieab2019a0fb96817833266236073cffb3aaeab2c
CRs-Fixed: 2023157
Soumya Bhat 8 سال پیش
والد
کامیت
49a8481745
2فایلهای تغییر یافته به همراه17 افزوده شده و 7 حذف شده
  1. 15 5
      wmi_unified_api.h
  2. 2 2
      wmi_unified_priv.h

+ 15 - 5
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

+ 2 - 2
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];