From 755a957d407c3fcac58360d9309b1664078ac15d Mon Sep 17 00:00:00 2001 From: Ivo van Doorn Date: Mon, 12 Nov 2007 15:02:22 +0100 Subject: 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 Signed-off-by: John W. Linville --- drivers/net/wireless/rt2x00/rt2500pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c') diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index ff2d63267b1..702321c3016 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c @@ -620,7 +620,7 @@ static void rt2500pci_link_tuner(struct rt2x00_dev *rt2x00dev) * up to version C the link tuning should halt after 20 * seconds. */ - if (rt2x00_get_rev(&rt2x00dev->chip) < RT2560_VERSION_D && + if (rt2x00_rev(&rt2x00dev->chip) < RT2560_VERSION_D && rt2x00dev->link.count > 20) return; @@ -630,7 +630,7 @@ static void rt2500pci_link_tuner(struct rt2x00_dev *rt2x00dev) * Chipset versions C and lower should directly continue * to the dynamic CCA tuning. */ - if (rt2x00_get_rev(&rt2x00dev->chip) < RT2560_VERSION_D) + if (rt2x00_rev(&rt2x00dev->chip) < RT2560_VERSION_D) goto dynamic_cca_tune; /* -- cgit v1.2.3-70-g09d2