Commit 60e0c3a7 authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by John W. Linville

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: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ff48ba46
...@@ -3319,7 +3319,10 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, ...@@ -3319,7 +3319,10 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
memcpy(mptr, &ar9300_default, mdata_size); memcpy(mptr, &ar9300_default, mdata_size);
read = ar9300_read_eeprom; read = ar9300_read_eeprom;
cptr = AR9300_BASE_ADDR; if (AR_SREV_9485(ah))
cptr = AR9300_BASE_ADDR_4K;
else
cptr = AR9300_BASE_ADDR;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, ATH_DBG_EEPROM,
"Trying EEPROM accesss at Address 0x%04x\n", cptr); "Trying EEPROM accesss at Address 0x%04x\n", cptr);
if (ar9300_check_eeprom_header(ah, read, cptr)) if (ar9300_check_eeprom_header(ah, read, cptr))
...@@ -3361,7 +3364,8 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, ...@@ -3361,7 +3364,8 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, ATH_DBG_EEPROM,
"Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n",
cptr, code, reference, length, major, minor); cptr, code, reference, length, major, minor);
if (length >= 1024) { if ((!AR_SREV_9485(ah) && length >= 1024) ||
(AR_SREV_9485(ah) && length >= (4 * 1024))) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, ATH_DBG_EEPROM,
"Skipping bad header\n"); "Skipping bad header\n");
cptr -= COMP_HDR_LEN; cptr -= COMP_HDR_LEN;
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
#define AR9300_EEPROM_SIZE (16*1024) #define AR9300_EEPROM_SIZE (16*1024)
#define FIXED_CCA_THRESHOLD 15 #define FIXED_CCA_THRESHOLD 15
#define AR9300_BASE_ADDR_4K 0xfff
#define AR9300_BASE_ADDR 0x3ff #define AR9300_BASE_ADDR 0x3ff
#define AR9300_BASE_ADDR_512 0x1ff #define AR9300_BASE_ADDR_512 0x1ff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment