From 05734c5c11447a55644bf1f82c7eeba3f844e76f Mon Sep 17 00:00:00 2001 From: Amit Mehta Date: Mon, 8 Nov 2021 14:38:00 +0530 Subject: [PATCH] qcacld-3.0: Enable network queue directly in case of roaming Currently in the case of roaming between latency-critical connection and non-latency critical connection we are scheduling work to update features and after feature update we are enabling network queues which is introducing a delay in enabling queues due to work schedule. To Fix the issue enable network queue in the current context and schedule work to update features. Change-Id: Idba5b81a58aaf2bd47d80da1d17ad0acf9939071 CRs-Fixed: 3070688 --- core/hdd/src/wlan_hdd_assoc.c | 7 +++---- core/hdd/src/wlan_hdd_main.c | 18 +++++------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index c6c89f702790..12b908a7a66d 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -2943,11 +2943,10 @@ static inline void hdd_netif_queue_enable(struct hdd_adapter *adapter) adapter->vdev_id); qdf_queue_work(0, hdd_ctx->adapter_ops_wq, &adapter->netdev_features_update_work); - } else { - wlan_hdd_netif_queue_control(adapter, - WLAN_WAKE_ALL_NETIF_QUEUE, - WLAN_CONTROL_PATH); } + wlan_hdd_netif_queue_control(adapter, + WLAN_WAKE_ALL_NETIF_QUEUE, + WLAN_CONTROL_PATH); } static void hdd_save_connect_status(struct hdd_adapter *adapter, diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3231742196af..2128c5918a80 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10725,24 +10725,16 @@ __hdd_adapter_param_update_work(struct hdd_adapter *adapter) { /** * This check is needed in case the work got scheduled after the - * interface got disconnected. During disconnection, the network queues - * are paused and hence should not be, mistakenly, restarted here. - * There are two approaches to handle this case - * 1) Flush the work during disconnection - * 2) Check for connected state in work - * - * Since the flushing of work during disconnection will need to be - * done at multiple places or entry points, instead its preferred to - * check the connection state and skip the operation here. + * interface got disconnected. + * Netdev features update is to be done only after the connection, + * since the connection mode plays an important role in identifying + * the features that are to be updated. + * So in case of interface disconnect skip feature update. */ if (!hdd_adapter_is_connected_sta(adapter)) return; hdd_netdev_update_features(adapter); - - hdd_debug("Enabling queues"); - wlan_hdd_netif_queue_control(adapter, WLAN_WAKE_ALL_NETIF_QUEUE, - WLAN_CONTROL_PATH); } /**