Commit fe3002c1 authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: replace IS_HIF_IND with inline function

This commit replaces IS_HIF_IND macro with is_11b_rate inline
function to improve readability.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea552237
...@@ -610,17 +610,21 @@ enum multicast_filter_type { ...@@ -610,17 +610,21 @@ enum multicast_filter_type {
/* macro function */ /* macro function */
#define HIF_EVENT_MASK 0xE800 #define HIF_EVENT_MASK 0xE800
#define IS_HIF_IND(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \
((_EVENT & ~HIF_EVENT_MASK) == 0x0001 || \ static inline bool is_hif_ind(unsigned short event)
(_EVENT & ~HIF_EVENT_MASK) == 0x0006 || \ {
(_EVENT & ~HIF_EVENT_MASK) == 0x000C || \ return (((event & HIF_EVENT_MASK) == HIF_EVENT_MASK) &&
(_EVENT & ~HIF_EVENT_MASK) == 0x0011 || \ (((event & ~HIF_EVENT_MASK) == 0x0001) ||
(_EVENT & ~HIF_EVENT_MASK) == 0x0012)) ((event & ~HIF_EVENT_MASK) == 0x0006) ||
((event & ~HIF_EVENT_MASK) == 0x000C) ||
((event & ~HIF_EVENT_MASK) == 0x0011) ||
((event & ~HIF_EVENT_MASK) == 0x0012)));
}
#define IS_HIF_CONF(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \ #define IS_HIF_CONF(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \
(_EVENT & ~HIF_EVENT_MASK) > 0x0000 && \ (_EVENT & ~HIF_EVENT_MASK) > 0x0000 && \
(_EVENT & ~HIF_EVENT_MASK) < 0x0012 && \ (_EVENT & ~HIF_EVENT_MASK) < 0x0012 && \
!IS_HIF_IND(_EVENT)) !is_hif_ind(_EVENT))
#ifdef __KERNEL__ #ifdef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment