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
This commit is contained in:
proski 2009-08-11 20:17:47 +00:00
parent 4462df298c
commit 5ca67e983b
2 changed files with 5 additions and 1 deletions

View File

@ -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;
}

View File

@ -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