瀏覽代碼

qcacmn: Register DBR & Diag events on new CE

Waikiki facilitates a dedicated CE (CE14) for
direct DMA & diag handling purpose. Changes to
register the respective service handler to process
DBR and DIAG events from the target.

CRs-Fixed: 3057986
Change-Id: I4ae1d5676ac702d1f28f3e4031b47ffcd1d2ad7e
Shwetha G K 3 年之前
父節點
當前提交
926430802a
共有 3 個文件被更改,包括 11 次插入6 次删除
  1. 2 1
      wmi/inc/wmi_unified_api.h
  2. 2 1
      wmi/inc/wmi_unified_priv.h
  3. 7 4
      wmi/src/wmi_unified.c

+ 2 - 1
wmi/inc/wmi_unified_api.h

@@ -453,7 +453,8 @@ QDF_STATUS
 wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
 				HTC_HANDLE htc_handle);
 
-#ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
+#if defined(WLAN_FEATURE_WMI_DIAG_OVER_CE7) || \
+	defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
 /**
  * wmi_diag_connect_pdev_htc_service()
  * WMI DIAG API to get connect to HTC service

+ 2 - 1
wmi/inc/wmi_unified_priv.h

@@ -2891,7 +2891,8 @@ struct wmi_soc {
 	uint16_t max_msg_len[WMI_MAX_RADIOS];
 	struct wmi_ops *ops;
 	const uint32_t *svc_ids;
-#ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
+#if defined(WLAN_FEATURE_WMI_DIAG_OVER_CE7) || \
+	defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
 	HTC_ENDPOINT_ID wmi_diag_endpoint_id;
 #endif
 	uint32_t wmi_events[wmi_events_max];

+ 7 - 4
wmi/src/wmi_unified.c

@@ -2612,7 +2612,8 @@ static void wmi_control_rx(void *ctx, HTC_PACKET *htc_packet)
 	wmi_process_control_rx(wmi_handle, evt_buf);
 }
 
-#ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
+#if defined(WLAN_FEATURE_WMI_DIAG_OVER_CE7) || \
+	defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
 /**
  * wmi_control_diag_rx() - process diag fw events callbacks
  * @ctx: handle to wmi
@@ -2628,7 +2629,8 @@ static void wmi_control_diag_rx(void *ctx, HTC_PACKET *htc_packet)
 
 	evt_buf = (wmi_buf_t)htc_packet->pPktContext;
 
-	wmi_handle = soc->wmi_pdev[0];
+	wmi_handle = wmi_get_pdev_ep(soc, htc_packet->Endpoint);
+
 	if (!wmi_handle) {
 		wmi_err("unable to get wmi_handle for diag event end point id:%d", htc_packet->Endpoint);
 		qdf_nbuf_free(evt_buf);
@@ -3542,7 +3544,8 @@ wmi_unified_connect_htc_service(struct wmi_unified *wmi_handle,
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
+#if defined(WLAN_FEATURE_WMI_DIAG_OVER_CE7) || \
+	defined(WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE)
 QDF_STATUS wmi_diag_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
 					     HTC_HANDLE htc_handle)
 {
@@ -3567,7 +3570,7 @@ QDF_STATUS wmi_diag_connect_pdev_htc_service(struct wmi_unified *wmi_handle,
 
 	if (QDF_IS_STATUS_ERROR(status)) {
 		wmi_err("Failed to connect to WMI DIAG service status:%d",
-			 status);
+			status);
 		return status;
 	}