Browse Source

qcacld-3.0: IPA uC: Return EPERM for RM CONS REQ only during unloading

qcacld-2.0 to qcacld-3.0 propagation

Change to return -EINPROGRESS if WLAN unable to grant IPA CONS resource
due to IPA resource loading is in progress.
Return -EPERM only if WLAN unable to grant IPA CONS resource due to
IPA resource unloading is in progress.

Change-Id: Iea4d804d3f81b086e723230fb8eddc7d9561d7d1
CRs-Fixed: 926880
Yun Park 9 năm trước cách đây
mục cha
commit
4d8b60a777
1 tập tin đã thay đổi với 13 bổ sung4 xóa
  1. 13 4
      core/hdd/src/wlan_hdd_ipa.c

+ 13 - 4
core/hdd/src/wlan_hdd_ipa.c

@@ -2100,14 +2100,23 @@ static int hdd_ipa_rm_cons_release(void)
  */
 static int hdd_ipa_rm_cons_request(void)
 {
-	if ((ghdd_ipa->resource_loading) || (ghdd_ipa->resource_unloading)) {
+	int ret = 0;
+
+	if (ghdd_ipa->resource_loading) {
 		HDD_IPA_LOG(CDF_TRACE_LEVEL_FATAL,
-			    "%s: ipa resource loading/unloading in progress",
+			    "%s: IPA resource loading in progress",
 			    __func__);
 		ghdd_ipa->pending_cons_req = true;
-		return -EPERM;
+		ret = -EINPROGRESS;
+	} else if (ghdd_ipa->resource_unloading) {
+		HDD_IPA_LOG(CDF_TRACE_LEVEL_FATAL,
+				"%s: IPA resource unloading in progress",
+				__func__);
+		ghdd_ipa->pending_cons_req = true;
+		ret = -EPERM;
 	}
-	return 0;
+
+	return ret;
 }
 
 /**