浏览代码

qcacmn: Add 64 bits version for QDF_GET_BITS

The QDF_GET_BITS is only applicable to the 32 bits. Add 64 bits version
QDF_GET_BITS64 to support 64bits operation.

Change-Id: Iaa40c5c52e259cd14358162f2b193fcbe257e319
CRs-Fixed: 2828527
Tiger Yu 4 年之前
父节点
当前提交
e4fbc9890d
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      qdf/inc/qdf_util.h

+ 4 - 0
qdf/inc/qdf_util.h

@@ -132,6 +132,10 @@ typedef __qdf_wait_queue_head_t qdf_wait_queue_head_t;
 		(_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
 		(_var) |= (((_val) & ((1 << (_num_bits)) - 1)) << (_index)); \
 		} while (0)
 		} while (0)
 
 
+/* Get number of bits from the index bit supporting 64 bits */
+#define QDF_GET_BITS64(_val, _index, _num_bits) \
+		(((_val) >> (_index)) & ((1LLU << (_num_bits)) - 1))
+
 #define QDF_DECLARE_EWMA(name, factor, weight) \
 #define QDF_DECLARE_EWMA(name, factor, weight) \
 	__QDF_DECLARE_EWMA(name, factor, weight)
 	__QDF_DECLARE_EWMA(name, factor, weight)