diff --git a/wmi_unified.c b/wmi_unified.c index ad1f631f3e..e842fd226f 100644 --- a/wmi_unified.c +++ b/wmi_unified.c @@ -2369,8 +2369,6 @@ static int wmi_connect_pdev_htc_service(struct wmi_soc *soc, uint32_t pdev_idx) { int status; - uint32_t svc_id[] = {WMI_CONTROL_SVC, WMI_CONTROL_SVC_WMAC1, - WMI_CONTROL_SVC_WMAC2}; struct htc_service_connect_resp response; struct htc_service_connect_req connect; @@ -2391,7 +2389,7 @@ static int wmi_connect_pdev_htc_service(struct wmi_soc *soc, wmi_htc_tx_complete /* ar6000_tx_queue_full */; /* connect to control service */ - connect.service_id = svc_id[pdev_idx]; + connect.service_id = soc->svc_ids[pdev_idx]; status = htc_connect_service(soc->htc_handle, &connect, &response); diff --git a/wmi_unified_non_tlv.c b/wmi_unified_non_tlv.c index 84a7b31de0..3e127bee45 100644 --- a/wmi_unified_non_tlv.c +++ b/wmi_unified_non_tlv.c @@ -32,7 +32,7 @@ #if defined(WMI_NON_TLV_SUPPORT) || defined(WMI_TLV_AND_NON_TLV_SUPPORT) #include "wmi.h" #include "wmi_unified.h" - +#include /* pdev_id is used to distinguish the radio for which event * is recieved. Since non-tlv target has only one radio, setting @@ -40,6 +40,9 @@ */ #define WMI_NON_TLV_DEFAULT_PDEV_ID WMI_HOST_PDEV_ID_0 +/* HTC service id for WMI */ +static const uint32_t svc_ids[] = {WMI_CONTROL_SVC}; + /** * send_vdev_create_cmd_non_tlv() - send VDEV create command to fw * @wmi_handle: wmi handle @@ -9329,6 +9332,7 @@ void wmi_non_tlv_attach(struct wmi_unified *wmi_handle) { #if defined(WMI_NON_TLV_SUPPORT) || defined(WMI_TLV_AND_NON_TLV_SUPPORT) wmi_handle->ops = &non_tlv_ops; + wmi_handle->soc->svc_ids = &svc_ids[0]; populate_non_tlv_service(wmi_handle->services); populate_non_tlv_events_id(wmi_handle->wmi_events); populate_pdev_param_non_tlv(wmi_handle->pdev_param); diff --git a/wmi_unified_tlv.c b/wmi_unified_tlv.c index 7389ee41e1..92f02dc27f 100644 --- a/wmi_unified_tlv.c +++ b/wmi_unified_tlv.c @@ -31,6 +31,7 @@ #include "wmi_unified_priv.h" #include "wmi_version_whitelist.h" #include +#include #ifdef CONVERGED_P2P_ENABLE #include "wlan_p2p_public_struct.h" @@ -47,6 +48,11 @@ #include "nan_public_structs.h" #endif +/* HTC service ids for WMI for multi-radio */ +static const uint32_t multi_svc_ids[] = {WMI_CONTROL_SVC, + WMI_CONTROL_SVC_WMAC1, + WMI_CONTROL_SVC_WMAC2}; + /* copy_vdev_create_pdev_id() - copy pdev from host params to target command * buffer. * @wmi_handle: pointer to wmi_handle @@ -23773,6 +23779,7 @@ void wmi_tlv_attach(wmi_unified_t wmi_handle) { wmi_handle->ops = &tlv_ops; wmi_ocb_ut_attach(wmi_handle); + wmi_handle->soc->svc_ids = &multi_svc_ids[0]; #ifdef WMI_INTERFACE_EVENT_LOGGING /* Skip saving WMI_CMD_HDR and TLV HDR */ wmi_handle->log_info.buf_offset_command = 8;