From 2bed4725cae6785c99ab110d403cb52517f5e186 Mon Sep 17 00:00:00 2001 From: Deeksha Gupta Date: Wed, 18 Aug 2021 22:57:23 +0530 Subject: [PATCH] qcacld-3.0: Reset the TID after disconnection and wifi_off Add logic to reset the TID with below condition: 1. reset TID value when wifi off happens 2. reset TID value when disconnection happens if "wlm_latency_reset_on_disconnect" ini is set Change-Id: Iaf73dfd7a6a9985f8c1af47f788e73ea4fa07882 CRs-Fixed: 3013137 --- core/hdd/src/wlan_hdd_assoc.c | 32 ++++++++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_main.c | 3 +++ 2 files changed, 35 insertions(+) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index d34908ed2606..122a5fc430cc 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1910,6 +1910,37 @@ static void hdd_cm_set_default_wlm_mode(struct hdd_adapter *adapter) } } +/** + * hdd_reset_udp_qos_upgrade_config() - Reset the threshold for UDP packet + * QoS upgrade. + * @adapter: adapter for which this configuration is to be applied + * + * Return: None + */ +static void hdd_reset_udp_qos_upgrade_config(struct hdd_adapter *adapter) +{ + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); + bool reset; + QDF_STATUS status; + + if (!hdd_ctx) { + hdd_err("hdd_ctx is NULL"); + return; + } + + status = ucfg_mlme_cfg_get_wlm_reset(hdd_ctx->psoc, &reset); + if (QDF_IS_STATUS_ERROR(status)) { + hdd_err("could not get the wlm reset flag"); + return; + } + + if (reset) { + adapter->upgrade_udp_qos_threshold = QCA_WLAN_AC_BK; + hdd_debug("UDP packets qos upgrade to: %d", + adapter->upgrade_udp_qos_threshold); + } +} + /** * hdd_dis_connect_handler() - disconnect event handler * @adapter: pointer to adapter @@ -1962,6 +1993,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter, sta_ctx->conn_info.bssid.bytes); hdd_cm_set_default_wlm_mode(adapter); + hdd_reset_udp_qos_upgrade_config(adapter); hdd_periodic_sta_stats_stop(adapter); #ifdef FEATURE_WLAN_AUTO_SHUTDOWN diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8c0f97f94c60..e51fd544aba7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -16337,6 +16337,9 @@ static void hdd_set_adapter_wlm_def_level(struct hdd_context *hdd_ctx) else adapter->latency_level = latency_level; + adapter->upgrade_udp_qos_threshold = QCA_WLAN_AC_BK; + hdd_debug("UDP packets qos reset to: %d", + adapter->upgrade_udp_qos_threshold); hdd_adapter_dev_put_debug(adapter, dbgid); } }