summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng/p80211hdr.h
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2016-11-10 19:16:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-14 15:43:20 +0100
commit408fec3ff8e1f9fa2d11e199d7a51f02c0dd788f (patch)
tree606e67be044f0c6f9fcac6f496fed11f2b46325f /drivers/staging/wlan-ng/p80211hdr.h
parente49651b836f2be0ee3990a14d555b4d783a03911 (diff)
downloadop-kernel-dev-408fec3ff8e1f9fa2d11e199d7a51f02c0dd788f.zip
op-kernel-dev-408fec3ff8e1f9fa2d11e199d7a51f02c0dd788f.tar.gz
staging: wlan-ng: use GENMASK macro in different defines of p80211hdr.h
This patch replace actual mask stuff using BIT macros with or operators to make use of GENMASK macro which simplifies code clearity and readibility. It applies for defines included in p80211hdr.h header file. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng/p80211hdr.h')
-rw-r--r--drivers/staging/wlan-ng/p80211hdr.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h
index c8f78d9..2c44c61 100644
--- a/drivers/staging/wlan-ng/p80211hdr.h
+++ b/drivers/staging/wlan-ng/p80211hdr.h
@@ -131,9 +131,8 @@
/* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */
/*------------------------------------------------------------*/
-#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2)
-#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & \
- (BIT(4) | BIT(5) | BIT(6) | BIT(7))) >> 4)
+#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & GENMASK(3, 2)) >> 2)
+#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & GENMASK(7, 4)) >> 4)
#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8)
#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9)
#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14)
OpenPOWER on IntegriCloud