aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath5k/base.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi.org>2008-09-29 01:24:44 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-09-30 14:07:26 -0400
commit75d0edb82269a1bcf83d32b1d77ab94a5e3ed8af (patch)
tree15030d369f1bb089a8950a5dd803328e08a7ec0a /drivers/net/wireless/ath5k/base.c
parent509a106e68aa42acc1a0c44ab365d0de6869bd9e (diff)
ath5k: Fix SREV reporting after SREV updates
* 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>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath5k/base.c6
1 files changed, 5 insertions, 1 deletions
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;
}