aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-06 07:27:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:52 -0500
commit60e0c3a782f9060327751492dac949210154759b (patch)
tree8187e507d354bac32a6883475e3e90c5f33c4350 /drivers/net/wireless/ath/ath9k
parentff48ba464e3503149657c60d46e8f4e9b4ed27fa (diff)
ath9k_hw: Eeeprom changes for AR9485
Calibration data are stored at 4k address (0xfff). The cal data for AR9485 is not compressed so its lengh can exceed 1024 limit, take care of that. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 8c4961001b68..29b5a6d86f7e 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3319,7 +3319,10 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
3319 memcpy(mptr, &ar9300_default, mdata_size); 3319 memcpy(mptr, &ar9300_default, mdata_size);
3320 3320
3321 read = ar9300_read_eeprom; 3321 read = ar9300_read_eeprom;
3322 cptr = AR9300_BASE_ADDR; 3322 if (AR_SREV_9485(ah))
3323 cptr = AR9300_BASE_ADDR_4K;
3324 else
3325 cptr = AR9300_BASE_ADDR;
3323 ath_dbg(common, ATH_DBG_EEPROM, 3326 ath_dbg(common, ATH_DBG_EEPROM,
3324 "Trying EEPROM accesss at Address 0x%04x\n", cptr); 3327 "Trying EEPROM accesss at Address 0x%04x\n", cptr);
3325 if (ar9300_check_eeprom_header(ah, read, cptr)) 3328 if (ar9300_check_eeprom_header(ah, read, cptr))
@@ -3361,7 +3364,8 @@ found:
3361 ath_dbg(common, ATH_DBG_EEPROM, 3364 ath_dbg(common, ATH_DBG_EEPROM,
3362 "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", 3365 "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n",
3363 cptr, code, reference, length, major, minor); 3366 cptr, code, reference, length, major, minor);
3364 if (length >= 1024) { 3367 if ((!AR_SREV_9485(ah) && length >= 1024) ||
3368 (AR_SREV_9485(ah) && length >= (4 * 1024))) {
3365 ath_dbg(common, ATH_DBG_EEPROM, 3369 ath_dbg(common, ATH_DBG_EEPROM,
3366 "Skipping bad header\n"); 3370 "Skipping bad header\n");
3367 cptr -= COMP_HDR_LEN; 3371 cptr -= COMP_HDR_LEN;
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
index 9c1463307f0c..ce4d76203535 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
@@ -78,6 +78,7 @@
78#define AR9300_EEPROM_SIZE (16*1024) 78#define AR9300_EEPROM_SIZE (16*1024)
79#define FIXED_CCA_THRESHOLD 15 79#define FIXED_CCA_THRESHOLD 15
80 80
81#define AR9300_BASE_ADDR_4K 0xfff
81#define AR9300_BASE_ADDR 0x3ff 82#define AR9300_BASE_ADDR 0x3ff
82#define AR9300_BASE_ADDR_512 0x1ff 83#define AR9300_BASE_ADDR_512 0x1ff
83 84