瀏覽代碼

qcacld-3.0: Check if pipes already enabled for IPA enable pipes

Currently there is a race condition during enable of IPA WDI pipes
after IPA_RM_RESOURCE_GRANTED notification from IPA RM and at the
same time client disconnect happens. Because of this race condition
subsequent enable IPA pipes at the time of client connection IPA
driver returns error as the pipes are not disabled before. In this
change after requesting IPA resource check for IPA pipes state and
if pipes are not enabled then enable the pipes.

Change-Id: Idd0d4089efa5b81d5301a278fb0dd836db0ecb48
CRs-Fixed: 2082118
Sravan Kumar Kairam 8 年之前
父節點
當前提交
c76f28a675
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      core/hdd/src/wlan_hdd_ipa.c

+ 11 - 0
core/hdd/src/wlan_hdd_ipa.c

@@ -1921,12 +1921,23 @@ static int hdd_ipa_uc_handle_first_con(struct hdd_ipa_priv *hdd_ipa)
 			/* RM PROD request sync return
 			/* RM PROD request sync return
 			 * enable pipe immediately
 			 * enable pipe immediately
 			 */
 			 */
+			if (!hdd_ipa->ipa_pipes_down) {
+				HDD_IPA_LOG(QDF_TRACE_LEVEL_DEBUG,
+					"%s: IPA WDI Pipe already activated",
+					__func__);
+				return 0;
+			}
+
 			if (hdd_ipa_uc_enable_pipes(hdd_ipa)) {
 			if (hdd_ipa_uc_enable_pipes(hdd_ipa)) {
 				HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
 				HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
 					"IPA WDI Pipe activation failed");
 					"IPA WDI Pipe activation failed");
 				hdd_ipa->resource_loading = false;
 				hdd_ipa->resource_loading = false;
 				return -EBUSY;
 				return -EBUSY;
 			}
 			}
+		} else {
+			HDD_IPA_LOG(QDF_TRACE_LEVEL_INFO,
+				    "%s: IPA WDI Pipe activation deferred",
+					__func__);
 		}
 		}
 	} else {
 	} else {
 		/* RM Disabled
 		/* RM Disabled