summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-05-05 19:46:08 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:15:04 -0400
commit358623c22c9fd837b3b1b444377037f72553dc9f (patch)
treefcf4b4838edde6924157473086e8b7130f120ebd /drivers/net/wireless/rt2x00/rt2x00.h
parent6cfe62cd58da862db04d4eb61f218f65b0cedbb3 (diff)
downloadblackbird-op-linux-358623c22c9fd837b3b1b444377037f72553dc9f.tar.gz
blackbird-op-linux-358623c22c9fd837b3b1b444377037f72553dc9f.zip
rt2x00: Simplify rt2x00_check_rev
rt2x00_check_rev() was too specific for rt2500usb and rt73usb, by adding the mask argument (instead of hardcoding it into the function itself) we can use the function in rt2800usb as well. v2: Fix revision mask for rt2800usb Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8d933ee30583..419b1b9f998e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -915,11 +915,10 @@ static inline u32 rt2x00_rev(const struct rt2x00_chip *chipset)
return chipset->rev;
}
-static inline u16 rt2x00_check_rev(const struct rt2x00_chip *chipset,
- const u32 rev)
+static inline bool rt2x00_check_rev(const struct rt2x00_chip *chipset,
+ const u32 mask, const u32 rev)
{
- return (((chipset->rev & 0xffff0) == rev) &&
- !!(chipset->rev & 0x0000f));
+ return ((chipset->rev & mask) == rev);
}
/**
OpenPOWER on IntegriCloud