From: Felix Fietkau Date: Fri, 30 Apr 2010 15:55:24 +0000 (+0000) Subject: mac80211: update to wireless-testing 2010-04-28 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b583a3f450f147d2f1d6ec4e257d667e09c5d946;p=openwrt%2Fstaging%2Fjow.git mac80211: update to wireless-testing 2010-04-28 SVN-Revision: 21271 --- diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile index d0b8976f42..78c8aa37d1 100644 --- a/package/mac80211/Makefile +++ b/package/mac80211/Makefile @@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=2010-04-21 +PKG_VERSION:=2010-04-28 PKG_RELEASE:=1 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 -PKG_MD5SUM:=dfefd51780fa1045edd1084efeab8b1e +PKG_MD5SUM:=4b8c23ac7f33af7556034635af744c67 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION) diff --git a/package/mac80211/patches/120-compat_rcu_dereference.patch b/package/mac80211/patches/120-compat_rcu_dereference.patch index 37f4a2d0a1..f14a8ddbd4 100644 --- a/package/mac80211/patches/120-compat_rcu_dereference.patch +++ b/package/mac80211/patches/120-compat_rcu_dereference.patch @@ -1,8 +1,8 @@ --- a/include/linux/compat-2.6.34.h +++ b/include/linux/compat-2.6.34.h -@@ -164,6 +164,8 @@ static inline void device_unlock(struct - - #define rcu_dereference_check(p, c) rcu_dereference(p) +@@ -197,6 +197,8 @@ do { \ + */ + #define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr) +#define rcu_dereference_check(p, c) rcu_dereference(p) + diff --git a/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch b/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch index c9839c1a32..946dda567e 100644 --- a/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch +++ b/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch @@ -8,7 +8,7 @@ #include #include "hw.h" -@@ -445,8 +446,16 @@ static int ath9k_hw_init_macaddr(struct +@@ -456,8 +457,16 @@ static int ath9k_hw_init_macaddr(struct common->macaddr[2 * i] = eeval >> 8; common->macaddr[2 * i + 1] = eeval & 0xff; } diff --git a/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch b/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch index c8961ba9e0..58728c554f 100644 --- a/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch +++ b/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch @@ -31,7 +31,7 @@ common->bus_ops = bus_ops; --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -418,10 +418,6 @@ static void ath9k_hw_init_defaults(struc +@@ -429,10 +429,6 @@ static void ath9k_hw_init_defaults(struc ah->hw_version.magic = AR5416_MAGIC; ah->hw_version.subvendorid = 0; diff --git a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch index 5322c1fe46..20a33bbdbc 100644 --- a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch +++ b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch @@ -11,7 +11,7 @@ #include "hw.h" #include "hw-ops.h" #include "rc.h" -@@ -430,18 +432,23 @@ static void ath9k_hw_init_defaults(struc +@@ -441,18 +443,23 @@ static void ath9k_hw_init_defaults(struc static int ath9k_hw_init_macaddr(struct ath_hw *ah) { struct ath_common *common = ath9k_hw_common(ah); diff --git a/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch b/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch index 3192ab0864..f7e7742e1c 100644 --- a/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch +++ b/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1373,7 +1373,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -1380,7 +1380,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st if (ah->config.rx_intr_mitigation) { REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); diff --git a/package/mac80211/patches/520-cfg80211_get_freq.patch b/package/mac80211/patches/520-cfg80211_get_freq.patch index f7e478f294..26190c63b6 100644 --- a/package/mac80211/patches/520-cfg80211_get_freq.patch +++ b/package/mac80211/patches/520-cfg80211_get_freq.patch @@ -20,7 +20,7 @@ } --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -886,6 +886,11 @@ static int nl80211_send_iface(struct sk_ +@@ -887,6 +887,11 @@ static int nl80211_send_iface(struct sk_ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx); NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name); NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype); diff --git a/package/mac80211/patches/530-minstrel_ht.patch b/package/mac80211/patches/530-minstrel_ht.patch index 6b59529b94..046e91b8cd 100644 --- a/package/mac80211/patches/530-minstrel_ht.patch +++ b/package/mac80211/patches/530-minstrel_ht.patch @@ -13,7 +13,7 @@ mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y) --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -714,6 +714,10 @@ static int __init ieee80211_init(void) +@@ -716,6 +716,10 @@ static int __init ieee80211_init(void) if (ret) return ret; @@ -24,7 +24,7 @@ ret = rc80211_pid_init(); if (ret) goto err_pid; -@@ -726,6 +730,8 @@ static int __init ieee80211_init(void) +@@ -728,6 +732,8 @@ static int __init ieee80211_init(void) err_netdev: rc80211_pid_exit(); err_pid: @@ -33,7 +33,7 @@ rc80211_minstrel_exit(); return ret; -@@ -734,6 +740,7 @@ static int __init ieee80211_init(void) +@@ -736,6 +742,7 @@ static int __init ieee80211_init(void) static void __exit ieee80211_exit(void) { rc80211_pid_exit(); diff --git a/package/mac80211/patches/550-ath9k_pending_work.patch b/package/mac80211/patches/550-ath9k_pending_work.patch deleted file mode 100644 index 7e0c701829..0000000000 --- a/package/mac80211/patches/550-ath9k_pending_work.patch +++ /dev/null @@ -1,655 +0,0 @@ ---- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -852,7 +852,7 @@ static int ar5008_hw_process_ini(struct - - REG_WRITE_ARRAY(&ah->iniBB_RfGain, freqIndex, regWrites); - -- if (AR_SREV_9280_20(ah) && IS_CHAN_A_5MHZ_SPACED(chan)) { -+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) { - REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex, - regWrites); - } -@@ -894,8 +894,7 @@ static void ar5008_hw_set_rfmode(struct - rfMode |= (IS_CHAN_5GHZ(chan)) ? - AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; - -- if ((AR_SREV_9280_20(ah) || AR_SREV_9300_20_OR_LATER(ah)) -- && IS_CHAN_A_5MHZ_SPACED(chan)) -+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) - rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE); - - REG_WRITE(ah, AR_PHY_MODE, rfMode); ---- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c -@@ -455,16 +455,12 @@ static u32 ar9002_hw_compute_pll_control - pll |= SM(0x2, AR_RTC_9160_PLL_CLKSEL); - - if (chan && IS_CHAN_5GHZ(chan)) { -- pll |= SM(0x28, AR_RTC_9160_PLL_DIV); -- -- -- if (AR_SREV_9280_20(ah)) { -- if (((chan->channel % 20) == 0) -- || ((chan->channel % 10) == 0)) -- pll = 0x2850; -- else -- pll = 0x142c; -- } -+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) -+ pll = 0x142c; -+ else if (AR_SREV_9280_20(ah)) -+ pll = 0x2850; -+ else -+ pll |= SM(0x28, AR_RTC_9160_PLL_DIV); - } else { - pll |= SM(0x2c, AR_RTC_9160_PLL_DIV); - } ---- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c -@@ -755,7 +755,8 @@ static bool ar9003_hw_init_cal(struct at - } - - /* Do Tx IQ Calibration */ -- ar9003_hw_tx_iq_cal(ah); -+ if (ah->config.tx_iq_calibration) -+ ar9003_hw_tx_iq_cal(ah); - - /* Revert chainmasks to their original values before NF cal */ - ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c -@@ -659,6 +659,9 @@ static void ar9300_swap_eeprom(struct ar - word = swab16(eep->baseEepHeader.regDmn[1]); - eep->baseEepHeader.regDmn[1] = word; - -+ dword = swab32(eep->baseEepHeader.swreg); -+ eep->baseEepHeader.swreg = dword; -+ - dword = swab32(eep->modalHeader2G.antCtrlCommon); - eep->modalHeader2G.antCtrlCommon = dword; - -@@ -1200,7 +1203,7 @@ static u8 ar9003_hw_eeprom_get_tgt_pwr(s - u8 *pFreqBin; - - if (is2GHz) { -- numPiers = AR9300_NUM_5G_20_TARGET_POWERS; -+ numPiers = AR9300_NUM_2G_20_TARGET_POWERS; - pEepromTargetPwr = eep->calTargetPower2G; - pFreqBin = eep->calTarget_freqbin_2G; - } else { -@@ -1236,7 +1239,7 @@ static u8 ar9003_hw_eeprom_get_ht20_tgt_ - u8 *pFreqBin; - - if (is2GHz) { -- numPiers = AR9300_NUM_5G_20_TARGET_POWERS; -+ numPiers = AR9300_NUM_2G_20_TARGET_POWERS; - pEepromTargetPwr = eep->calTargetPower2GHT20; - pFreqBin = eep->calTarget_freqbin_2GHT20; - } else { -@@ -1817,6 +1820,7 @@ static void ath9k_hw_ar9300_set_txpower( - u8 twiceMaxRegulatoryPower, - u8 powerLimit) - { -+ ah->txpower_limit = powerLimit; - ar9003_hw_set_target_power_eeprom(ah, chan->channel); - ar9003_hw_calibration_apply(ah, chan->channel); - } ---- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h -@@ -265,7 +265,7 @@ struct cal_ctl_edge_pwr { - } __packed; - - struct cal_ctl_data_2g { -- struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_5G]; -+ struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_2G]; - } __packed; - - struct cal_ctl_data_5g { ---- a/drivers/net/wireless/ath/ath9k/ar9003_initvals.h -+++ b/drivers/net/wireless/ath/ath9k/ar9003_initvals.h -@@ -31,7 +31,7 @@ static const u32 ar9300_2p0_radio_postam - - static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ -- {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da}, -+ {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002}, - {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004}, -@@ -545,7 +545,7 @@ static const u32 ar9300_2p0_soc_postambl - }; - - static const u32 ar9200_merlin_2p0_radio_core[][2] = { -- /* Addr common */ -+ /* Addr allmodes */ - {0x00007800, 0x00040000}, - {0x00007804, 0xdb005012}, - {0x00007808, 0x04924914}, -@@ -835,71 +835,71 @@ static const u32 ar9300_2p0_baseband_cor - - static const u32 ar9300Modes_high_power_tx_gain_table_2p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ -- {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da}, -+ {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000}, - {0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002}, -- {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004}, -- {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200}, -- {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202}, -- {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400}, -- {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402}, -- {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404}, -- {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603}, -- {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02}, -- {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04}, -- {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20}, -- {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20}, -- {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22}, -- {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24}, -- {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640}, -- {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660}, -- {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861}, -- {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81}, -- {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83}, -- {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84}, -- {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3}, -- {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5}, -- {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9}, -- {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb}, -- {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -+ {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, -+ {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200}, -+ {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202}, -+ {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400}, -+ {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402}, -+ {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404}, -+ {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603}, -+ {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02}, -+ {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04}, -+ {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20}, -+ {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20}, -+ {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22}, -+ {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24}, -+ {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640}, -+ {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660}, -+ {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861}, -+ {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81}, -+ {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83}, -+ {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84}, -+ {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3}, -+ {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5}, -+ {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9}, -+ {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb}, -+ {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec}, -+ {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec}, -+ {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, - {0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000}, - {0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002}, -- {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004}, -- {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200}, -- {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202}, -- {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400}, -- {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402}, -- {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404}, -- {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603}, -- {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02}, -- {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04}, -- {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20}, -- {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20}, -- {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22}, -- {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24}, -- {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640}, -- {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660}, -- {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861}, -- {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81}, -- {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83}, -- {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84}, -- {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3}, -- {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5}, -- {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9}, -- {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb}, -- {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -+ {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004}, -+ {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200}, -+ {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202}, -+ {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400}, -+ {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402}, -+ {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404}, -+ {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603}, -+ {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02}, -+ {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04}, -+ {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20}, -+ {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20}, -+ {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22}, -+ {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24}, -+ {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640}, -+ {0x0000a5c0, 0x4c8a3065, 0x44883e46, 0x44883e46, 0x38801660}, -+ {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861}, -+ {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81}, -+ {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83}, -+ {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84}, -+ {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3}, -+ {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5}, -+ {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9}, -+ {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb}, -+ {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec}, -+ {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec}, -+ {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, - {0x00016044, 0x056db2e6, 0x056db2e6, 0x056db2e6, 0x056db2e6}, - {0x00016048, 0xad241a61, 0xad241a61, 0xad241a61, 0xad241a61}, - {0x00016068, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c}, -@@ -913,71 +913,71 @@ static const u32 ar9300Modes_high_power_ - - static const u32 ar9300Modes_high_ob_db_tx_gain_table_2p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ -- {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da}, -+ {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000}, - {0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002}, -- {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004}, -- {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200}, -- {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202}, -- {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400}, -- {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402}, -- {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404}, -- {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603}, -- {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02}, -- {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04}, -- {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20}, -- {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20}, -- {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22}, -- {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24}, -- {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640}, -- {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660}, -- {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861}, -- {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81}, -- {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83}, -- {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84}, -- {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3}, -- {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5}, -- {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9}, -- {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb}, -- {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -- {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec}, -+ {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, -+ {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200}, -+ {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202}, -+ {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400}, -+ {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402}, -+ {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404}, -+ {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603}, -+ {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02}, -+ {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04}, -+ {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20}, -+ {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20}, -+ {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22}, -+ {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24}, -+ {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640}, -+ {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660}, -+ {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861}, -+ {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81}, -+ {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83}, -+ {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84}, -+ {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3}, -+ {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5}, -+ {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9}, -+ {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb}, -+ {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec}, -+ {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec}, -+ {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, -+ {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec}, - {0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000}, - {0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002}, -- {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004}, -- {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200}, -- {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202}, -- {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400}, -- {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402}, -- {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404}, -- {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603}, -- {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02}, -- {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04}, -- {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20}, -- {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20}, -- {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22}, -- {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24}, -- {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640}, -- {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660}, -- {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861}, -- {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81}, -- {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83}, -- {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84}, -- {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3}, -- {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5}, -- {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9}, -- {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb}, -- {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -- {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec}, -+ {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004}, -+ {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200}, -+ {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202}, -+ {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400}, -+ {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402}, -+ {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404}, -+ {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603}, -+ {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02}, -+ {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04}, -+ {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20}, -+ {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20}, -+ {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22}, -+ {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24}, -+ {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640}, -+ {0x0000a5c0, 0x44883e46, 0x44883e46, 0x38801660, 0x38801660}, -+ {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861}, -+ {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81}, -+ {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83}, -+ {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84}, -+ {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3}, -+ {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5}, -+ {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9}, -+ {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb}, -+ {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec}, -+ {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec}, -+ {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, -+ {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec}, - {0x00016044, 0x056db2e4, 0x056db2e4, 0x056db2e4, 0x056db2e4}, - {0x00016048, 0x8c001a61, 0x8c001a61, 0x8c001a61, 0x8c001a61}, - {0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, -@@ -1251,7 +1251,7 @@ static const u32 ar9300Common_rx_gain_ta - - static const u32 ar9300Modes_low_ob_db_tx_gain_table_2p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ -- {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da}, -+ {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002}, - {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004}, -@@ -1760,31 +1760,22 @@ static const u32 ar9300_2p0_soc_preamble - {0x00007038, 0x000004c2}, - }; - --/* -- * PCIE-PHY programming array, to be used prior to entering -- * full sleep (holding RTC in reset, PLL is ON in L1 mode) -- */ - static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p0[][2] = { -+ /* Addr allmodes */ - {0x00004040, 0x08212e5e}, - {0x00004040, 0x0008003b}, - {0x00004044, 0x00000000}, - }; - --/* -- * PCIE-PHY programming array, to be used when not in -- * full sleep (holding RTC in reset) -- */ - static const u32 ar9300PciePhy_clkreq_enable_L1_2p0[][2] = { -+ /* Addr allmodes */ - {0x00004040, 0x08253e5e}, - {0x00004040, 0x0008003b}, - {0x00004044, 0x00000000}, - }; - --/* -- * PCIE-PHY programming array, to be used prior to entering -- * full sleep (holding RTC in reset) -- */ - static const u32 ar9300PciePhy_clkreq_disable_L1_2p0[][2] = { -+ /* Addr allmodes */ - {0x00004040, 0x08213e5e}, - {0x00004040, 0x0008003b}, - {0x00004044, 0x00000000}, ---- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c -@@ -311,6 +311,9 @@ static void ar9003_hw_set11n_txdesc(stru - { - struct ar9003_txc *ads = (struct ar9003_txc *) ds; - -+ if (txpower > ah->txpower_limit) -+ txpower = ah->txpower_limit; -+ - txpower += ah->txpower_indexoffset; - if (txpower > 63) - txpower = 63; ---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c -+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c -@@ -375,16 +375,7 @@ static u32 ar9003_hw_compute_pll_control - else if (chan && IS_CHAN_QUARTER_RATE(chan)) - pll |= SM(0x2, AR_RTC_9300_PLL_CLKSEL); - -- if (chan && IS_CHAN_5GHZ(chan)) { -- pll |= SM(0x28, AR_RTC_9300_PLL_DIV); -- -- /* -- * When doing fast clock, set PLL to 0x142c -- */ -- if (IS_CHAN_A_5MHZ_SPACED(chan)) -- pll = 0x142c; -- } else -- pll |= SM(0x2c, AR_RTC_9300_PLL_DIV); -+ pll |= SM(0x2c, AR_RTC_9300_PLL_DIV); - - return pll; - } -@@ -592,7 +583,7 @@ static int ar9003_hw_process_ini(struct - * For 5GHz channels requiring Fast Clock, apply - * different modal values. - */ -- if (IS_CHAN_A_5MHZ_SPACED(chan)) -+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) - REG_WRITE_ARRAY(&ah->iniModesAdditional, - modesIndex, regWrites); - -@@ -622,7 +613,7 @@ static void ar9003_hw_set_rfmode(struct - rfMode |= (IS_CHAN_B(chan) || IS_CHAN_G(chan)) - ? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM; - -- if (IS_CHAN_A_5MHZ_SPACED(chan)) -+ if (IS_CHAN_A_FAST_CLOCK(ah, chan)) - rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE); - - REG_WRITE(ah, AR_PHY_MODE, rfMode); -@@ -1102,6 +1093,7 @@ static void ar9003_hw_loadnf(struct ath_ - ath_print(common, ATH_DBG_ANY, "Timeout while waiting for nf " - "to load: AR_PHY_AGC_CONTROL=0x%x\n", - REG_READ(ah, AR_PHY_AGC_CONTROL)); -+ return; - } - - /* ---- a/drivers/net/wireless/ath/ath9k/eeprom.h -+++ b/drivers/net/wireless/ath/ath9k/eeprom.h -@@ -300,7 +300,8 @@ struct base_eep_header { - u32 binBuildNumber; - u8 deviceType; - u8 pwdclkind; -- u8 futureBase_1[2]; -+ u8 fastClk5g; -+ u8 divChain; - u8 rxGainType; - u8 dacHiPwrMode_5G; - u8 openLoopPwrCntl; ---- a/drivers/net/wireless/ath/ath9k/eeprom_def.c -+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c -@@ -274,6 +274,8 @@ static u32 ath9k_hw_def_get_eeprom(struc - return pBase->txMask; - case EEP_RX_MASK: - return pBase->rxMask; -+ case EEP_FSTCLK_5G: -+ return pBase->fastClk5g; - case EEP_RXGAIN_TYPE: - return pBase->rxGainType; - case EEP_TXGAIN_TYPE: ---- a/drivers/net/wireless/ath/ath9k/hw.c -+++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -29,6 +29,7 @@ - #define ATH9K_CLOCK_RATE_CCK 22 - #define ATH9K_CLOCK_RATE_5GHZ_OFDM 40 - #define ATH9K_CLOCK_RATE_2GHZ_OFDM 44 -+#define ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM 44 - - static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type); - -@@ -94,7 +95,11 @@ static u32 ath9k_hw_mac_clks(struct ath_ - return usecs *ATH9K_CLOCK_RATE_CCK; - if (conf->channel->band == IEEE80211_BAND_2GHZ) - return usecs *ATH9K_CLOCK_RATE_2GHZ_OFDM; -- return usecs *ATH9K_CLOCK_RATE_5GHZ_OFDM; -+ -+ if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK) -+ return usecs * ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM; -+ else -+ return usecs * ATH9K_CLOCK_RATE_5GHZ_OFDM; - } - - static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs) -@@ -390,6 +395,12 @@ static void ath9k_hw_init_config(struct - ah->config.rx_intr_mitigation = true; - - /* -+ * Tx IQ Calibration (ah->config.tx_iq_calibration) is only -+ * used by AR9003, but it is showing reliability issues. -+ * It will take a while to fix so this is currently disabled. -+ */ -+ -+ /* - * We need this for PCI devices only (Cardbus, PCI, miniPCI) - * _and_ if on non-uniprocessor systems (Multiprocessor/HT). - * This means we use it for all AR5416 devices, and the few -@@ -1233,8 +1244,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st - (chan->channel != ah->curchan->channel) && - ((chan->channelFlags & CHANNEL_ALL) == - (ah->curchan->channelFlags & CHANNEL_ALL)) && -- !(AR_SREV_9280(ah) || IS_CHAN_A_5MHZ_SPACED(chan) || -- IS_CHAN_A_5MHZ_SPACED(ah->curchan))) { -+ !AR_SREV_9280(ah)) { - - if (ath9k_hw_channel_change(ah, chan)) { - ath9k_hw_loadnf(ah, ah->curchan); -@@ -2198,7 +2208,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw - } - - if (AR_SREV_9300_20_OR_LATER(ah)) { -- pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC; -+ pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC | -+ ATH9K_HW_CAP_FASTCLOCK; - pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH; - pCap->rx_lp_qdepth = ATH9K_HW_RX_LP_QDEPTH; - pCap->rx_status_len = sizeof(struct ar9003_rxs); -@@ -2206,6 +2217,11 @@ int ath9k_hw_fill_cap_info(struct ath_hw - pCap->txs_len = sizeof(struct ar9003_txs); - } else { - pCap->tx_desc_len = sizeof(struct ath_desc); -+ if (AR_SREV_9280_20(ah) && -+ ((ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) <= -+ AR5416_EEP_MINOR_VER_16) || -+ ah->eep_ops->get_eeprom(ah, EEP_FSTCLK_5G))) -+ pCap->hw_caps |= ATH9K_HW_CAP_FASTCLOCK; - } - - if (AR_SREV_9300_20_OR_LATER(ah)) ---- a/drivers/net/wireless/ath/ath9k/hw.h -+++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -198,6 +198,7 @@ enum ath9k_hw_caps { - ATH9K_HW_CAP_EDMA = BIT(17), - ATH9K_HW_CAP_RAC_SUPPORTED = BIT(18), - ATH9K_HW_CAP_LDPC = BIT(19), -+ ATH9K_HW_CAP_FASTCLOCK = BIT(20), - }; - - enum ath9k_capability_type { -@@ -261,6 +262,7 @@ struct ath9k_ops_config { - #define AR_BASE_FREQ_5GHZ 4900 - #define AR_SPUR_FEEQ_BOUND_HT40 19 - #define AR_SPUR_FEEQ_BOUND_HT20 10 -+ bool tx_iq_calibration; /* Only available for >= AR9003 */ - int spurmode; - u16 spurchans[AR_EEPROM_MODAL_SPURS][2]; - u8 max_txtrig_level; -@@ -367,10 +369,9 @@ struct ath9k_channel { - #define IS_CHAN_2GHZ(_c) (((_c)->channelFlags & CHANNEL_2GHZ) != 0) - #define IS_CHAN_HALF_RATE(_c) (((_c)->channelFlags & CHANNEL_HALF) != 0) - #define IS_CHAN_QUARTER_RATE(_c) (((_c)->channelFlags & CHANNEL_QUARTER) != 0) --#define IS_CHAN_A_5MHZ_SPACED(_c) \ -+#define IS_CHAN_A_FAST_CLOCK(_ah, _c) \ - ((((_c)->channelFlags & CHANNEL_5GHZ) != 0) && \ -- (((_c)->channel % 20) != 0) && \ -- (((_c)->channel % 10) != 0)) -+ ((_ah)->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)) - - /* These macros check chanmode and not channelFlags */ - #define IS_CHAN_B(_c) ((_c)->chanmode == CHANNEL_B) -@@ -718,6 +719,7 @@ struct ath_hw { - u32 *addac5416_21; - u32 *bank6Temp; - -+ u8 txpower_limit; - int16_t txpower_indexoffset; - int coverage_class; - u32 beacon_interval; ---- a/drivers/net/wireless/ath/ath9k/mac.c -+++ b/drivers/net/wireless/ath/ath9k/mac.c -@@ -878,10 +878,12 @@ enum ath9k_int ath9k_hw_set_interrupts(s - if (ints & ATH9K_INT_TX) { - if (ah->config.tx_intr_mitigation) - mask |= AR_IMR_TXMINTR | AR_IMR_TXINTM; -- if (ah->txok_interrupt_mask) -- mask |= AR_IMR_TXOK; -- if (ah->txdesc_interrupt_mask) -- mask |= AR_IMR_TXDESC; -+ else { -+ if (ah->txok_interrupt_mask) -+ mask |= AR_IMR_TXOK; -+ if (ah->txdesc_interrupt_mask) -+ mask |= AR_IMR_TXDESC; -+ } - if (ah->txerr_interrupt_mask) - mask |= AR_IMR_TXERR; - if (ah->txeol_interrupt_mask) ---- a/drivers/net/wireless/ath/ath9k/xmit.c -+++ b/drivers/net/wireless/ath/ath9k/xmit.c -@@ -2291,6 +2291,8 @@ void ath_tx_edma_tasklet(struct ath_soft - ath_tx_complete_buf(sc, bf, txq, &bf_head, - &txs, txok, 0); - -+ ath_wake_mac80211_queue(sc, txq); -+ - spin_lock_bh(&txq->axq_lock); - if (!list_empty(&txq->txq_fifo_pending)) { - INIT_LIST_HEAD(&bf_head); diff --git a/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch b/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch index 4a2b4dc5c1..744581167c 100644 --- a/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch +++ b/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c -@@ -3852,6 +3852,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw"); +@@ -3850,6 +3850,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw"); MODULE_FIRMWARE("mwl8k/fmimage_8366.fw"); static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = { diff --git a/package/mac80211/patches/800-cfg80211_ap_isolate.patch b/package/mac80211/patches/800-cfg80211_ap_isolate.patch deleted file mode 100644 index c9a241ace4..0000000000 --- a/package/mac80211/patches/800-cfg80211_ap_isolate.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- a/include/linux/nl80211.h -+++ b/include/linux/nl80211.h -@@ -709,6 +709,9 @@ enum nl80211_commands { - * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE, - * NL80211_CMD_DISASSOCIATE. - * -+ * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations -+ * connected to this BSS. -+ * - * @NL80211_ATTR_MAX: highest attribute number currently defined - * @__NL80211_ATTR_AFTER_LAST: internal use - */ -@@ -864,6 +867,8 @@ enum nl80211_attrs { - - NL80211_ATTR_LOCAL_STATE_CHANGE, - -+ NL80211_ATTR_AP_ISOLATE, -+ - /* add attributes here, update the policy in nl80211.c */ - - __NL80211_ATTR_AFTER_LAST, ---- a/include/net/cfg80211.h -+++ b/include/net/cfg80211.h -@@ -512,6 +512,7 @@ struct mpath_info { - * @basic_rates: basic rates in IEEE 802.11 format - * (or NULL for no change) - * @basic_rates_len: number of basic rates -+ * @ap_isolate: do not forward packets between connected stations - */ - struct bss_parameters { - int use_cts_prot; -@@ -519,6 +520,7 @@ struct bss_parameters { - int use_short_slot_time; - u8 *basic_rates; - u8 basic_rates_len; -+ int ap_isolate; - }; - - struct mesh_config { ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -154,6 +154,7 @@ static const struct nla_policy nl80211_p - [NL80211_ATTR_PS_STATE] = { .type = NLA_U32 }, - [NL80211_ATTR_CQM] = { .type = NLA_NESTED, }, - [NL80211_ATTR_LOCAL_STATE_CHANGE] = { .type = NLA_FLAG }, -+ [NL80211_ATTR_AP_ISOLATE] = { .type = NLA_U8 }, - }; - - /* policy for the attributes */ -@@ -2449,6 +2450,7 @@ static int nl80211_set_bss(struct sk_buf - params.use_cts_prot = -1; - params.use_short_preamble = -1; - params.use_short_slot_time = -1; -+ params.ap_isolate = -1; - - if (info->attrs[NL80211_ATTR_BSS_CTS_PROT]) - params.use_cts_prot = -@@ -2465,6 +2467,8 @@ static int nl80211_set_bss(struct sk_buf - params.basic_rates_len = - nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]); - } -+ if (info->attrs[NL80211_ATTR_AP_ISOLATE]) -+ params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]); - - rtnl_lock(); - diff --git a/package/mac80211/patches/801-mac80211_ap_isolate.patch b/package/mac80211/patches/801-mac80211_ap_isolate.patch deleted file mode 100644 index 9bcf1029dc..0000000000 --- a/package/mac80211/patches/801-mac80211_ap_isolate.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -1115,6 +1115,13 @@ static int ieee80211_change_bss(struct w - changed |= BSS_CHANGED_BASIC_RATES; - } - -+ if (params->ap_isolate >= 0) { -+ if (params->ap_isolate) -+ sdata->flags |= IEEE80211_SDATA_DONT_BRIDGE_PACKETS; -+ else -+ sdata->flags &= ~IEEE80211_SDATA_DONT_BRIDGE_PACKETS; -+ } -+ - ieee80211_bss_info_change_notify(sdata, changed); - - return 0; diff --git a/package/mac80211/patches/802-mac80211_cfg_fix.patch b/package/mac80211/patches/802-mac80211_cfg_fix.patch deleted file mode 100644 index 0ed0b6bd46..0000000000 --- a/package/mac80211/patches/802-mac80211_cfg_fix.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -97,9 +97,6 @@ static int ieee80211_change_iface(struct - params->mesh_id_len, - params->mesh_id); - -- if (sdata->vif.type != NL80211_IFTYPE_MONITOR || !flags) -- return 0; -- - if (type == NL80211_IFTYPE_AP_VLAN && - params && params->use_4addr == 0) - rcu_assign_pointer(sdata->u.vlan.sta, NULL); -@@ -107,7 +104,9 @@ static int ieee80211_change_iface(struct - params && params->use_4addr >= 0) - sdata->u.mgd.use_4addr = params->use_4addr; - -- sdata->u.mntr_flags = *flags; -+ if (sdata->vif.type == NL80211_IFTYPE_MONITOR && flags) -+ sdata->u.mntr_flags = *flags; -+ - return 0; - } -