Skip to contentSkip to conversation

ath9k: remove eeprom txgain override for minor version < 19

PATCH Superseded Marek Lindner 4 participants 6 messages Aug 3, 2011 – Aug 11, 2011 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: remove eeprom txgain override for minor version < 19

ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the minor version is not 19 or above with a value of 0. ar9002_hw_init_mode_gain_regs() relies on this information to determine whether this is a high power wifi card or not. The override caused the driver to always use the 'normal' power tables even for high power devices if their minor version was not high enough. Thus leading to reduced power output.

---
 drivers/net/wireless/ath/ath9k/eeprom_4k.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/eeprom_4k.c +1 -4
index 5b1e894..10f3072 100644
@@ -237,10 +237,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
 	case EEP_ANT_DIV_CTL1:
 		return pModal->antdiv_ctl1;
 	case EEP_TXGAIN_TYPE:
-		if (ver_minor >= AR5416_EEP_MINOR_VER_19)
-			return pBase->txGainType;
-		else
-			return AR5416_EEP_TXGAIN_ORIGINAL;
+		return pBase->txGainType;
 	default:
 		return 0;
 	}
Signature · 1 line
1.7.5.3
#1 lore raw

PATCH 1/1 ath9k: remove eeprom txgain override for minor version < 19

Hi,

I'd rather the description included why it needs changing, rather than just what it does.

I'd add something like:

"This isn't needed for the AR9285; the check originated with the AR9280 setup code which requires the EEPROM version check."

adrian

Quoted 37 lines · Marek Lindner

ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the minor version is not 19 or above with a value of 0. ar9002_hw_init_mode_gain_regs() relies on this information to determine whether this is a high power wifi card or not. The override caused the driver to always use the 'normal' power tables even for high power devices if their minor version was not high enough. Thus leading to reduced power output.

---
?drivers/net/wireless/ath/ath9k/eeprom_4k.c | ? ?5 +---- ?1 files changed, 1 insertions(+), 4 deletions(-)

drivers/net/wireless/ath/ath9k/eeprom_4k.c +0 -0
index 5b1e894..10f3072 100644
@@ -237,10 +237,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,

? ? ? ?case EEP_ANT_DIV_CTL1:
? ? ? ? ? ? ? ?return pModal->antdiv_ctl1;
? ? ? ?case EEP_TXGAIN_TYPE:
- ? ? ? ? ? ? ? if (ver_minor >= AR5416_EEP_MINOR_VER_19)
- ? ? ? ? ? ? ? ? ? ? ? return pBase->txGainType;
- ? ? ? ? ? ? ? else
- ? ? ? ? ? ? ? ? ? ? ? return AR5416_EEP_TXGAIN_ORIGINAL;
+ ? ? ? ? ? ? ? return pBase->txGainType;
? ? ? ?default:
? ? ? ? ? ? ? ?return 0;
? ? ? ?}
--
1.7.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html

#2 lore raw

PATCH v2 1/1 ath9k: remove eeprom txgain override for minor version < 19

In reply to Marek Lindner

ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the minor version is not 19 or above with a value of 0. ar9002_hw_init_mode_gain_regs() relies on this information to determine whether this is a high power wifi card or not. The override caused the driver to always use the 'normal' power tables even for high power devices if their minor version was not high enough. Thus leading to reduced power output.

This isn't needed for the AR9285; the check originated with the AR9280 setup code which requires the EEPROM version check.

---
 drivers/net/wireless/ath/ath9k/eeprom_4k.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/eeprom_4k.c +1 -4
index 5b1e894..10f3072 100644
@@ -237,10 +237,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
 	case EEP_ANT_DIV_CTL1:
 		return pModal->antdiv_ctl1;
 	case EEP_TXGAIN_TYPE:
-		if (ver_minor >= AR5416_EEP_MINOR_VER_19)
-			return pBase->txGainType;
-		else
-			return AR5416_EEP_TXGAIN_ORIGINAL;
+		return pBase->txGainType;
 	default:
 		return 0;
 	}
Signature · 1 line
1.7.5.3
#3 lore raw

PATCH v2 1/1 ath9k: remove eeprom txgain override for minor version < 19

Quoted 22 lines · Marek Lindner

ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the minor version is not 19 or above with a value of 0. ar9002_hw_init_mode_gain_regs() relies on this information to determine whether this is a high power wifi card or not. The override caused the driver to always use the 'normal' power tables even for high power devices if their minor version was not high enough. Thus leading to reduced power output.

This isn't needed for the AR9285; the check originated with the AR9280 setup code which requires the EEPROM version check.

---
 drivers/net/wireless/ath/ath9k/eeprom_4k.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/eeprom_4k.c +0 -0
index 5b1e894..10f3072 100644
@@ -237,10 +237,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
 	case EEP_ANT_DIV_CTL1:

drivers/net/wireless/ath/ath9k/eeprom_4k.c static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah, · line 243

Quoted 10 lines
drivers/net/wireless/ath/ath9k/eeprom_4k.c +1 -4
 		return pModal->antdiv_ctl1;
 	case EEP_TXGAIN_TYPE:
-		if (ver_minor >= AR5416_EEP_MINOR_VER_19)
-			return pBase->txGainType;
-		else
-			return AR5416_EEP_TXGAIN_ORIGINAL;
+		return pBase->txGainType;
 	default:
 		return 0;
 	}

Any chance for an ACK from someone from Atheros on the ath9k team?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.
#4 lore raw

PATCH v2 1/1 ath9k: remove eeprom txgain override for minor version < 19

Quoted 34 lines · John W. Linville
Quoted 16 lines · Marek Lindner

ath9k_hw_4k_get_eeprom() overrides the eeprom value for txgain if the minor version is not 19 or above with a value of 0. ar9002_hw_init_mode_gain_regs() relies on this information to determine whether this is a high power wifi card or not. The override caused the driver to always use the 'normal' power tables even for high power devices if their minor version was not high enough. Thus leading to reduced power output.

This isn't needed for the AR9285; the check originated with the AR9280 setup code which requires the EEPROM version check.

---

  drivers/net/wireless/ath/ath9k/eeprom_4k.c |    5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)
Quoted 16 lines

diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index 5b1e894..10f3072 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -237,10 +237,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
case EEP_ANT_DIV_CTL1:
return pModal->antdiv_ctl1;
case EEP_TXGAIN_TYPE:
- if (ver_minor>= AR5416_EEP_MINOR_VER_19)
- return pBase->txGainType;
- else
- return AR5416_EEP_TXGAIN_ORIGINAL;
+ return pBase->txGainType;
default:
return 0;
}

Quoted 1 line

Any chance for an ACK from someone from Atheros on the ath9k team?