ath9k: Alternative EEPROM size for AR9003
authorWojciech Dubowik <Wojciech.Dubowik@neratec.com>
Wed, 24 Jan 2018 08:02:16 +0000 (09:02 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 25 Jan 2018 05:33:28 +0000 (07:33 +0200)
AR9003 factory calibration allows to use bigger EEPROM than
standard 1k without changing the default layout. Allow
probing of EEPROM at alternative address if initial check
for default fails.
The original ar9003 eeprom ops are still be used.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

index c2e210c..23bb677 100644 (file)
@@ -3310,6 +3310,12 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
        if (ar9300_check_eeprom_header(ah, read, cptr))
                goto found;
 
+       cptr = AR9300_BASE_ADDR_4K;
+       ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n",
+               cptr);
+       if (ar9300_check_eeprom_header(ah, read, cptr))
+               goto found;
+
        cptr = AR9300_BASE_ADDR_512;
        ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n",
                cptr);