diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 12a735d9d2..393d33d451 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/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 diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 005e05f743..56e12a54fb 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/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]; diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index d51f255cd8..80c691f63b 100644 --- a/wmi/src/wmi_unified.c +++ b/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; }