qcacmn: Add changes to process LATENCY_LEVEL_EVENT

If the multi-client Low latency feature enabled in driver,
FW sends WMI_VDEV_LATENCY_LEVEL_EVENTID to report latency
level honored by FW as a response to a request
command WMI_WLM_CONFIG_CMDID.

Change-Id: I06f7bbc2365e8b71e0ae6386ef42ef4238dafd35
CRs-Fixed: 3180940
This commit is contained in:
abhinav kumar
2022-04-22 14:47:56 +05:30
committed by Madan Koyyalamudi
parent 4412aa9fcf
commit ff760fe66c
4 changed files with 51 additions and 0 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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)) {

View File

@@ -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