diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 79c29fb66c..b01799f679 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -752,6 +752,18 @@ struct oem_data { }; #endif +#ifdef MULTI_CLIENT_LL_SUPPORT +/** + * struct latency_level_data - latency data received in the event from the FW + * @vdev_id: The latency level for specified vdev_id + * @latency_level: latency level honoured by FW + */ +struct latency_level_data { + uint8_t vdev_id; + uint32_t latency_level; +}; +#endif + /** * enum nss_chains_band_info - Band info for dynamic nss, chains change feature * @NSS_CHAINS_BAND_2GHZ: 2.4Ghz band @@ -4944,6 +4956,9 @@ typedef enum { wmi_extract_pktlog_decode_info_eventid, #ifdef QCA_RSSI_DB2DBM wmi_pdev_rssi_dbm_conversion_params_info_eventid, +#endif +#ifdef MULTI_CLIENT_LL_SUPPORT + wmi_vdev_latency_event_id, #endif wmi_events_max, } wmi_conv_event_id; diff --git a/wmi/inc/wmi_unified_sta_param.h b/wmi/inc/wmi_unified_sta_param.h index d3ae2777f8..0ab9bf392c 100644 --- a/wmi/inc/wmi_unified_sta_param.h +++ b/wmi/inc/wmi_unified_sta_param.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -92,11 +93,18 @@ struct wmi_gtx_config { * bit 11: Disable sys sleep if setting * bit 12-31: Reserve for future useage * @vdev_id: vdev id + * @force_reset: bit 0 used as force reset to override the latency level as + * default for all the wlm clients + * @client_id_bitmask: clients of WLM Arbiter */ struct wlm_latency_level_param { uint16_t wlm_latency_level; uint32_t wlm_latency_flags; uint16_t vdev_id; +#ifdef MULTI_CLIENT_LL_SUPPORT + uint32_t force_reset; + uint32_t client_id_bitmask; +#endif }; #define WMI_2_4_GHZ_MAX_FREQ 3000 diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index d23e013d03..1cda2751b4 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -465,6 +465,29 @@ static QDF_STATUS send_nat_keepalive_en_cmd_tlv(wmi_unified_t wmi_handle, uint8_ return 0; } +#ifdef MULTI_CLIENT_LL_SUPPORT +/** + * fill_multi_client_ll_info - Fill multi client low latency info to wlm cmd + * @cmd: wlm config command + * @params: wlm params + * + * Return: none + */ +static void fill_multi_client_ll_info(wmi_wlm_config_cmd_fixed_param *cmd, + struct wlm_latency_level_param *params) +{ + cmd->client_id_bitmask = params->client_id_bitmask; + WLM_FLAGS_SET_FORCE_DEFAULT_LATENCY(cmd->flags_ext, + params->force_reset); +} +#else +static inline void +fill_multi_client_ll_info(wmi_wlm_config_cmd_fixed_param *cmd, + struct wlm_latency_level_param *params) +{ +} +#endif + static QDF_STATUS send_wlm_latency_level_cmd_tlv(wmi_unified_t wmi_handle, struct wlm_latency_level_param *params) { @@ -487,6 +510,8 @@ static QDF_STATUS send_wlm_latency_level_cmd_tlv(wmi_unified_t wmi_handle, cmd->ul_latency = ll[params->wlm_latency_level]; cmd->dl_latency = ll[params->wlm_latency_level]; cmd->flags = params->wlm_latency_flags; + fill_multi_client_ll_info(cmd, params); + wmi_mtrace(WMI_WLM_CONFIG_CMDID, cmd->vdev_id, 0); if (wmi_unified_cmd_send(wmi_handle, buf, len, WMI_WLM_CONFIG_CMDID)) { diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index f9ac313e50..8dca49d0d7 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -18354,6 +18354,9 @@ static void populate_tlv_events_id(uint32_t *event_ids) event_ids[wmi_pdev_rssi_dbm_conversion_params_info_eventid] = WMI_PDEV_RSSI_DBM_CONVERSION_PARAMS_INFO_EVENTID; #endif +#ifdef MULTI_CLIENT_LL_SUPPORT + event_ids[wmi_vdev_latency_event_id] = WMI_VDEV_LATENCY_LEVEL_EVENTID; +#endif } #ifdef WLAN_FEATURE_LINK_LAYER_STATS