浏览代码

qcacmn: Fix the incorrect check in is_service_enabled_tlv

Many firmware do not send wmi_ext_service bitmap in wmi_ready event
so the ext_service_bitmap will be empty in such cases. So the condition
in the is_service_enabled_tlv to check for wmi_ext_service bitmap
and return false is wrong as wmi_ext_service bitmap support is not
necessity. This condition leads to incorrect behavior in cases when
firmware do not support wmi_ext_service bitmap as is_service_enabled_tlv
returns false for every service.

Fix the above failure by addition of condition check for wmi_ext_service
bitmap only when wmi_ext2_service bitmap is supported by firmware.

Change-Id: I94d0b65e640d44f41d14de889955a6d6330e88b2
CRs-Fixed: 2786491
Surabhi Vishnoi 4 年之前
父节点
当前提交
e906b00a65
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      wmi/src/wmi_unified_tlv.c

+ 6 - 6
wmi/src/wmi_unified_tlv.c

@@ -8676,19 +8676,19 @@ static bool is_service_enabled_tlv(wmi_unified_t wmi_handle,
 		return false;
 		return false;
 	}
 	}
 
 
-	if (!soc->wmi_ext_service_bitmap) {
-		wmi_err("WMI service ext bit map is not saved yet");
-		return false;
-	}
-
 	/* if wmi_service_enabled was received with extended2 bitmap,
 	/* if wmi_service_enabled was received with extended2 bitmap,
 	 * use WMI_SERVICE_EXT2_IS_ENABLED to check the services.
 	 * use WMI_SERVICE_EXT2_IS_ENABLED to check the services.
 	 */
 	 */
-	if (soc->wmi_ext2_service_bitmap)
+	if (soc->wmi_ext2_service_bitmap) {
+		if (!soc->wmi_ext_service_bitmap) {
+			wmi_err("WMI service ext bit map is not saved yet");
+			return false;
+		}
 		return WMI_SERVICE_EXT2_IS_ENABLED(soc->wmi_service_bitmap,
 		return WMI_SERVICE_EXT2_IS_ENABLED(soc->wmi_service_bitmap,
 				soc->wmi_ext_service_bitmap,
 				soc->wmi_ext_service_bitmap,
 				soc->wmi_ext2_service_bitmap,
 				soc->wmi_ext2_service_bitmap,
 				service_id);
 				service_id);
+	}
 
 
 	if (service_id >= WMI_MAX_EXT_SERVICE) {
 	if (service_id >= WMI_MAX_EXT_SERVICE) {
 		wmi_err("Service id %d but WMI ext2 service bitmap is NULL",
 		wmi_err("Service id %d but WMI ext2 service bitmap is NULL",