summaryrefslogtreecommitdiff
path: root/package/mac80211
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-10-05 14:10:32 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-10-05 14:10:32 +0000
commit25a71a59aec292f177224f2d5f6567a3362ef9b0 (patch)
treee1b2c93110e2e0f3cdc4f30513866d17325ca718 /package/mac80211
parentc74849709f22c0efbeb7925e23dbf9ca01b303ca (diff)
downloadmtk-20170518-25a71a59aec292f177224f2d5f6567a3362ef9b0.zip
mtk-20170518-25a71a59aec292f177224f2d5f6567a3362ef9b0.tar.gz
mtk-20170518-25a71a59aec292f177224f2d5f6567a3362ef9b0.tar.bz2
mac80211: ath9k: get tx gain type from eeprom
SVN-Revision: 23242
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/Makefile2
-rw-r--r--package/mac80211/patches/560-ath9k-get-ath9k-get-correct-tx-gain-type.patch33
2 files changed, 34 insertions, 1 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index f65a823..b644840 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2010-09-28
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
# http://wireless.kernel.org/download/compat-wireless-2.6
diff --git a/package/mac80211/patches/560-ath9k-get-ath9k-get-correct-tx-gain-type.patch b/package/mac80211/patches/560-ath9k-get-ath9k-get-correct-tx-gain-type.patch
new file mode 100644
index 0000000..d9262cf
--- /dev/null
+++ b/package/mac80211/patches/560-ath9k-get-ath9k-get-correct-tx-gain-type.patch
@@ -0,0 +1,33 @@
+--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
++++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+@@ -179,6 +179,9 @@ static u32 ath9k_hw_4k_get_eeprom(struct
+ struct ar5416_eeprom_4k *eep = &ah->eeprom.map4k;
+ struct modal_eep_4k_header *pModal = &eep->modalHeader;
+ struct base_eep_header_4k *pBase = &eep->baseEepHeader;
++ u16 ver_minor;
++
++ ver_minor = pBase->version & AR5416_EEP_VER_MINOR_MASK;
+
+ switch (param) {
+ case EEP_NFTHRESH_2:
+@@ -204,7 +207,7 @@ static u32 ath9k_hw_4k_get_eeprom(struct
+ case EEP_DB_2:
+ return pModal->db1_1;
+ case EEP_MINOR_REV:
+- return pBase->version & AR5416_EEP_VER_MINOR_MASK;
++ return ver_minor;
+ case EEP_TX_MASK:
+ return pBase->txMask;
+ case EEP_RX_MASK:
+@@ -217,6 +220,11 @@ static u32 ath9k_hw_4k_get_eeprom(struct
+ return pModal->version;
+ 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;
+ default:
+ return 0;
+ }