Sfoglia il codice sorgente

qcacmn: Use the same callback signature for MCL as WIN

Callback signature in wmi_process_fw_event_default_ctx
is different for WIN and MCL. Make it same.

Change-Id: I28ad8e6068742095bdb9bc265e46dead8bfb217d
CRs-Fixed: 2372980
Harprit Chhabada 6 anni fa
parent
commit
71c9846f58
2 ha cambiato i file con 21 aggiunte e 28 eliminazioni
  1. 19 7
      wmi/inc/wmi_unified_api.h
  2. 2 21
      wmi/src/wmi_unified.c

+ 19 - 7
wmi/inc/wmi_unified_api.h

@@ -123,16 +123,17 @@ typedef qdf_nbuf_t wmi_buf_t;
 struct wmi_soc;
 struct policy_mgr_dual_mac_config;
 /**
- * struct wmi_ops - service callbacks to upper layer
- * @service_ready_cbk: service ready callback
- * @service_ready_ext_cbk: service ready ext callback
- * @ready_cbk: ready calback
+ * struct wmi_rx_ops - handle to wmi rx ops
+ * @scn_handle: handle to scn
+ * @ev: event buffer
+ * @rx_ctx: rx execution context
  * @wma_process_fw_event_handler_cbk: generic event handler callback
  */
 struct wmi_rx_ops {
 
-	int (*wma_process_fw_event_handler_cbk)(void *ctx,
-				  void *ev, uint8_t rx_ctx);
+	int (*wma_process_fw_event_handler_cbk)(ol_scn_t scn_handle,
+						void *ev,
+						uint8_t rx_ctx);
 };
 
 /**
@@ -1581,8 +1582,19 @@ QDF_STATUS wmi_extract_smartlog_ev
 
 #endif /* OL_ATH_SMART_LOGGING */
 
+/**
+ * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context
+ * @wmi_handle: handle to wmi
+ * @evt_buf: pointer to event buffer
+ *
+ * Event process by below function will be in worker thread context.
+ * Use this method for events which are not critical and not
+ * handled in protocol stack.
+ *
+ * Return: none
+ */
 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
-					    HTC_PACKET * htc_packet);
+					    void *evt_buf);
 
 /**
  * wmi_extract_ctl_failsafe_check_ev_param() - extract ctl failsafe

+ 2 - 21
wmi/src/wmi_unified.c

@@ -2001,34 +2001,15 @@ static void wmi_process_fw_event_default_ctx(struct wmi_unified *wmi_handle,
 	wmi_buf_t evt_buf;
 	evt_buf = (wmi_buf_t) htc_packet->pPktContext;
 
-#ifndef CONFIG_MCL
 	wmi_handle->rx_ops.wma_process_fw_event_handler_cbk
 		(wmi_handle->scn_handle, evt_buf, exec_ctx);
-#else
-	wmi_handle->rx_ops.wma_process_fw_event_handler_cbk(wmi_handle,
-					 htc_packet, exec_ctx);
-#endif
 
 	return;
 }
 
-/**
- * wmi_process_fw_event_worker_thread_ctx() - process in worker thread context
- * @wmi_handle: handle to wmi
- * @htc_packet: pointer to htc packet
- *
- * Event process by below function will be in worker thread context.
- * Use this method for events which are not critical and not
- * handled in protocol stack.
- *
- * Return: none
- */
 void wmi_process_fw_event_worker_thread_ctx(struct wmi_unified *wmi_handle,
-					    HTC_PACKET *htc_packet)
+					    void *evt_buf)
 {
-	wmi_buf_t evt_buf;
-
-	evt_buf = (wmi_buf_t) htc_packet->pPktContext;
 
 	qdf_spin_lock_bh(&wmi_handle->eventq_lock);
 	qdf_nbuf_queue_add(&wmi_handle->event_queue, evt_buf);
@@ -2154,7 +2135,7 @@ static void wmi_control_rx(void *ctx, HTC_PACKET *htc_packet)
 
 	if (exec_ctx == WMI_RX_WORK_CTX) {
 		wmi_process_fw_event_worker_thread_ctx
-					(wmi_handle, htc_packet);
+					(wmi_handle, evt_buf);
 	} else if (exec_ctx > WMI_RX_WORK_CTX) {
 		wmi_process_fw_event_default_ctx
 					(wmi_handle, htc_packet, exec_ctx);