浏览代码

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
Rakshith Suresh Patkar 6 年之前
父节点
当前提交
5e1fdeec4d
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      core/hdd/src/wlan_hdd_tx_rx.c

+ 7 - 1
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));