qcacmn: Add qdf bitmap AND and EMPTY APIs
Add qdf API to check if a given bitmap is empty and API to compute bitwise AND operation of two given bitmaps. 1. qdf_bitmap_and 2. qdf_bitmap_empty Change-Id: Ibc26e0f515c3804f1b627e8eaa8bf6f796c40324 CRs-Fixed: 2635330
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
876cc3786b
commit
453e7a3240
@@ -194,6 +194,27 @@ typedef __qdf_wait_queue_head_t qdf_wait_queue_head_t;
|
||||
*/
|
||||
#define qdf_find_first_bit(addr, nbits) __qdf_find_first_bit(addr, nbits)
|
||||
|
||||
/**
|
||||
* qdf_bitmap_empty() - Check if bitmap is empty
|
||||
* @addr: Address buffer pointer
|
||||
* @nbits: Number of bits
|
||||
*
|
||||
* Return: True if no bit set, else false
|
||||
*/
|
||||
#define qdf_bitmap_empty(addr, nbits) __qdf_bitmap_empty(addr, nbits)
|
||||
|
||||
/**
|
||||
* qdf_bitmap_and() - AND operation on the bitmap
|
||||
* @dst: Destination buffer pointer
|
||||
* @src1: First source buffer pointer
|
||||
* @src2: Second source buffer pointer
|
||||
* @nbits: Number of bits
|
||||
*
|
||||
* Return: Bitwise and of src1 and src2 in dst
|
||||
*/
|
||||
#define qdf_bitmap_and(dst, src1, src2, nbits) \
|
||||
__qdf_bitmap_and(dst, src1, src2, nbits)
|
||||
|
||||
#define qdf_wait_queue_interruptible(wait_queue, condition) \
|
||||
__qdf_wait_queue_interruptible(wait_queue, condition)
|
||||
|
||||
|
@@ -113,6 +113,18 @@ static inline unsigned long __qdf_find_first_bit(unsigned long *addr,
|
||||
return find_first_bit(addr, nbits);
|
||||
}
|
||||
|
||||
static inline bool __qdf_bitmap_empty(unsigned long *addr,
|
||||
unsigned long nbits)
|
||||
{
|
||||
return bitmap_empty(addr, nbits);
|
||||
}
|
||||
|
||||
static inline int __qdf_bitmap_and(unsigned long *dst, unsigned long *src1,
|
||||
unsigned long *src2, unsigned long nbits)
|
||||
{
|
||||
return bitmap_and(dst, src1, src2, nbits);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_set_macaddr_broadcast() - set a QDF MacAddress to the 'broadcast'
|
||||
* @mac_addr: pointer to the qdf MacAddress to set to broadcast
|
||||
|
Reference in New Issue
Block a user