From f92051cdf81ae539786ab21cdadcbcf55434a42b Mon Sep 17 00:00:00 2001 From: Deeksha Gupta Date: Wed, 18 Aug 2021 16:45:28 +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_cm_disconnect.c | 32 +++++++++++++++++++++++++++ core/hdd/src/wlan_hdd_main.c | 3 +++ 2 files changed, 35 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cm_disconnect.c b/core/hdd/src/wlan_hdd_cm_disconnect.c index 6de2f1711b..d0ce976a4a 100644 --- a/core/hdd/src/wlan_hdd_cm_disconnect.c +++ b/core/hdd/src/wlan_hdd_cm_disconnect.c @@ -369,6 +369,37 @@ static void hdd_cm_set_default_wlm_mode(struct hdd_adapter *adapter) } } +/** + * hdd_cm_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_cm_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); + } +} + static QDF_STATUS hdd_cm_disconnect_complete_post_user_update(struct wlan_objmgr_vdev *vdev, struct wlan_cm_discon_rsp *rsp) @@ -395,6 +426,7 @@ hdd_cm_disconnect_complete_post_user_update(struct wlan_objmgr_vdev *vdev, hdd_cm_set_default_wlm_mode(adapter); __hdd_cm_disconnect_handler_post_user_update(adapter, vdev); wlan_twt_concurrency_update(hdd_ctx); + hdd_cm_reset_udp_qos_upgrade_config(adapter); return QDF_STATUS_SUCCESS; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7ab674405a..cbfa15547f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -16047,6 +16047,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); } }