On 2019-09-23 17:05, Kalle Valo wrote:
+#define ATH10K_HTC_FLAG_BUNDLE_MASK 0xF0
+#define ATH10K_HTC_BUNDLE_EXTRA_MASK GENMASK(3, 2)
+
+#define ATH10K_HTC_GET_BUNDLE_COUNT(flags) \
+ (FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, (flags)) + \
+ (FIELD_GET(ATH10K_HTC_BUNDLE_EXTRA_MASK, (flags)) << 4))
When using FIELD_GET() there should be no need to use '<<', the main id
of FIELD_GET() and BITMASK() is that there's no need do any manual
shifting. So I suspect something is wrong here, but didn't have time to
investigate.
the value is like this:
the u8 flags:
b7 b6 b5 b4 b3 b2 b1 b0
the count= 0Bb7b6b5b4 + 0Bb3b2 << 4
FIELD_GET is to >>, not <<
so it need to manual shift for the "0Bb3b2 << 4"