Skip to contentSkip to conversation

ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards

PATCH RESEND Superseded Denis Kalashnikov 2 participants 2 messages Dec 27, 2019 – Jan 10, 2020 Qualcomm Atheros ATH9K wireless driver

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ath9k: fix firmware bug in some of Mikrotik R11e-2HPnD cards

Sorry, first I sent the patch through a Gmail web interface, and spaces were broken.
---

Some of the Mikrotik R11e-2HPnD cards have EEPROM where is flashed that a card has 3 chains, but actually all this cards have only 2. This leads ath9k to write periodically into the logs:
'ath: phy0: Unable to reset channel, reset status -5' and stations don't see that AP.

Mikrotik R11e-2HPnD is based on AR9582 chip.

---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +9 -0
index b4885a700296..554a81400648 100644
@@ -3373,6 +3373,15 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
 		cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
 	}
 
+	/**
+	 * Fix firmware bug of some Mikrotik R11e-2HPnD cards (based on AR9582)
+	 * that claim that they have 3 chains, but actually have only 2.
+	 */
+	if (AR_SREV_9580(ah)) {
+		eep = (struct ar9300_eeprom *)mptr;
+		eep->baseEepHeader.txrxMask &= 0x33;
+	}
+
 	kfree(word);
 	return cptr;
 
Signature · 1 line
2.23.0
#1 lore raw
Quoted 10 lines · Denis Kalashnikov

Sorry, first I sent the patch through a Gmail web interface, and spaces were broken.
---

Some of the Mikrotik R11e-2HPnD cards have EEPROM where is flashed that a card has 3 chains, but actually all this cards have only 2. This leads ath9k to write periodically into the logs:
'ath: phy0: Unable to reset channel, reset status -5' and stations don't see that AP.

Quoted 4 lines

Mikrotik R11e-2HPnD is based on AR9582 chip.

---

Add any comments after this "---" line, more info in the link below. Please fix that and send v3.

Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches