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>
This commit is contained in:
committed by
John W. Linville
parent
6cfe62cd58
commit
358623c22c
@ -1846,7 +1846,8 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
rt2x00usb_register_read(rt2x00dev, MAC_CSR0, ®);
|
||||
rt2x00_set_chip(rt2x00dev, RT2571, value, reg);
|
||||
|
||||
if (!rt2x00_check_rev(&rt2x00dev->chip, 0x25730)) {
|
||||
if (!rt2x00_check_rev(&rt2x00dev->chip, 0x000ffff0, 0x25730) ||
|
||||
!rt2x00_check_rev(&rt2x00dev->chip, 0x0000000f, 0)) {
|
||||
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Reference in New Issue
Block a user