From: Nick Kossifidis Date: Sun, 28 Sep 2008 22:24:44 +0000 (+0300) Subject: ath5k: Fix SREV reporting after SREV updates X-Git-Tag: v2.6.28-rc1~717^2~165^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=75d0edb82269a1bcf83d32b1d77ab94a5e3ed8af;p=linux-2.6-omap-h63xx.git ath5k: Fix SREV reporting after SREV updates * Fix srev reporting during attach Changes-Licensed-under: ISC Signed-Off-by: Nick Kossifidis Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index c8bb9bfb51f..3b784358a7c 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c @@ -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; }