Просмотр исходного кода

qcacld-3.0: Trigger runtime resume before disconnection

In Case device is in suspending, if there is a disconnection,
disconneciton may fail as wmi cmd is not able to send to fw.

Add synchronization resume before disconnection as a protection.

Change-Id: I250d3a86183a61629e9369f49209c5a058a9a9a1
CRs-Fixed: 2746816
Jingxiang Ge 4 лет назад
Родитель
Сommit
c1ee492b7b
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 10 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -155,6 +155,7 @@
 #include "wlan_hdd_cfr.h"
 #include "wlan_hdd_ioctl.h"
 #include "wlan_cm_roam_ucfg_api.h"
+#include "hif.h"
 
 #define g_mode_rates_size (12)
 #define a_mode_rates_size (8)
@@ -20107,6 +20108,7 @@ static int wlan_hdd_wait_for_disconnect(mac_handle_t mac_handle,
 	int ret = 0;
 	unsigned long rc;
 	uint32_t wait_time = SME_DISCONNECT_TIMEOUT;
+	void *hif_ctx;
 
 	/* Return if already disconnected */
 	if (sta_ctx->conn_info.conn_state == eConnectionState_NotConnected)
@@ -20116,6 +20118,14 @@ static int wlan_hdd_wait_for_disconnect(mac_handle_t mac_handle,
 	if (sta_ctx->conn_info.conn_state == eConnectionState_Disconnecting)
 		goto wait_for_disconnect;
 
+	hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+	if (hif_ctx) {
+		/*
+		 * Trigger runtime sync resume before sending disconneciton
+		 */
+		hif_pm_runtime_sync_resume(hif_ctx);
+	}
+
 	INIT_COMPLETION(adapter->disconnect_comp_var);
 	prev_conn_state = sta_ctx->conn_info.conn_state;
 	hdd_conn_set_connection_state(adapter, eConnectionState_Disconnecting);