mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-28 14:13:21 +02:00
[backfire] backport mac80211 fixes from trunk
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@22089 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
28aadec5f7
commit
b50614e1f7
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-06-28
|
||||
PKG_VERSION:=2010-07-06
|
||||
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:=10100e68991ed0749ee52cfc1704966b
|
||||
PKG_MD5SUM:=e669e4c2ed4f0cc9a6a28e941d766eac
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
11
package/mac80211/patches/030-backport_93c86_eeprom.patch
Normal file
11
package/mac80211/patches/030-backport_93c86_eeprom.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/include/linux/compat-2.6.36.h
|
||||
+++ b/include/linux/compat-2.6.36.h
|
||||
@@ -8,6 +8,8 @@
|
||||
#define kparam_block_sysfs_write(a)
|
||||
#define kparam_unblock_sysfs_write(a)
|
||||
|
||||
+#define PCI_EEPROM_WIDTH_93C86 8
|
||||
+
|
||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */
|
||||
|
||||
#endif /* LINUX_26_36_COMPAT_H */
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1407,7 +1407,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1416,7 +1416,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);
|
||||
|
@ -54,7 +54,7 @@
|
||||
ath9k_reg_notifier);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -594,6 +594,8 @@ struct ath_softc {
|
||||
@@ -596,6 +596,8 @@ struct ath_softc {
|
||||
|
||||
int beacon_interval;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -466,6 +466,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -467,6 +467,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
@ -1,39 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1280,7 +1280,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
macStaId1 = REG_READ(ah, AR_STA_ID1) & AR_STA_ID1_BASE_RATE_11B;
|
||||
|
||||
/* For chips on which RTC reset is done, save TSF before it gets cleared */
|
||||
- if (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
|
||||
+ if (AR_SREV_9100(ah) ||
|
||||
+ (AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL)))
|
||||
tsf = ath9k_hw_gettsf64(ah);
|
||||
|
||||
saveLedState = REG_READ(ah, AR_CFG_LED) &
|
||||
@@ -1312,7 +1313,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
}
|
||||
|
||||
/* Restore TSF */
|
||||
- if (tsf && AR_SREV_9280(ah) && ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
|
||||
+ if (tsf)
|
||||
ath9k_hw_settsf64(ah, tsf);
|
||||
|
||||
if (AR_SREV_9280_10_OR_LATER(ah))
|
||||
@@ -1325,6 +1326,17 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
+ /*
|
||||
+ * Some AR91xx SoC devices frequently fail to accept TSF writes
|
||||
+ * right after the chip reset. When that happens, write a new
|
||||
+ * value after the initvals have been applied, with an offset
|
||||
+ * based on measured time differences
|
||||
+ */
|
||||
+ if (AR_SREV_9100(ah) && (ath9k_hw_gettsf64(ah) < tsf)) {
|
||||
+ tsf += 1500;
|
||||
+ ath9k_hw_settsf64(ah, tsf);
|
||||
+ }
|
||||
+
|
||||
/* Setup MFP options for CCMP */
|
||||
if (AR_SREV_9280_20_OR_LATER(ah)) {
|
||||
/* Mask Retry(b11), PwrMgt(b12), MoreData(b13) to 0 in mgmt
|
68
package/mac80211/patches/510-ath9k_aggr_buffer_leak.patch
Normal file
68
package/mac80211/patches/510-ath9k_aggr_buffer_leak.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -2430,37 +2430,37 @@ void ath_tx_node_init(struct ath_softc *
|
||||
|
||||
void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
|
||||
{
|
||||
- int i;
|
||||
- struct ath_atx_ac *ac, *ac_tmp;
|
||||
- struct ath_atx_tid *tid, *tid_tmp;
|
||||
+ struct ath_atx_ac *ac;
|
||||
+ struct ath_atx_tid *tid;
|
||||
struct ath_txq *txq;
|
||||
+ int i, tidno;
|
||||
|
||||
- for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
|
||||
- if (ATH_TXQ_SETUP(sc, i)) {
|
||||
- txq = &sc->tx.txq[i];
|
||||
-
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
-
|
||||
- list_for_each_entry_safe(ac,
|
||||
- ac_tmp, &txq->axq_acq, list) {
|
||||
- tid = list_first_entry(&ac->tid_q,
|
||||
- struct ath_atx_tid, list);
|
||||
- if (tid && tid->an != an)
|
||||
- continue;
|
||||
- list_del(&ac->list);
|
||||
- ac->sched = false;
|
||||
-
|
||||
- list_for_each_entry_safe(tid,
|
||||
- tid_tmp, &ac->tid_q, list) {
|
||||
- list_del(&tid->list);
|
||||
- tid->sched = false;
|
||||
- ath_tid_drain(sc, txq, tid);
|
||||
- tid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
- tid->state &= ~AGGR_CLEANUP;
|
||||
- }
|
||||
- }
|
||||
+ for (tidno = 0, tid = &an->tid[tidno];
|
||||
+ tidno < WME_NUM_TID; tidno++, tid++) {
|
||||
+ i = tid->ac->qnum;
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ if (!ATH_TXQ_SETUP(sc, i))
|
||||
+ continue;
|
||||
+
|
||||
+ txq = &sc->tx.txq[i];
|
||||
+ ac = tid->ac;
|
||||
+
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ if (tid->sched) {
|
||||
+ list_del(&tid->list);
|
||||
+ tid->sched = false;
|
||||
}
|
||||
+
|
||||
+ if (ac->sched) {
|
||||
+ list_del(&ac->list);
|
||||
+ tid->ac->sched = false;
|
||||
+ }
|
||||
+
|
||||
+ ath_tid_drain(sc, txq, tid);
|
||||
+ tid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
+ tid->state &= ~AGGR_CLEANUP;
|
||||
+
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -329,6 +329,7 @@ static void ath_tx_complete_aggr(struct
|
||||
int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
|
||||
bool rc_update = true;
|
||||
struct ieee80211_tx_rate rates[4];
|
||||
+ unsigned long flags;
|
||||
|
||||
skb = bf->bf_mpdu;
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -344,6 +345,10 @@ static void ath_tx_complete_aggr(struct
|
||||
sta = ieee80211_find_sta_by_hw(hw, hdr->addr1);
|
||||
if (!sta) {
|
||||
rcu_read_unlock();
|
||||
+
|
||||
+ spin_lock_irqsave(&sc->tx.txbuflock, flags);
|
||||
+ list_splice_tail_init(bf_q, &sc->tx.txbuf);
|
||||
+ spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
|
||||
return;
|
||||
}
|
||||
|
@ -1,59 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9001_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9001_initvals.h
|
||||
@@ -1217,7 +1217,7 @@ static const u32 ar5416Addac_9160[][2] =
|
||||
{0x000098cc, 0x00000000 },
|
||||
};
|
||||
|
||||
-static const u32 ar5416Addac_91601_1[][2] = {
|
||||
+static const u32 ar5416Addac_9160_1_1[][2] = {
|
||||
{0x0000989c, 0x00000000 },
|
||||
{0x0000989c, 0x00000000 },
|
||||
{0x0000989c, 0x00000000 },
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
|
||||
@@ -179,8 +179,8 @@ static void ar9002_hw_init_mode_regs(str
|
||||
ARRAY_SIZE(ar5416Bank7_9160), 2);
|
||||
if (AR_SREV_9160_11(ah)) {
|
||||
INIT_INI_ARRAY(&ah->iniAddac,
|
||||
- ar5416Addac_91601_1,
|
||||
- ARRAY_SIZE(ar5416Addac_91601_1), 2);
|
||||
+ ar5416Addac_9160_1_1,
|
||||
+ ARRAY_SIZE(ar5416Addac_9160_1_1), 2);
|
||||
} else {
|
||||
INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac_9160,
|
||||
ARRAY_SIZE(ar5416Addac_9160), 2);
|
||||
@@ -239,12 +239,12 @@ void ar9002_hw_cck_chan14_spread(struct
|
||||
{
|
||||
if (AR_SREV_9287_11_OR_LATER(ah)) {
|
||||
INIT_INI_ARRAY(&ah->iniCckfirNormal,
|
||||
- ar9287Common_normal_cck_fir_coeff_92871_1,
|
||||
- ARRAY_SIZE(ar9287Common_normal_cck_fir_coeff_92871_1),
|
||||
+ ar9287Common_normal_cck_fir_coeff_9287_1_1,
|
||||
+ ARRAY_SIZE(ar9287Common_normal_cck_fir_coeff_9287_1_1),
|
||||
2);
|
||||
INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
|
||||
- ar9287Common_japan_2484_cck_fir_coeff_92871_1,
|
||||
- ARRAY_SIZE(ar9287Common_japan_2484_cck_fir_coeff_92871_1),
|
||||
+ ar9287Common_japan_2484_cck_fir_coeff_9287_1_1,
|
||||
+ ARRAY_SIZE(ar9287Common_japan_2484_cck_fir_coeff_9287_1_1),
|
||||
2);
|
||||
}
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
|
||||
@@ -4142,13 +4142,13 @@ static const u32 ar9287Common_9287_1_1[]
|
||||
* registers be programmed differently from the channel between 2412 and
|
||||
* 2472 MHz.
|
||||
*/
|
||||
-static const u32 ar9287Common_normal_cck_fir_coeff_92871_1[][2] = {
|
||||
+static const u32 ar9287Common_normal_cck_fir_coeff_9287_1_1[][2] = {
|
||||
{ 0x0000a1f4, 0x00fffeff },
|
||||
{ 0x0000a1f8, 0x00f5f9ff },
|
||||
{ 0x0000a1fc, 0xb79f6427 },
|
||||
};
|
||||
|
||||
-static const u32 ar9287Common_japan_2484_cck_fir_coeff_92871_1[][2] = {
|
||||
+static const u32 ar9287Common_japan_2484_cck_fir_coeff_9287_1_1[][2] = {
|
||||
{ 0x0000a1f4, 0x00000000 },
|
||||
{ 0x0000a1f8, 0xefff0301 },
|
||||
{ 0x0000a1fc, 0xca9228ee },
|
File diff suppressed because it is too large
Load Diff
@ -1,376 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9001_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9001_initvals.h
|
||||
@@ -21,6 +21,8 @@ static const u32 ar5416Modes_9100[][6] =
|
||||
{0x000010f0, 0x0000a000, 0x00014000, 0x00016000, 0x0000b000, 0x00014008},
|
||||
{0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00, 0x06e006e0},
|
||||
{0x0000801c, 0x128d93a7, 0x128d93cf, 0x12e013d7, 0x12e013ab, 0x098813cf},
|
||||
+ {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810, 0x08f04810},
|
||||
+ {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a, 0x0000320a},
|
||||
{0x00009804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, 0x00000303},
|
||||
{0x00009820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
|
||||
{0x00009824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
|
||||
@@ -31,17 +33,17 @@ static const u32 ar5416Modes_9100[][6] =
|
||||
{0x00009848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
{0x0000a848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
{0x0000b848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
- {0x00009850, 0x6d48b4e2, 0x6d48b4e2, 0x6d48b0e2, 0x6d48b0e2, 0x6d48b0e2},
|
||||
- {0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec86d2e, 0x7ec84d2e, 0x7ec82d2e},
|
||||
- {0x0000985c, 0x3139605e, 0x3139605e, 0x3139605e, 0x3139605e, 0x3139605e},
|
||||
+ {0x00009850, 0x6c48b4e2, 0x6d48b4e2, 0x6d48b0e2, 0x6c48b0e2, 0x6c48b0e2},
|
||||
+ {0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e},
|
||||
+ {0x0000985c, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e, 0x31395d5e},
|
||||
{0x00009860, 0x00048d18, 0x00048d18, 0x00048d20, 0x00048d20, 0x00048d18},
|
||||
{0x0000c864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00},
|
||||
{0x00009868, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0},
|
||||
{0x0000986c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081},
|
||||
- {0x00009914, 0x000007d0, 0x000007d0, 0x00000898, 0x00000898, 0x000007d0},
|
||||
+ {0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0},
|
||||
{0x00009918, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b, 0x00000016},
|
||||
- {0x00009924, 0xd00a8a07, 0xd00a8a07, 0xd00a8a11, 0xd00a8a0d, 0xd00a8a0d},
|
||||
- {0x00009940, 0x00754604, 0x00754604, 0xfff81204, 0xfff81204, 0xfff81204},
|
||||
+ {0x00009924, 0xd00a8a07, 0xd00a8a07, 0xd00a8a0d, 0xd00a8a0d, 0xd00a8a0d},
|
||||
+ {0x00009940, 0x00750604, 0x00754604, 0xfff81204, 0xfff81204, 0xfff81204},
|
||||
{0x00009944, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020},
|
||||
{0x00009954, 0x5f3ca3de, 0x5f3ca3de, 0xe250a51e, 0xe250a51e, 0xe250a51e},
|
||||
{0x00009958, 0x2108ecff, 0x2108ecff, 0x3388ffff, 0x3388ffff, 0x3388ffff},
|
||||
@@ -52,7 +54,7 @@ static const u32 ar5416Modes_9100[][6] =
|
||||
{0x0000c9bc, 0x001a0600, 0x001a0600, 0x001a1000, 0x001a0c00, 0x001a0c00},
|
||||
{0x000099c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, 0x038919be},
|
||||
{0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77},
|
||||
- {0x000099c8, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329},
|
||||
+ {0x000099c8, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329},
|
||||
{0x000099cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8},
|
||||
{0x000099d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, 0x00046384},
|
||||
{0x000099d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
@@ -395,12 +397,12 @@ static const u32 ar5416Common_9100[][2]
|
||||
{0x0000a22c, 0x00000000},
|
||||
{0x0000a234, 0x20202020},
|
||||
{0x0000a238, 0x20202020},
|
||||
- {0x0000a23c, 0x13c889ae},
|
||||
+ {0x0000a23c, 0x13c889af},
|
||||
{0x0000a240, 0x38490a20},
|
||||
{0x0000a244, 0x00007bb6},
|
||||
{0x0000a248, 0x0fff3ffc},
|
||||
{0x0000a24c, 0x00000001},
|
||||
- {0x0000a250, 0x0000a000},
|
||||
+ {0x0000a250, 0x0000e000},
|
||||
{0x0000a254, 0x00000000},
|
||||
{0x0000a258, 0x0cc75380},
|
||||
{0x0000a25c, 0x0f0f0f01},
|
||||
@@ -671,6 +673,8 @@ static const u32 ar5416Modes_9160[][6] =
|
||||
{0x000010f0, 0x0000a000, 0x00014000, 0x00016000, 0x0000b000, 0x00014008},
|
||||
{0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00, 0x06e006e0},
|
||||
{0x0000801c, 0x128d93a7, 0x128d93cf, 0x12e013d7, 0x12e013ab, 0x098813cf},
|
||||
+ {0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810, 0x08f04810},
|
||||
+ {0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a, 0x0000320a},
|
||||
{0x00009804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, 0x00000303},
|
||||
{0x00009820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, 0x02020200},
|
||||
{0x00009824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e},
|
||||
@@ -681,11 +685,11 @@ static const u32 ar5416Modes_9160[][6] =
|
||||
{0x00009848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
{0x0000a848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
{0x0000b848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68},
|
||||
- {0x00009850, 0x6c48b4e2, 0x6c48b4e2, 0x6c48b0e2, 0x6c48b0e2, 0x6c48b0e2},
|
||||
+ {0x00009850, 0x6c48b4e2, 0x6d48b4e2, 0x6d48b0e2, 0x6c48b0e2, 0x6c48b0e2},
|
||||
{0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e},
|
||||
- {0x0000985c, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e},
|
||||
+ {0x0000985c, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e, 0x31395d5e},
|
||||
{0x00009860, 0x00048d18, 0x00048d18, 0x00048d20, 0x00048d20, 0x00048d18},
|
||||
- {0x0000c864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00},
|
||||
+ {0x00009864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00},
|
||||
{0x00009868, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0},
|
||||
{0x0000986c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081},
|
||||
{0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0},
|
||||
@@ -697,10 +701,10 @@ static const u32 ar5416Modes_9160[][6] =
|
||||
{0x0000b960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40},
|
||||
{0x00009964, 0x00001120, 0x00001120, 0x00001120, 0x00001120, 0x00001120},
|
||||
{0x0000c968, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce, 0x000003ce},
|
||||
- {0x0000c9bc, 0x001a0600, 0x001a0600, 0x001a0c00, 0x001a0c00, 0x001a0c00},
|
||||
+ {0x000099bc, 0x001a0600, 0x001a0600, 0x001a0c00, 0x001a0c00, 0x001a0c00},
|
||||
{0x000099c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, 0x038919be},
|
||||
{0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77},
|
||||
- {0x000099c8, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329},
|
||||
+ {0x000099c8, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329},
|
||||
{0x000099cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8},
|
||||
{0x000099d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, 0x00046384},
|
||||
{0x000099d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
@@ -851,7 +855,6 @@ static const u32 ar5416Common_9160[][2]
|
||||
{0x00008110, 0x00000168},
|
||||
{0x00008118, 0x000100aa},
|
||||
{0x0000811c, 0x00003210},
|
||||
- {0x00008120, 0x08f04800},
|
||||
{0x00008124, 0x00000000},
|
||||
{0x00008128, 0x00000000},
|
||||
{0x0000812c, 0x00000000},
|
||||
@@ -867,7 +870,6 @@ static const u32 ar5416Common_9160[][2]
|
||||
{0x00008178, 0x00000100},
|
||||
{0x0000817c, 0x00000000},
|
||||
{0x000081c4, 0x00000000},
|
||||
- {0x000081d0, 0x00003210},
|
||||
{0x000081ec, 0x00000000},
|
||||
{0x000081f0, 0x00000000},
|
||||
{0x000081f4, 0x00000000},
|
||||
@@ -898,6 +900,7 @@ static const u32 ar5416Common_9160[][2]
|
||||
{0x00008258, 0x00000000},
|
||||
{0x0000825c, 0x400000ff},
|
||||
{0x00008260, 0x00080922},
|
||||
+ {0x00008264, 0x88a00010},
|
||||
{0x00008270, 0x00000000},
|
||||
{0x00008274, 0x40000000},
|
||||
{0x00008278, 0x003e4180},
|
||||
@@ -1058,9 +1061,9 @@ static const u32 ar5416Common_9160[][2]
|
||||
{0x0000a25c, 0x0f0f0f01},
|
||||
{0x0000a260, 0xdfa91f01},
|
||||
{0x0000a268, 0x00000001},
|
||||
- {0x0000a26c, 0x0ebae9c6},
|
||||
- {0x0000b26c, 0x0ebae9c6},
|
||||
- {0x0000c26c, 0x0ebae9c6},
|
||||
+ {0x0000a26c, 0x0e79e5c6},
|
||||
+ {0x0000b26c, 0x0e79e5c6},
|
||||
+ {0x0000c26c, 0x0e79e5c6},
|
||||
{0x0000d270, 0x00820820},
|
||||
{0x0000a278, 0x1ce739ce},
|
||||
{0x0000a27c, 0x050701ce},
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_initvals.h
|
||||
@@ -600,12 +600,6 @@ static const u32 ar9280Modes_9280_2[][6]
|
||||
{0x000099b8, 0x0000001c, 0x0000001c, 0x0000001c, 0x0000001c, 0x0000001c},
|
||||
{0x000099bc, 0x00000a00, 0x00000a00, 0x00000c00, 0x00000c00, 0x00000c00},
|
||||
{0x000099c0, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
|
||||
- {0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77},
|
||||
- {0x000099c8, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329, 0x60f65329},
|
||||
- {0x000099cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8},
|
||||
- {0x000099d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, 0x00046384},
|
||||
- {0x000099d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
- {0x000099d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
|
||||
{0x0000a204, 0x00000444, 0x00000444, 0x00000444, 0x00000444, 0x00000444},
|
||||
{0x0000a20c, 0x00000014, 0x00000014, 0x0001f019, 0x0001f019, 0x0001f019},
|
||||
{0x0000b20c, 0x00000014, 0x00000014, 0x0001f019, 0x0001f019, 0x0001f019},
|
||||
@@ -842,7 +836,7 @@ static const u32 ar9280Common_9280_2[][2
|
||||
{0x00009958, 0x2108ecff},
|
||||
{0x00009940, 0x14750604},
|
||||
{0x0000c95c, 0x004b6a8e},
|
||||
- {0x00009970, 0x190fb515},
|
||||
+ {0x00009970, 0x190fb514},
|
||||
{0x00009974, 0x00000000},
|
||||
{0x00009978, 0x00000001},
|
||||
{0x0000997c, 0x00000000},
|
||||
@@ -860,6 +854,12 @@ static const u32 ar9280Common_9280_2[][2
|
||||
{0x000099ac, 0x006f0000},
|
||||
{0x000099b0, 0x03051000},
|
||||
{0x000099b4, 0x00000820},
|
||||
+ {0x000099c4, 0x06336f77},
|
||||
+ {0x000099c8, 0x6af6532f},
|
||||
+ {0x000099cc, 0x08f186c8},
|
||||
+ {0x000099d0, 0x00046384},
|
||||
+ {0x000099d4, 0x00000000},
|
||||
+ {0x000099d8, 0x00000000},
|
||||
{0x000099dc, 0x00000000},
|
||||
{0x000099e0, 0x00000000},
|
||||
{0x000099e4, 0xaaaaaaaa},
|
||||
@@ -924,7 +924,6 @@ static const u32 ar9280Common_9280_2[][2
|
||||
{0x0000a3e0, 0x000001ce},
|
||||
{0x0000a3e4, 0x00000000},
|
||||
{0x0000a3e8, 0x18c43433},
|
||||
- {0x0000a3ec, 0x00f70081},
|
||||
{0x00007800, 0x00040000},
|
||||
{0x00007804, 0xdb005012},
|
||||
{0x00007808, 0x04924914},
|
||||
@@ -1025,95 +1024,95 @@ static const u32 ar9280Modes_backoff_23d
|
||||
{0x00009ab8, 0x0000af84, 0x0000af84, 0x00008b08, 0x00008b08, 0x00008b08},
|
||||
{0x00009abc, 0x0000af88, 0x0000af88, 0x00008b0c, 0x00008b0c, 0x00008b0c},
|
||||
{0x00009ac0, 0x0000af8c, 0x0000af8c, 0x00008b10, 0x00008b10, 0x00008b10},
|
||||
- {0x00009ac4, 0x0000af90, 0x0000af90, 0x00008b14, 0x00008b14, 0x00008b14},
|
||||
- {0x00009ac8, 0x0000af94, 0x0000af94, 0x00008b01, 0x00008b01, 0x00008b01},
|
||||
- {0x00009acc, 0x0000b380, 0x0000b380, 0x00008b05, 0x00008b05, 0x00008b05},
|
||||
- {0x00009ad0, 0x0000b384, 0x0000b384, 0x00008b09, 0x00008b09, 0x00008b09},
|
||||
- {0x00009ad4, 0x0000b388, 0x0000b388, 0x00008b0d, 0x00008b0d, 0x00008b0d},
|
||||
- {0x00009ad8, 0x0000b38c, 0x0000b38c, 0x00008b11, 0x00008b11, 0x00008b11},
|
||||
- {0x00009adc, 0x0000b390, 0x0000b390, 0x00008b15, 0x00008b15, 0x00008b15},
|
||||
- {0x00009ae0, 0x0000b394, 0x0000b394, 0x00008b02, 0x00008b02, 0x00008b02},
|
||||
- {0x00009ae4, 0x0000b398, 0x0000b398, 0x00008b06, 0x00008b06, 0x00008b06},
|
||||
- {0x00009ae8, 0x0000b780, 0x0000b780, 0x00008b0a, 0x00008b0a, 0x00008b0a},
|
||||
- {0x00009aec, 0x0000b784, 0x0000b784, 0x00008b0e, 0x00008b0e, 0x00008b0e},
|
||||
- {0x00009af0, 0x0000b788, 0x0000b788, 0x00008b12, 0x00008b12, 0x00008b12},
|
||||
- {0x00009af4, 0x0000b78c, 0x0000b78c, 0x00008b16, 0x00008b16, 0x00008b16},
|
||||
- {0x00009af8, 0x0000b790, 0x0000b790, 0x00008b03, 0x00008b03, 0x00008b03},
|
||||
- {0x00009afc, 0x0000b794, 0x0000b794, 0x00008b07, 0x00008b07, 0x00008b07},
|
||||
- {0x00009b00, 0x0000b798, 0x0000b798, 0x00008b0b, 0x00008b0b, 0x00008b0b},
|
||||
- {0x00009b04, 0x0000d784, 0x0000d784, 0x00008b0f, 0x00008b0f, 0x00008b0f},
|
||||
- {0x00009b08, 0x0000d788, 0x0000d788, 0x00008b13, 0x00008b13, 0x00008b13},
|
||||
- {0x00009b0c, 0x0000d78c, 0x0000d78c, 0x00008b17, 0x00008b17, 0x00008b17},
|
||||
- {0x00009b10, 0x0000d790, 0x0000d790, 0x00008b23, 0x00008b23, 0x00008b23},
|
||||
- {0x00009b14, 0x0000f780, 0x0000f780, 0x00008b27, 0x00008b27, 0x00008b27},
|
||||
- {0x00009b18, 0x0000f784, 0x0000f784, 0x00008b2b, 0x00008b2b, 0x00008b2b},
|
||||
- {0x00009b1c, 0x0000f788, 0x0000f788, 0x00008b2f, 0x00008b2f, 0x00008b2f},
|
||||
- {0x00009b20, 0x0000f78c, 0x0000f78c, 0x00008b33, 0x00008b33, 0x00008b33},
|
||||
- {0x00009b24, 0x0000f790, 0x0000f790, 0x00008b37, 0x00008b37, 0x00008b37},
|
||||
- {0x00009b28, 0x0000f794, 0x0000f794, 0x00008b43, 0x00008b43, 0x00008b43},
|
||||
- {0x00009b2c, 0x0000f7a4, 0x0000f7a4, 0x00008b47, 0x00008b47, 0x00008b47},
|
||||
- {0x00009b30, 0x0000f7a8, 0x0000f7a8, 0x00008b4b, 0x00008b4b, 0x00008b4b},
|
||||
- {0x00009b34, 0x0000f7ac, 0x0000f7ac, 0x00008b4f, 0x00008b4f, 0x00008b4f},
|
||||
- {0x00009b38, 0x0000f7b0, 0x0000f7b0, 0x00008b53, 0x00008b53, 0x00008b53},
|
||||
- {0x00009b3c, 0x0000f7b4, 0x0000f7b4, 0x00008b57, 0x00008b57, 0x00008b57},
|
||||
- {0x00009b40, 0x0000f7a1, 0x0000f7a1, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b44, 0x0000f7a5, 0x0000f7a5, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b48, 0x0000f7a9, 0x0000f7a9, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b4c, 0x0000f7ad, 0x0000f7ad, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b50, 0x0000f7b1, 0x0000f7b1, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b54, 0x0000f7b5, 0x0000f7b5, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b58, 0x0000f7c5, 0x0000f7c5, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b5c, 0x0000f7c9, 0x0000f7c9, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b60, 0x0000f7cd, 0x0000f7cd, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b64, 0x0000f7d1, 0x0000f7d1, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b68, 0x0000f7d5, 0x0000f7d5, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b6c, 0x0000f7c2, 0x0000f7c2, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b70, 0x0000f7c6, 0x0000f7c6, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b74, 0x0000f7ca, 0x0000f7ca, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b78, 0x0000f7ce, 0x0000f7ce, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b7c, 0x0000f7d2, 0x0000f7d2, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b80, 0x0000f7d6, 0x0000f7d6, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b84, 0x0000f7c3, 0x0000f7c3, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b88, 0x0000f7c7, 0x0000f7c7, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b8c, 0x0000f7cb, 0x0000f7cb, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b90, 0x0000f7d3, 0x0000f7d3, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b94, 0x0000f7d7, 0x0000f7d7, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b98, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009b9c, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009ba0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009ba4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009ba8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bac, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bb0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bb4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bb8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bbc, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bc0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bc4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bc8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bcc, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bd0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bd4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bd8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bdc, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009be0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009be4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009be8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bec, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bf0, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bf4, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bf8, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009bfc, 0x0000f7db, 0x0000f7db, 0x00008b5b, 0x00008b5b, 0x00008b5b},
|
||||
- {0x00009848, 0x00001066, 0x00001066, 0x00001050, 0x00001050, 0x00001050},
|
||||
- {0x0000a848, 0x00001066, 0x00001066, 0x00001050, 0x00001050, 0x00001050},
|
||||
+ {0x00009ac4, 0x0000af90, 0x0000af90, 0x00008b80, 0x00008b80, 0x00008b80},
|
||||
+ {0x00009ac8, 0x0000af94, 0x0000af94, 0x00008b84, 0x00008b84, 0x00008b84},
|
||||
+ {0x00009acc, 0x0000b380, 0x0000b380, 0x00008b88, 0x00008b88, 0x00008b88},
|
||||
+ {0x00009ad0, 0x0000b384, 0x0000b384, 0x00008b8c, 0x00008b8c, 0x00008b8c},
|
||||
+ {0x00009ad4, 0x0000b388, 0x0000b388, 0x00008b90, 0x00008b90, 0x00008b90},
|
||||
+ {0x00009ad8, 0x0000b38c, 0x0000b38c, 0x00008b94, 0x00008b94, 0x00008b94},
|
||||
+ {0x00009adc, 0x0000b390, 0x0000b390, 0x00008b98, 0x00008b98, 0x00008b98},
|
||||
+ {0x00009ae0, 0x0000b394, 0x0000b394, 0x00008ba4, 0x00008ba4, 0x00008ba4},
|
||||
+ {0x00009ae4, 0x0000b398, 0x0000b398, 0x00008ba8, 0x00008ba8, 0x00008ba8},
|
||||
+ {0x00009ae8, 0x0000b780, 0x0000b780, 0x00008bac, 0x00008bac, 0x00008bac},
|
||||
+ {0x00009aec, 0x0000b784, 0x0000b784, 0x00008bb0, 0x00008bb0, 0x00008bb0},
|
||||
+ {0x00009af0, 0x0000b788, 0x0000b788, 0x00008bb4, 0x00008bb4, 0x00008bb4},
|
||||
+ {0x00009af4, 0x0000b78c, 0x0000b78c, 0x00008ba1, 0x00008ba1, 0x00008ba1},
|
||||
+ {0x00009af8, 0x0000b790, 0x0000b790, 0x00008ba5, 0x00008ba5, 0x00008ba5},
|
||||
+ {0x00009afc, 0x0000b794, 0x0000b794, 0x00008ba9, 0x00008ba9, 0x00008ba9},
|
||||
+ {0x00009b00, 0x0000b798, 0x0000b798, 0x00008bad, 0x00008bad, 0x00008bad},
|
||||
+ {0x00009b04, 0x0000d784, 0x0000d784, 0x00008bb1, 0x00008bb1, 0x00008bb1},
|
||||
+ {0x00009b08, 0x0000d788, 0x0000d788, 0x00008bb5, 0x00008bb5, 0x00008bb5},
|
||||
+ {0x00009b0c, 0x0000d78c, 0x0000d78c, 0x00008ba2, 0x00008ba2, 0x00008ba2},
|
||||
+ {0x00009b10, 0x0000d790, 0x0000d790, 0x00008ba6, 0x00008ba6, 0x00008ba6},
|
||||
+ {0x00009b14, 0x0000f780, 0x0000f780, 0x00008baa, 0x00008baa, 0x00008baa},
|
||||
+ {0x00009b18, 0x0000f784, 0x0000f784, 0x00008bae, 0x00008bae, 0x00008bae},
|
||||
+ {0x00009b1c, 0x0000f788, 0x0000f788, 0x00008bb2, 0x00008bb2, 0x00008bb2},
|
||||
+ {0x00009b20, 0x0000f78c, 0x0000f78c, 0x00008bb6, 0x00008bb6, 0x00008bb6},
|
||||
+ {0x00009b24, 0x0000f790, 0x0000f790, 0x00008ba3, 0x00008ba3, 0x00008ba3},
|
||||
+ {0x00009b28, 0x0000f794, 0x0000f794, 0x00008ba7, 0x00008ba7, 0x00008ba7},
|
||||
+ {0x00009b2c, 0x0000f7a4, 0x0000f7a4, 0x00008bab, 0x00008bab, 0x00008bab},
|
||||
+ {0x00009b30, 0x0000f7a8, 0x0000f7a8, 0x00008baf, 0x00008baf, 0x00008baf},
|
||||
+ {0x00009b34, 0x0000f7ac, 0x0000f7ac, 0x00008bb3, 0x00008bb3, 0x00008bb3},
|
||||
+ {0x00009b38, 0x0000f7b0, 0x0000f7b0, 0x00008bb7, 0x00008bb7, 0x00008bb7},
|
||||
+ {0x00009b3c, 0x0000f7b4, 0x0000f7b4, 0x00008bc3, 0x00008bc3, 0x00008bc3},
|
||||
+ {0x00009b40, 0x0000f7a1, 0x0000f7a1, 0x00008bc7, 0x00008bc7, 0x00008bc7},
|
||||
+ {0x00009b44, 0x0000f7a5, 0x0000f7a5, 0x00008bcb, 0x00008bcb, 0x00008bcb},
|
||||
+ {0x00009b48, 0x0000f7a9, 0x0000f7a9, 0x00008bcf, 0x00008bcf, 0x00008bcf},
|
||||
+ {0x00009b4c, 0x0000f7ad, 0x0000f7ad, 0x00008bd3, 0x00008bd3, 0x00008bd3},
|
||||
+ {0x00009b50, 0x0000f7b1, 0x0000f7b1, 0x00008bd7, 0x00008bd7, 0x00008bd7},
|
||||
+ {0x00009b54, 0x0000f7b5, 0x0000f7b5, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b58, 0x0000f7c5, 0x0000f7c5, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b5c, 0x0000f7c9, 0x0000f7c9, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b60, 0x0000f7cd, 0x0000f7cd, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b64, 0x0000f7d1, 0x0000f7d1, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b68, 0x0000f7d5, 0x0000f7d5, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b6c, 0x0000f7c2, 0x0000f7c2, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b70, 0x0000f7c6, 0x0000f7c6, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b74, 0x0000f7ca, 0x0000f7ca, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b78, 0x0000f7ce, 0x0000f7ce, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b7c, 0x0000f7d2, 0x0000f7d2, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b80, 0x0000f7d6, 0x0000f7d6, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b84, 0x0000f7c3, 0x0000f7c3, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b88, 0x0000f7c7, 0x0000f7c7, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b8c, 0x0000f7cb, 0x0000f7cb, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b90, 0x0000f7d3, 0x0000f7d3, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b94, 0x0000f7d7, 0x0000f7d7, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b98, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009b9c, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009ba0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009ba4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009ba8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bac, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bb0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bb4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bb8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bbc, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bc0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bc4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bc8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bcc, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bd0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bd4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bd8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bdc, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009be0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009be4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009be8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bec, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bf0, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bf4, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bf8, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009bfc, 0x0000f7db, 0x0000f7db, 0x00008bdb, 0x00008bdb, 0x00008bdb},
|
||||
+ {0x00009848, 0x00001066, 0x00001066, 0x00001055, 0x00001055, 0x00001055},
|
||||
+ {0x0000a848, 0x00001066, 0x00001066, 0x00001055, 0x00001055, 0x00001055},
|
||||
};
|
||||
|
||||
static const u32 ar9280Modes_original_rxgain_9280_2[][6] = {
|
||||
- {0x00009a00, 0x00008184, 0x00008184, 0x00000290, 0x00000290, 0x00000290},
|
||||
- {0x00009a04, 0x00008188, 0x00008188, 0x00000300, 0x00000300, 0x00000300},
|
||||
- {0x00009a08, 0x0000818c, 0x0000818c, 0x00000304, 0x00000304, 0x00000304},
|
||||
- {0x00009a0c, 0x00008190, 0x00008190, 0x00000308, 0x00000308, 0x00000308},
|
||||
- {0x00009a10, 0x00008194, 0x00008194, 0x0000030c, 0x0000030c, 0x0000030c},
|
||||
+ {0x00009a00, 0x00008184, 0x00008184, 0x00008000, 0x00008000, 0x00008000},
|
||||
+ {0x00009a04, 0x00008188, 0x00008188, 0x00008000, 0x00008000, 0x00008000},
|
||||
+ {0x00009a08, 0x0000818c, 0x0000818c, 0x00008000, 0x00008000, 0x00008000},
|
||||
+ {0x00009a0c, 0x00008190, 0x00008190, 0x00008000, 0x00008000, 0x00008000},
|
||||
+ {0x00009a10, 0x00008194, 0x00008194, 0x00008000, 0x00008000, 0x00008000},
|
||||
{0x00009a14, 0x00008200, 0x00008200, 0x00008000, 0x00008000, 0x00008000},
|
||||
{0x00009a18, 0x00008204, 0x00008204, 0x00008004, 0x00008004, 0x00008004},
|
||||
{0x00009a1c, 0x00008208, 0x00008208, 0x00008008, 0x00008008, 0x00008008},
|
||||
@@ -1399,6 +1398,7 @@ static const u32 ar9280Modes_high_power_
|
||||
{0x0000a34c, 0x000341ec, 0x000341ec, 0x0004bed5, 0x0004bed5, 0x0004bed5},
|
||||
{0x0000a350, 0x000341ec, 0x000341ec, 0x0004ff54, 0x0004ff54, 0x0004ff54},
|
||||
{0x0000a354, 0x000341ec, 0x000341ec, 0x00055fd5, 0x00055fd5, 0x00055fd5},
|
||||
+ {0x0000a3ec, 0x00f70081, 0x00f70081, 0x00f70081, 0x00f70081, 0x00f70081},
|
||||
{0x00007814, 0x00198eff, 0x00198eff, 0x00198eff, 0x00198eff, 0x00198eff},
|
||||
{0x00007838, 0x00198eff, 0x00198eff, 0x00198eff, 0x00198eff, 0x00198eff},
|
||||
{0x0000781c, 0x00172000, 0x00172000, 0x00172000, 0x00172000, 0x00172000},
|
||||
@@ -1432,6 +1432,7 @@ static const u32 ar9280Modes_original_tx
|
||||
{0x0000a34c, 0x000321ec, 0x000321ec, 0x00046e8a, 0x00046e8a, 0x00046e8a},
|
||||
{0x0000a350, 0x000321ec, 0x000321ec, 0x00049ec9, 0x00049ec9, 0x00049ec9},
|
||||
{0x0000a354, 0x000321ec, 0x000321ec, 0x0004bf42, 0x0004bf42, 0x0004bf42},
|
||||
+ {0x0000a3ec, 0x00f70081, 0x00f70081, 0x00f70081, 0x00f70081, 0x00f70081},
|
||||
{0x00007814, 0x0019beff, 0x0019beff, 0x0019beff, 0x0019beff, 0x0019beff},
|
||||
{0x00007838, 0x0019beff, 0x0019beff, 0x0019beff, 0x0019beff, 0x0019beff},
|
||||
{0x0000781c, 0x00392000, 0x00392000, 0x00392000, 0x00392000, 0x00392000},
|
@ -1,406 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -1678,6 +1678,15 @@ static void ar5008_hw_ani_cache_ini_regs
|
||||
aniState->cycleCount = 0;
|
||||
}
|
||||
|
||||
+static void ar5008_hw_set_nf_limits(struct ath_hw *ah)
|
||||
+{
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_5416_2GHZ;
|
||||
+ ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ;
|
||||
+ ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ;
|
||||
+ ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_5416_5GHZ;
|
||||
+}
|
||||
|
||||
void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
@@ -1715,4 +1724,6 @@ void ar5008_hw_attach_phy_ops(struct ath
|
||||
priv_ops->compute_pll_control = ar9160_hw_compute_pll_control;
|
||||
else
|
||||
priv_ops->compute_pll_control = ar5008_hw_compute_pll_control;
|
||||
+
|
||||
+ ar5008_hw_set_nf_limits(ah);
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
|
||||
@@ -481,9 +481,6 @@ static void ar9002_hw_do_getnf(struct at
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ctl] [chain 0] is %d\n", nf);
|
||||
|
||||
- if (AR_SREV_9271(ah) && (nf >= -114))
|
||||
- nf = -116;
|
||||
-
|
||||
nfarray[0] = nf;
|
||||
|
||||
if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
|
||||
@@ -503,9 +500,6 @@ static void ar9002_hw_do_getnf(struct at
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ext] [chain 0] is %d\n", nf);
|
||||
|
||||
- if (AR_SREV_9271(ah) && (nf >= -114))
|
||||
- nf = -116;
|
||||
-
|
||||
nfarray[3] = nf;
|
||||
|
||||
if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
|
||||
@@ -520,6 +514,30 @@ static void ar9002_hw_do_getnf(struct at
|
||||
}
|
||||
}
|
||||
|
||||
+static void ar9002_hw_set_nf_limits(struct ath_hw *ah)
|
||||
+{
|
||||
+ if (AR_SREV_9285(ah)) {
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9285_2GHZ;
|
||||
+ } else if (AR_SREV_9287(ah)) {
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9287_2GHZ;
|
||||
+ } else if (AR_SREV_9271(ah)) {
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9271_2GHZ;
|
||||
+ } else {
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9280_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9280_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9280_2GHZ;
|
||||
+ ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9280_5GHZ;
|
||||
+ ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9280_5GHZ;
|
||||
+ ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9280_5GHZ;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
|
||||
@@ -532,4 +550,6 @@ void ar9002_hw_attach_phy_ops(struct ath
|
||||
priv_ops->olc_init = ar9002_olc_init;
|
||||
priv_ops->compute_pll_control = ar9002_hw_compute_pll_control;
|
||||
priv_ops->do_getnf = ar9002_hw_do_getnf;
|
||||
+
|
||||
+ ar9002_hw_set_nf_limits(ah);
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.h
|
||||
@@ -576,4 +576,30 @@
|
||||
#define AR_PHY_CH2_EXT_MINCCA_PWR 0xFF800000
|
||||
#define AR_PHY_CH2_EXT_MINCCA_PWR_S 23
|
||||
|
||||
+#define AR_PHY_CCA_NOM_VAL_5416_2GHZ -90
|
||||
+#define AR_PHY_CCA_NOM_VAL_5416_5GHZ -100
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ -100
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ -110
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ -80
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ -90
|
||||
+
|
||||
+#define AR_PHY_CCA_NOM_VAL_9280_2GHZ -112
|
||||
+#define AR_PHY_CCA_NOM_VAL_9280_5GHZ -112
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_9280_2GHZ -127
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_9280_5GHZ -122
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_9280_2GHZ -97
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_9280_5GHZ -102
|
||||
+
|
||||
+#define AR_PHY_CCA_NOM_VAL_9285_2GHZ -118
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ -127
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ -108
|
||||
+
|
||||
+#define AR_PHY_CCA_NOM_VAL_9271_2GHZ -118
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ -127
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ -116
|
||||
+
|
||||
+#define AR_PHY_CCA_NOM_VAL_9287_2GHZ -120
|
||||
+#define AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ -127
|
||||
+#define AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ -110
|
||||
+
|
||||
#endif
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -1015,52 +1015,6 @@ static bool ar9003_hw_ani_control(struct
|
||||
return true;
|
||||
}
|
||||
|
||||
-static void ar9003_hw_nf_sanitize_2g(struct ath_hw *ah, s16 *nf)
|
||||
-{
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
-
|
||||
- if (*nf > ah->nf_2g_max) {
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "2 GHz NF (%d) > MAX (%d), "
|
||||
- "correcting to MAX",
|
||||
- *nf, ah->nf_2g_max);
|
||||
- *nf = ah->nf_2g_max;
|
||||
- } else if (*nf < ah->nf_2g_min) {
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "2 GHz NF (%d) < MIN (%d), "
|
||||
- "correcting to MIN",
|
||||
- *nf, ah->nf_2g_min);
|
||||
- *nf = ah->nf_2g_min;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void ar9003_hw_nf_sanitize_5g(struct ath_hw *ah, s16 *nf)
|
||||
-{
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
-
|
||||
- if (*nf > ah->nf_5g_max) {
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "5 GHz NF (%d) > MAX (%d), "
|
||||
- "correcting to MAX",
|
||||
- *nf, ah->nf_5g_max);
|
||||
- *nf = ah->nf_5g_max;
|
||||
- } else if (*nf < ah->nf_5g_min) {
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "5 GHz NF (%d) < MIN (%d), "
|
||||
- "correcting to MIN",
|
||||
- *nf, ah->nf_5g_min);
|
||||
- *nf = ah->nf_5g_min;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void ar9003_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)
|
||||
-{
|
||||
- if (IS_CHAN_2GHZ(ah->curchan))
|
||||
- ar9003_hw_nf_sanitize_2g(ah, nf);
|
||||
- else
|
||||
- ar9003_hw_nf_sanitize_5g(ah, nf);
|
||||
-}
|
||||
-
|
||||
static void ar9003_hw_do_getnf(struct ath_hw *ah,
|
||||
int16_t nfarray[NUM_NF_READINGS])
|
||||
{
|
||||
@@ -1070,7 +1024,6 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_0), AR_PHY_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ctl] [chain 0] is %d\n", nf);
|
||||
nfarray[0] = nf;
|
||||
@@ -1078,7 +1031,6 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_1), AR_PHY_CH1_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ctl] [chain 1] is %d\n", nf);
|
||||
nfarray[1] = nf;
|
||||
@@ -1086,7 +1038,6 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_2), AR_PHY_CH2_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ctl] [chain 2] is %d\n", nf);
|
||||
nfarray[2] = nf;
|
||||
@@ -1094,7 +1045,6 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ext] [chain 0] is %d\n", nf);
|
||||
nfarray[3] = nf;
|
||||
@@ -1102,7 +1052,6 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA_1), AR_PHY_CH1_EXT_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ext] [chain 1] is %d\n", nf);
|
||||
nfarray[4] = nf;
|
||||
@@ -1110,18 +1059,19 @@ static void ar9003_hw_do_getnf(struct at
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA_2), AR_PHY_CH2_EXT_MINCCA_PWR);
|
||||
if (nf & 0x100)
|
||||
nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ar9003_hw_nf_sanitize(ah, &nf);
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF calibrated [ext] [chain 2] is %d\n", nf);
|
||||
nfarray[5] = nf;
|
||||
}
|
||||
|
||||
-void ar9003_hw_set_nf_limits(struct ath_hw *ah)
|
||||
+static void ar9003_hw_set_nf_limits(struct ath_hw *ah)
|
||||
{
|
||||
- ah->nf_2g_max = AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ;
|
||||
- ah->nf_2g_min = AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ;
|
||||
- ah->nf_5g_max = AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ;
|
||||
- ah->nf_5g_min = AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ;
|
||||
+ ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_2GHZ;
|
||||
+ ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_2GHZ;
|
||||
+ ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9300_2GHZ;
|
||||
+ ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9300_5GHZ;
|
||||
+ ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9300_5GHZ;
|
||||
+ ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9300_5GHZ;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1309,6 +1259,8 @@ void ar9003_hw_attach_phy_ops(struct ath
|
||||
priv_ops->do_getnf = ar9003_hw_do_getnf;
|
||||
priv_ops->loadnf = ar9003_hw_loadnf;
|
||||
priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs;
|
||||
+
|
||||
+ ar9003_hw_set_nf_limits(ah);
|
||||
}
|
||||
|
||||
void ar9003_hw_bb_watchdog_config(struct ath_hw *ah)
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -74,13 +74,8 @@ static void ath9k_hw_update_nfcal_hist_b
|
||||
h[i].currIndex = 0;
|
||||
|
||||
if (h[i].invalidNFcount > 0) {
|
||||
- if (nfarray[i] < AR_PHY_CCA_MIN_BAD_VALUE ||
|
||||
- nfarray[i] > AR_PHY_CCA_MAX_HIGH_VALUE) {
|
||||
- h[i].invalidNFcount = ATH9K_NF_CAL_HIST_MAX;
|
||||
- } else {
|
||||
- h[i].invalidNFcount--;
|
||||
- h[i].privNF = nfarray[i];
|
||||
- }
|
||||
+ h[i].invalidNFcount--;
|
||||
+ h[i].privNF = nfarray[i];
|
||||
} else {
|
||||
h[i].privNF =
|
||||
ath9k_hw_get_nf_hist_mid(h[i].nfCalBuffer);
|
||||
@@ -172,6 +167,35 @@ void ath9k_hw_start_nfcal(struct ath_hw
|
||||
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
|
||||
}
|
||||
|
||||
+static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)
|
||||
+{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ struct ath_nf_limits *limit;
|
||||
+ int i;
|
||||
+
|
||||
+ if (IS_CHAN_2GHZ(ah->curchan))
|
||||
+ limit = &ah->nf_2g;
|
||||
+ else
|
||||
+ limit = &ah->nf_5g;
|
||||
+
|
||||
+ for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
+ if (!nf[i])
|
||||
+ continue;
|
||||
+
|
||||
+ if (nf[i] > limit->max) {
|
||||
+ ath_print(common, ATH_DBG_CALIBRATE,
|
||||
+ "NF[%d] (%d) > MAX (%d), correcting to MAX",
|
||||
+ i, nf[i], limit->max);
|
||||
+ nf[i] = limit->max;
|
||||
+ } else if (nf[i] < limit->min) {
|
||||
+ ath_print(common, ATH_DBG_CALIBRATE,
|
||||
+ "NF[%d] (%d) < MIN (%d), correcting to NOM",
|
||||
+ i, nf[i], limit->min);
|
||||
+ nf[i] = limit->nominal;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
int16_t ath9k_hw_getnf(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan)
|
||||
{
|
||||
@@ -190,6 +214,7 @@ int16_t ath9k_hw_getnf(struct ath_hw *ah
|
||||
return chan->rawNoiseFloor;
|
||||
} else {
|
||||
ath9k_hw_do_getnf(ah, nfarray);
|
||||
+ ath9k_hw_nf_sanitize(ah, nfarray);
|
||||
nf = nfarray[0];
|
||||
if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh)
|
||||
&& nf > nfThresh) {
|
||||
@@ -211,25 +236,21 @@ int16_t ath9k_hw_getnf(struct ath_hw *ah
|
||||
|
||||
void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah)
|
||||
{
|
||||
+ struct ath_nf_limits *limit;
|
||||
int i, j;
|
||||
- s16 noise_floor;
|
||||
|
||||
- if (AR_SREV_9280(ah))
|
||||
- noise_floor = AR_PHY_CCA_MAX_AR9280_GOOD_VALUE;
|
||||
- else if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
|
||||
- noise_floor = AR_PHY_CCA_MAX_AR9285_GOOD_VALUE;
|
||||
- else if (AR_SREV_9287(ah))
|
||||
- noise_floor = AR_PHY_CCA_MAX_AR9287_GOOD_VALUE;
|
||||
+ if (!ah->curchan || IS_CHAN_2GHZ(ah->curchan))
|
||||
+ limit = &ah->nf_2g;
|
||||
else
|
||||
- noise_floor = AR_PHY_CCA_MAX_AR5416_GOOD_VALUE;
|
||||
+ limit = &ah->nf_5g;
|
||||
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
ah->nfCalHist[i].currIndex = 0;
|
||||
- ah->nfCalHist[i].privNF = noise_floor;
|
||||
+ ah->nfCalHist[i].privNF = limit->nominal;
|
||||
ah->nfCalHist[i].invalidNFcount =
|
||||
AR_PHY_CCA_FILTERWINDOW_LENGTH;
|
||||
for (j = 0; j < ATH9K_NF_CAL_HIST_MAX; j++) {
|
||||
- ah->nfCalHist[i].nfCalBuffer[j] = noise_floor;
|
||||
+ ah->nfCalHist[i].nfCalBuffer[j] = limit->nominal;
|
||||
}
|
||||
}
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.h
|
||||
@@ -19,12 +19,6 @@
|
||||
|
||||
#include "hw.h"
|
||||
|
||||
-#define AR_PHY_CCA_MAX_AR5416_GOOD_VALUE -85
|
||||
-#define AR_PHY_CCA_MAX_AR9280_GOOD_VALUE -112
|
||||
-#define AR_PHY_CCA_MAX_AR9285_GOOD_VALUE -118
|
||||
-#define AR_PHY_CCA_MAX_AR9287_GOOD_VALUE -118
|
||||
-#define AR_PHY_CCA_MAX_HIGH_VALUE -62
|
||||
-#define AR_PHY_CCA_MIN_BAD_VALUE -140
|
||||
#define AR_PHY_CCA_FILTERWINDOW_LENGTH_INIT 3
|
||||
#define AR_PHY_CCA_FILTERWINDOW_LENGTH 5
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -621,9 +621,6 @@ static int __ath9k_hw_init(struct ath_hw
|
||||
else
|
||||
ah->tx_trig_level = (AR_FTRIG_512B >> AR_FTRIG_S);
|
||||
|
||||
- if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
- ar9003_hw_set_nf_limits(ah);
|
||||
-
|
||||
ath9k_init_nfcal_hist_buffer(ah);
|
||||
ah->bb_watchdog_timeout_ms = 25;
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -630,6 +630,12 @@ struct ath_hw_ops {
|
||||
void (*ani_monitor)(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
};
|
||||
|
||||
+struct ath_nf_limits {
|
||||
+ s16 max;
|
||||
+ s16 min;
|
||||
+ s16 nominal;
|
||||
+};
|
||||
+
|
||||
struct ath_hw {
|
||||
struct ieee80211_hw *hw;
|
||||
struct ath_common common;
|
||||
@@ -651,10 +657,9 @@ struct ath_hw {
|
||||
bool is_pciexpress;
|
||||
bool need_an_top2_fixup;
|
||||
u16 tx_trig_level;
|
||||
- s16 nf_2g_max;
|
||||
- s16 nf_2g_min;
|
||||
- s16 nf_5g_max;
|
||||
- s16 nf_5g_min;
|
||||
+
|
||||
+ struct ath_nf_limits nf_2g;
|
||||
+ struct ath_nf_limits nf_5g;
|
||||
u16 rfsilent;
|
||||
u32 rfkill_gpio;
|
||||
u32 rfkill_polarity;
|
||||
@@ -945,7 +950,6 @@ void ar9002_hw_enable_wep_aggregation(st
|
||||
* Code specific to AR9003, we stuff these here to avoid callbacks
|
||||
* for older families
|
||||
*/
|
||||
-void ar9003_hw_set_nf_limits(struct ath_hw *ah);
|
||||
void ar9003_hw_bb_watchdog_config(struct ath_hw *ah);
|
||||
void ar9003_hw_bb_watchdog_read(struct ath_hw *ah);
|
||||
void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah);
|
@ -1,207 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
|
||||
@@ -1497,50 +1497,25 @@ static bool ar5008_hw_ani_control_new(st
|
||||
static void ar5008_hw_do_getnf(struct ath_hw *ah,
|
||||
int16_t nfarray[NUM_NF_READINGS])
|
||||
{
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
int16_t nf;
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA), AR_PHY_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 0] is %d\n", nf);
|
||||
- nfarray[0] = nf;
|
||||
+ nfarray[0] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CH1_CCA), AR_PHY_CH1_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 1] is %d\n", nf);
|
||||
- nfarray[1] = nf;
|
||||
+ nfarray[1] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CH2_CCA), AR_PHY_CH2_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 2] is %d\n", nf);
|
||||
- nfarray[2] = nf;
|
||||
+ nfarray[2] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 0] is %d\n", nf);
|
||||
- nfarray[3] = nf;
|
||||
+ nfarray[3] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR_PHY_CH1_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 1] is %d\n", nf);
|
||||
- nfarray[4] = nf;
|
||||
+ nfarray[4] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CH2_EXT_CCA), AR_PHY_CH2_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 2] is %d\n", nf);
|
||||
- nfarray[5] = nf;
|
||||
+ nfarray[5] = sign_extend(nf, 9);
|
||||
}
|
||||
|
||||
static void ar5008_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
|
||||
@@ -471,47 +471,22 @@ static u32 ar9002_hw_compute_pll_control
|
||||
static void ar9002_hw_do_getnf(struct ath_hw *ah,
|
||||
int16_t nfarray[NUM_NF_READINGS])
|
||||
{
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
int16_t nf;
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR);
|
||||
-
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 0] is %d\n", nf);
|
||||
-
|
||||
- nfarray[0] = nf;
|
||||
-
|
||||
- if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
|
||||
- nf = MS(REG_READ(ah, AR_PHY_CH1_CCA),
|
||||
- AR9280_PHY_CH1_MINCCA_PWR);
|
||||
-
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 1] is %d\n", nf);
|
||||
- nfarray[1] = nf;
|
||||
- }
|
||||
+ nfarray[0] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 0] is %d\n", nf);
|
||||
-
|
||||
- nfarray[3] = nf;
|
||||
-
|
||||
- if (!AR_SREV_9285(ah) && !AR_SREV_9271(ah)) {
|
||||
- nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA),
|
||||
- AR9280_PHY_CH1_EXT_MINCCA_PWR);
|
||||
-
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 1] is %d\n", nf);
|
||||
- nfarray[4] = nf;
|
||||
- }
|
||||
+ nfarray[3] = sign_extend(nf, 9);
|
||||
+
|
||||
+ if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
|
||||
+ return;
|
||||
+
|
||||
+ nf = MS(REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR);
|
||||
+ nfarray[1] = sign_extend(nf, 9);
|
||||
+
|
||||
+ nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR);
|
||||
+ nfarray[4] = sign_extend(nf, 9);
|
||||
}
|
||||
|
||||
static void ar9002_hw_set_nf_limits(struct ath_hw *ah)
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -182,6 +182,10 @@ static void ath9k_hw_nf_sanitize(struct
|
||||
if (!nf[i])
|
||||
continue;
|
||||
|
||||
+ ath_print(common, ATH_DBG_CALIBRATE,
|
||||
+ "NF calibrated [%s] [chain %d] is %d\n",
|
||||
+ (i > 3 ? "ext" : "ctl"), i % 3, nf[i]);
|
||||
+
|
||||
if (nf[i] > limit->max) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF[%d] (%d) > MAX (%d), correcting to MAX",
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -853,6 +853,12 @@ static inline struct ath_hw_ops *ath9k_h
|
||||
return &ah->ops;
|
||||
}
|
||||
|
||||
+static inline int sign_extend(int val, const int nbits)
|
||||
+{
|
||||
+ int order = BIT(nbits-1);
|
||||
+ return (val ^ order) - order;
|
||||
+}
|
||||
+
|
||||
/* Initialization, Detach, Reset */
|
||||
const char *ath9k_hw_probe(u16 vendorid, u16 devid);
|
||||
void ath9k_hw_deinit(struct ath_hw *ah);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -1018,50 +1018,25 @@ static bool ar9003_hw_ani_control(struct
|
||||
static void ar9003_hw_do_getnf(struct ath_hw *ah,
|
||||
int16_t nfarray[NUM_NF_READINGS])
|
||||
{
|
||||
- struct ath_common *common = ath9k_hw_common(ah);
|
||||
int16_t nf;
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_0), AR_PHY_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 0] is %d\n", nf);
|
||||
- nfarray[0] = nf;
|
||||
+ nfarray[0] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_1), AR_PHY_CH1_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 1] is %d\n", nf);
|
||||
- nfarray[1] = nf;
|
||||
+ nfarray[1] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_CCA_2), AR_PHY_CH2_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ctl] [chain 2] is %d\n", nf);
|
||||
- nfarray[2] = nf;
|
||||
+ nfarray[2] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 0] is %d\n", nf);
|
||||
- nfarray[3] = nf;
|
||||
+ nfarray[3] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA_1), AR_PHY_CH1_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 1] is %d\n", nf);
|
||||
- nfarray[4] = nf;
|
||||
+ nfarray[4] = sign_extend(nf, 9);
|
||||
|
||||
nf = MS(REG_READ(ah, AR_PHY_EXT_CCA_2), AR_PHY_CH2_EXT_MINCCA_PWR);
|
||||
- if (nf & 0x100)
|
||||
- nf = 0 - ((nf ^ 0x1ff) + 1);
|
||||
- ath_print(common, ATH_DBG_CALIBRATE,
|
||||
- "NF calibrated [ext] [chain 2] is %d\n", nf);
|
||||
- nfarray[5] = nf;
|
||||
+ nfarray[5] = sign_extend(nf, 9);
|
||||
}
|
||||
|
||||
static void ar9003_hw_set_nf_limits(struct ath_hw *ah)
|
@ -1,90 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -428,6 +428,7 @@ int ath_beaconq_config(struct ath_softc
|
||||
|
||||
#define ATH_PAPRD_TIMEOUT 100 /* msecs */
|
||||
|
||||
+void ath_hw_check(struct work_struct *work);
|
||||
void ath_paprd_calibrate(struct work_struct *work);
|
||||
void ath_ani_calibrate(unsigned long data);
|
||||
|
||||
@@ -563,6 +564,7 @@ struct ath_softc {
|
||||
spinlock_t sc_pm_lock;
|
||||
struct mutex mutex;
|
||||
struct work_struct paprd_work;
|
||||
+ struct work_struct hw_check_work;
|
||||
struct completion paprd_complete;
|
||||
|
||||
u32 intrstatus;
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -516,6 +516,25 @@ static void ath_node_detach(struct ath_s
|
||||
ath_tx_node_cleanup(sc, an);
|
||||
}
|
||||
|
||||
+void ath_hw_check(struct work_struct *work)
|
||||
+{
|
||||
+ struct ath_softc *sc = container_of(work, struct ath_softc, hw_check_work);
|
||||
+ int i;
|
||||
+
|
||||
+ ath9k_ps_wakeup(sc);
|
||||
+
|
||||
+ for (i = 0; i < 3; i++) {
|
||||
+ if (ath9k_hw_check_alive(sc->sc_ah))
|
||||
+ goto out;
|
||||
+
|
||||
+ msleep(1);
|
||||
+ }
|
||||
+ ath_reset(sc, false);
|
||||
+
|
||||
+out:
|
||||
+ ath9k_ps_restore(sc);
|
||||
+}
|
||||
+
|
||||
void ath9k_tasklet(unsigned long data)
|
||||
{
|
||||
struct ath_softc *sc = (struct ath_softc *)data;
|
||||
@@ -527,13 +546,15 @@ void ath9k_tasklet(unsigned long data)
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
- if ((status & ATH9K_INT_FATAL) ||
|
||||
- !ath9k_hw_check_alive(ah)) {
|
||||
+ if (status & ATH9K_INT_FATAL) {
|
||||
ath_reset(sc, false);
|
||||
ath9k_ps_restore(sc);
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!ath9k_hw_check_alive(ah))
|
||||
+ ieee80211_queue_work(sc->hw, &sc->hw_check_work);
|
||||
+
|
||||
if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
||||
rxmask = (ATH9K_INT_RXHP | ATH9K_INT_RXLP | ATH9K_INT_RXEOL |
|
||||
ATH9K_INT_RXORN);
|
||||
@@ -1254,6 +1275,7 @@ static void ath9k_stop(struct ieee80211_
|
||||
|
||||
cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
cancel_work_sync(&sc->paprd_work);
|
||||
+ cancel_work_sync(&sc->hw_check_work);
|
||||
|
||||
if (!sc->num_sec_wiphy) {
|
||||
cancel_delayed_work_sync(&sc->wiphy_work);
|
||||
@@ -1977,6 +1999,7 @@ static void ath9k_sw_scan_start(struct i
|
||||
sc->sc_flags |= SC_OP_SCANNING;
|
||||
del_timer_sync(&common->ani.timer);
|
||||
cancel_work_sync(&sc->paprd_work);
|
||||
+ cancel_work_sync(&sc->hw_check_work);
|
||||
cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -751,6 +751,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
goto error_world;
|
||||
}
|
||||
|
||||
+ INIT_WORK(&sc->hw_check_work, ath_hw_check);
|
||||
INIT_WORK(&sc->paprd_work, ath_paprd_calibrate);
|
||||
INIT_WORK(&sc->chan_work, ath9k_wiphy_chan_work);
|
||||
INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work);
|
@ -1,13 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -319,6 +319,10 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||
idx = ath_reserve_key_cache_slot(common, key->alg);
|
||||
break;
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
+ if (!sta) {
|
||||
+ idx = key->keyidx;
|
||||
+ break;
|
||||
+ }
|
||||
memcpy(gmac, sta->addr, ETH_ALEN);
|
||||
gmac[0] |= 0x01;
|
||||
mac = gmac;
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -262,6 +262,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
@@ -188,6 +188,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
/*
|
||||
* PCI driver handlers.
|
||||
*/
|
||||
@@ -439,6 +440,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
@@ -365,6 +366,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
@ -14,11 +14,9 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
drivers/net/wireless/rt2x00/rt2800pci.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
index 165da7b..bb35350 100644
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
@@ -737,6 +737,10 @@ static void rt2800pci_kill_tx_queue(struct rt2x00_dev *rt2x00dev,
|
||||
@@ -749,6 +749,10 @@ static void rt2800pci_kill_tx_queue(stru
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, 0);
|
||||
return;
|
||||
}
|
||||
@ -29,6 +27,3 @@ index 165da7b..bb35350 100644
|
||||
|
||||
rt2800_register_read(rt2x00dev, WPDMA_RST_IDX, ®);
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, (qid == QID_AC_BE));
|
||||
--
|
||||
1.6.4.2
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -327,8 +327,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||
@@ -253,8 +253,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||
|
||||
pci_set_master(pci_dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user