ath5k: Fix SREV reporting after SREV updates
authorNick Kossifidis <mick@madwifi.org>
Sun, 28 Sep 2008 22:24:44 +0000 (01:24 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 30 Sep 2008 18:07:26 +0000 (14:07 -0400)
 * Fix srev reporting during attach

Changes-Licensed-under: ISC
Signed-Off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/base.c

index c8bb9bfb51fb4e717f676324ab60645b52514c1d..3b784358a7c947b84f37b8a67f973517e9b5f4f1 100644 (file)
@@ -396,7 +396,11 @@ ath5k_chip_name(enum ath5k_srev_type type, u_int16_t val)
        for (i = 0; i < ARRAY_SIZE(srev_names); i++) {
                if (srev_names[i].sr_type != type)
                        continue;
-               if ((val & 0xff) < srev_names[i + 1].sr_val) {
+
+               if ((val & 0xf0) == srev_names[i].sr_val)
+                       name = srev_names[i].sr_name;
+
+               if ((val & 0xff) == srev_names[i].sr_val) {
                        name = srev_names[i].sr_name;
                        break;
                }