From 5ca67e983bbc1bb4e41cccc4215aa2d96f6e91fd Mon Sep 17 00:00:00 2001 From: proski Date: Tue, 11 Aug 2009 20:17:47 +0000 Subject: [PATCH] Recognize and report AR9160 and AR9280 Change ath5k_chip_name() to support IDs exceeding 0xff. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4083 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath_hal_extensions.c | 4 +++- ath/if_ath_hal_extensions.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ath/if_ath_hal_extensions.c b/ath/if_ath_hal_extensions.c index 0e6a458..218259a 100644 --- a/ath/if_ath_hal_extensions.c +++ b/ath/if_ath_hal_extensions.c @@ -65,6 +65,8 @@ static struct ath5k_srev_name srev_names[] = { { "5416", AR5K_VERSION_VER, AR5K_SREV_VER_AR5416 }, { "5418", AR5K_VERSION_VER, AR5K_SREV_VER_AR5418 }, { "2425", AR5K_VERSION_VER, AR5K_SREV_VER_AR2425 }, + { "9160", AR5K_VERSION_VER, AR5K_SREV_VER_AR9160 }, + { "9280", AR5K_VERSION_VER, AR5K_SREV_VER_AR9280 }, { "xxxxx", AR5K_VERSION_VER, AR5K_SREV_UNKNOWN }, { "5110", AR5K_VERSION_RAD, AR5K_SREV_RAD_5110 }, { "5111", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111 }, @@ -132,7 +134,7 @@ 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 < srev_names[i + 1].sr_val) { name = srev_names[i].sr_name; break; } diff --git a/ath/if_ath_hal_extensions.h b/ath/if_ath_hal_extensions.h index 95d109b..bfc1aac 100644 --- a/ath/if_ath_hal_extensions.h +++ b/ath/if_ath_hal_extensions.h @@ -236,6 +236,8 @@ struct ath5k_srev_name { #define AR5K_SREV_VER_AR5416 0xc0 /* PCI-E */ #define AR5K_SREV_VER_AR5418 0xca /* PCI-E */ #define AR5K_SREV_VER_AR2425 0xe2 /* PCI-E */ +#define AR5K_SREV_VER_AR9160 0x400 +#define AR5K_SREV_VER_AR9280 0x800 #define AR5K_SREV_RAD_5110 0x00 #define AR5K_SREV_RAD_5111 0x10 -- 2.35.1