rt2x00: Fix chipset revision validation
authorIvo van Doorn <ivdoorn@gmail.com>
Mon, 12 Nov 2007 14:02:22 +0000 (15:02 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 15 Nov 2007 02:21:15 +0000 (21:21 -0500)
commit755a957d407c3fcac58360d9309b1664078ac15d
tree8668e7d54a6af0b2a843abad255972a2dc84bc81
parent14577f239fe5193d556ef1471c8667dabd556418
rt2x00: Fix chipset revision validation

The validation of the chipset revision was broken
since for rt2500usb and rt73usb different registers
should be read. When rt2500usb was loaded for a rt73
device it would false think the chipset was correct
because the wrong register was read and validated.

This has been fixed by expanding the check to also
see if the first 4 bits of the revision is not-0
(When reading the wrong register offset the returned
value is usually 0 which can be interpreted as invalid)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt73usb.c