Prechádzať zdrojové kódy

qcacld-3.0: Hold wakelock till connection completion

There is a chance that kernel can trigger suspend while
connection in progress. If driver allows this suspend, this can
result in fw panic.

Specific scenario:
If driver allows suspend to go when it waits for probe response,
fw least expects suspend indication as fw is in vdev start state.
This unexpected suspend indication in vdev start state can cause
fw panic.

Hold wakelock till the completion of association to fix this issue.

Change-Id: I168ead2ab1ef4fff1d9af3f3142c82536c3f4798
CRs-Fixed: 2217140
Padma, Santhosh Kumar 7 rokov pred
rodič
commit
c88de4811d

+ 7 - 1
core/hdd/inc/wlan_hdd_power.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -42,6 +42,12 @@
 
 #define HDD_WAKELOCK_TIMEOUT_CONNECT 1000
 #define HDD_WAKELOCK_TIMEOUT_RESUME 1000
+/*
+ * HDD_WAKELOCK_CONNECT_COMPLETE = CSR_JOIN_FAILURE_TIMEOUT_DEFAULT (3000) +
+ *                      WNI_CFG_AUTHENTICATE_FAILURE_TIMEOUT_STADEF (1000) +
+ *                      WNI_CFG_ASSOCIATION_FAILURE_TIMEOUT_STADEF  (2000)
+ */
+#define HDD_WAKELOCK_CONNECT_COMPLETE 6000
 
 /**
  * enum pkt_filter_protocol_layer - packet filter protocol layer

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -18017,7 +18017,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
 
 		qdf_runtime_pm_prevent_suspend(
 				&hdd_ctx->runtime_context.connect);
-		hdd_prevent_suspend_timeout(HDD_WAKELOCK_TIMEOUT_CONNECT,
+		hdd_prevent_suspend_timeout(HDD_WAKELOCK_CONNECT_COMPLETE,
 					    WIFI_POWER_EVENT_WAKELOCK_CONNECT);
 		qdf_status = sme_roam_connect(WLAN_HDD_GET_HAL_CTX(adapter),
 					  adapter->session_id, roam_profile,