aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
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/rt2800usb.c
parent6cfe62cd58da862db04d4eb61f218f65b0cedbb3 (diff)
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/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index cf4a97f32ab..257bfb5483c 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -2348,9 +2348,10 @@ static int rt2800usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
* The check for rt2860 is not a typo, some rt2870 hardware
* identifies itself as rt2860 in the CSR register.
*/
- if ((rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 0x2860) &&
- (rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 0x2870) &&
- (rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 0x3070)) {
+ if (!rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28600000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28700000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28800000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xffff0000, 0x30700000)) {
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
return -ENODEV;
}