summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010/ks_hostif.h
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-03-29 20:07:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 14:07:58 +0200
commitb1e04ba095a9761b786d745cf716c3354cf2aa4b (patch)
tree47051813caa1c953b4dc5e13beaf1ce5d8229491 /drivers/staging/ks7010/ks_hostif.h
parentfe3002c1dc54ec58944448d5f129a6b6513d4246 (diff)
staging: ks7010: replace IS_HIF_CONF with inline function
This commit replaces IS_HIF_CONF macro with is_11b_rate inline function to improve readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/ks_hostif.h')
-rw-r--r--drivers/staging/ks7010/ks_hostif.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 09e67f904629..f4f9c1ee11d1 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -608,7 +608,6 @@ enum multicast_filter_type {
#define NIC_MAX_MCAST_LIST 32
-/* macro function */
#define HIF_EVENT_MASK 0xE800
static inline bool is_hif_ind(unsigned short event)
@@ -621,10 +620,13 @@ static inline bool is_hif_ind(unsigned short event)
((event & ~HIF_EVENT_MASK) == 0x0012)));
}
-#define IS_HIF_CONF(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \
- (_EVENT & ~HIF_EVENT_MASK) > 0x0000 && \
- (_EVENT & ~HIF_EVENT_MASK) < 0x0012 && \
- !is_hif_ind(_EVENT))
+static inline bool is_hif_conf(unsigned short event)
+{
+ return (((event & HIF_EVENT_MASK) == HIF_EVENT_MASK) &&
+ ((event & ~HIF_EVENT_MASK) > 0x0000) &&
+ ((event & ~HIF_EVENT_MASK) < 0x0012) &&
+ !is_hif_ind(event));
+}
#ifdef __KERNEL__