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

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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe3002c1
...@@ -408,7 +408,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size) ...@@ -408,7 +408,7 @@ static void ks_wlan_hw_rx(struct ks_wlan_private *priv, uint16_t size)
netdev_err(priv->net_dev, " error : READ_STATUS\n"); netdev_err(priv->net_dev, " error : READ_STATUS\n");
if (atomic_read(&priv->psstatus.confirm_wait)) { if (atomic_read(&priv->psstatus.confirm_wait)) {
if (IS_HIF_CONF(event)) { if (is_hif_conf(event)) {
netdev_dbg(priv->net_dev, "IS_HIF_CONF true !!\n"); netdev_dbg(priv->net_dev, "IS_HIF_CONF true !!\n");
atomic_dec(&priv->psstatus.confirm_wait); atomic_dec(&priv->psstatus.confirm_wait);
} }
......
...@@ -608,7 +608,6 @@ enum multicast_filter_type { ...@@ -608,7 +608,6 @@ enum multicast_filter_type {
#define NIC_MAX_MCAST_LIST 32 #define NIC_MAX_MCAST_LIST 32
/* macro function */
#define HIF_EVENT_MASK 0xE800 #define HIF_EVENT_MASK 0xE800
static inline bool is_hif_ind(unsigned short event) static inline bool is_hif_ind(unsigned short event)
...@@ -621,10 +620,13 @@ 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))); ((event & ~HIF_EVENT_MASK) == 0x0012)));
} }
#define IS_HIF_CONF(_EVENT) ((_EVENT & HIF_EVENT_MASK) == 0xE800 && \ static inline bool is_hif_conf(unsigned short event)
(_EVENT & ~HIF_EVENT_MASK) > 0x0000 && \ {
(_EVENT & ~HIF_EVENT_MASK) < 0x0012 && \ return (((event & HIF_EVENT_MASK) == HIF_EVENT_MASK) &&
!is_hif_ind(_EVENT)) ((event & ~HIF_EVENT_MASK) > 0x0000) &&
((event & ~HIF_EVENT_MASK) < 0x0012) &&
!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