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
This commit is contained in:

committed by
snandini

parent
766838ebaa
commit
e906b00a65
@@ -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",
|
||||||
|
Reference in New Issue
Block a user