From dafa5a280f9cb6ff094e37fdced3c86fca23b942 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 2 Mar 2018 09:01:47 -0800 Subject: [PATCH] fw-api: CL 4234772 - update fw common interface files WMI_SERVICE_EXT_IS_ENABLED bug fix: apply a mask to check a single bit The current definition of the WMI_SERVICE_EXT_IS_ENABLED macro doesnt apply a mask to isolate the bit in question, and hence ends up returning the value of all higher bits within the same word, along with the bit of interest.To fix this, the macro is updated to apply a 0x1 mask, so that only the bit of interest is considered. Change-Id: I1caabcae808ecb3b062ecacdce2b343e3b1b5acf CRs-Fixed: 1107600 --- fw/wmi_services.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 3f3792102d8c..5d2fb2c2fd1d 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -309,8 +309,8 @@ typedef enum { (svc_id) < WMI_MAX_SERVICE ? \ WMI_SERVICE_IS_ENABLED(pwmi_svc_bmap, svc_id) : \ /* If service ID is in the extended range, check ext_bmap */ \ - (pwmi_svc_ext_bmap)[((svc_id) - WMI_MAX_SERVICE) / 32] >> \ - ((svc_id) & 0x1f)) + (((pwmi_svc_ext_bmap)[((svc_id) - WMI_MAX_SERVICE) / 32] >> \ + ((svc_id) & 0x1f)) & 0x1)) #ifdef __cplusplus