From 5e1fdeec4d570e6c3c494c031a5de0c730aee077 Mon Sep 17 00:00:00 2001 From: Rakshith Suresh Patkar Date: Wed, 3 Apr 2019 12:07:07 +0530 Subject: [PATCH] qcacld-3.0: Add check for wlan_suspended in __hdd_tx_timeout When scheduler thread is suspended, it will not process any messages until it is resumed. If messages are posted to scheduler thread when it is suspended, it will lead to KP due to scheduler buffer becoming full. Add check for hdd_ctx->hdd_wlan_suspended in __hdd_tx_timeout before posting any message to scheduler. Change-Id: Ic0bc6ec0dda23e2a6eaf59adb21f0bca5f2707df CRs-Fixed: 2428339 --- core/hdd/src/wlan_hdd_tx_rx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index fce8f6050252..288e84ee9d40 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -1215,6 +1215,13 @@ static void __hdd_tx_timeout(struct net_device *dev) u64 diff_jiffies; int i = 0; + hdd_ctx = WLAN_HDD_GET_CTX(adapter); + + if (hdd_ctx->hdd_wlan_suspended) { + hdd_debug("Device is suspended, ignore WD timeout"); + return; + } + TX_TIMEOUT_TRACE(dev, QDF_MODULE_ID_HDD_DATA); DPTRACE(qdf_dp_trace(NULL, QDF_DP_TRACE_HDD_TX_TIMEOUT, QDF_TRACE_DEFAULT_PDEV_ID, @@ -1235,7 +1242,6 @@ static void __hdd_tx_timeout(struct net_device *dev) hdd_info("carrier state: %d", netif_carrier_ok(dev)); - hdd_ctx = WLAN_HDD_GET_CTX(adapter); wlan_hdd_display_netif_queue_history(hdd_ctx, QDF_STATS_VERBOSITY_LEVEL_HIGH); cdp_dump_flow_pool_info(cds_get_context(QDF_MODULE_ID_SOC));