diff mbox

[v2,1/4] ath9k: Alternative EEPROM size for AR9003

Message ID 1516780939-7176-2-git-send-email-Wojciech.Dubowik@neratec.com (mailing list archive)
State Accepted
Commit 528782ecf59f7bab2f1368628a479f49be59b512
Delegated to: Kalle Valo
Headers show

Commit Message

Wojciech Dubowik Jan. 24, 2018, 8:02 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Kalle Valo Jan. 25, 2018, 5:35 a.m. UTC | #1
Wojciech Dubowik <Wojciech.Dubowik@neratec.com> wrote:

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

4 patches applied to ath-next branch of ath.git, thanks.

528782ecf59f ath9k: Alternative EEPROM size for AR9003
34d4fcd8813a ath9k: Read noise floor calibration data from eeprom
8da58553cc63 ath9k: Use calibrated noise floor value when available
3717957ce55c ath9k: Display calibration data piers in debugfs
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index c2e210c..23bb677 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -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);