aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-29 09:55:11 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-08-29 09:55:11 +0000
commit13544928917c6caeecc473b13013d9b5eaf2914a (patch)
treed7438e8b8a5b4e71de6709dc24168ca5d796e97b
parent2e01b38a4919e293a15e2c1f63bbe9e8999a7bb0 (diff)
downloadmaster-187ad058-13544928917c6caeecc473b13013d9b5eaf2914a.tar.gz
master-187ad058-13544928917c6caeecc473b13013d9b5eaf2914a.tar.bz2
master-187ad058-13544928917c6caeecc473b13013d9b5eaf2914a.zip
ath9k: fix a tx aggregation padding issue
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28113 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/mac80211/patches/545-ath9k_aggr_padding_fix.patch23
-rw-r--r--package/mac80211/patches/550-ath9k_limit_qlen.patch14
-rw-r--r--package/mac80211/patches/580-ath9k_remove_common_chainmask.patch6
3 files changed, 33 insertions, 10 deletions
diff --git a/package/mac80211/patches/545-ath9k_aggr_padding_fix.patch b/package/mac80211/patches/545-ath9k_aggr_padding_fix.patch
new file mode 100644
index 0000000000..4b5f22f2d0
--- /dev/null
+++ b/package/mac80211/patches/545-ath9k_aggr_padding_fix.patch
@@ -0,0 +1,23 @@
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -728,7 +728,9 @@ static int ath_compute_num_delims(struct
+ * Add delimiter when using RTS/CTS with aggregation
+ * and non enterprise AR9003 card
+ */
+- if (first_subfrm)
++ if (first_subfrm && (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
++ !AR_SREV_9580_10_OR_LATER(sc->sc_ah) &&
++ (sc->sc_ah->ent_mode & AR_ENT_OTP_MIN_PKT_SIZE_DISABLE))
+ ndelim = max(ndelim, FIRST_DESC_NDELIMS);
+
+ /*
+--- a/drivers/net/wireless/ath/ath9k/reg.h
++++ b/drivers/net/wireless/ath/ath9k/reg.h
+@@ -1132,6 +1132,7 @@ enum {
+ #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
+ #define AR_ENT_OTP 0x40d8
+ #define AR_ENT_OTP_CHAIN2_DISABLE 0x00020000
++#define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE 0x00800000
+ #define AR_ENT_OTP_MPSD 0x00800000
+
+ #define AR_CH0_BB_DPLL1 0x16180
diff --git a/package/mac80211/patches/550-ath9k_limit_qlen.patch b/package/mac80211/patches/550-ath9k_limit_qlen.patch
index 9e144f39c5..4356f81092 100644
--- a/package/mac80211/patches/550-ath9k_limit_qlen.patch
+++ b/package/mac80211/patches/550-ath9k_limit_qlen.patch
@@ -57,7 +57,7 @@
while (bf) {
u16 seqno = bf->bf_state.seqno;
-@@ -834,6 +844,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
+@@ -836,6 +846,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
ath_tx_addto_baw(sc, tid, seqno);
ath9k_hw_set11n_aggr_middle(sc->sc_ah, bf->bf_desc, ndelim);
@@ -65,7 +65,7 @@
__skb_unlink(skb, &tid->buf_q);
list_add_tail(&bf->list, bf_q);
if (bf_prev) {
-@@ -1489,6 +1500,8 @@ static void ath_tx_send_ampdu(struct ath
+@@ -1491,6 +1502,8 @@ static void ath_tx_send_ampdu(struct ath
/* Add sub-frame to BAW */
ath_tx_addto_baw(sc, tid, bf->bf_state.seqno);
@@ -74,7 +74,7 @@
/* Queue to h/w without aggregation */
TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw);
bf->bf_lastbf = bf;
-@@ -1817,23 +1830,13 @@ error:
+@@ -1819,23 +1832,13 @@ error:
/* FIXME: tx power */
static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb,
@@ -100,7 +100,7 @@
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
/*
-@@ -1875,6 +1878,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1877,6 +1880,7 @@ int ath_tx_start(struct ieee80211_hw *hw
struct ieee80211_vif *vif = info->control.vif;
struct ath_softc *sc = hw->priv;
struct ath_txq *txq = txctl->txq;
@@ -108,7 +108,7 @@
int padpos, padsize;
int frmlen = skb->len + FCS_LEN;
int q;
-@@ -1907,6 +1911,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1909,6 +1913,7 @@ int ath_tx_start(struct ieee80211_hw *hw
skb_push(skb, padsize);
memmove(skb->data, skb->data + padsize, padpos);
@@ -116,7 +116,7 @@
}
if ((vif && vif->type != NL80211_IFTYPE_AP &&
-@@ -1916,6 +1921,24 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1918,6 +1923,24 @@ int ath_tx_start(struct ieee80211_hw *hw
setup_frame_info(hw, skb, frmlen);
@@ -141,7 +141,7 @@
/*
* At this point, the vif, hw_key and sta pointers in the tx control
* info are no longer valid (overwritten by the ath_frame_info data.
-@@ -1930,7 +1953,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+@@ -1932,7 +1955,7 @@ int ath_tx_start(struct ieee80211_hw *hw
}
spin_unlock_bh(&txq->axq_lock);
diff --git a/package/mac80211/patches/580-ath9k_remove_common_chainmask.patch b/package/mac80211/patches/580-ath9k_remove_common_chainmask.patch
index 1164fc2acc..c314f4236b 100644
--- a/package/mac80211/patches/580-ath9k_remove_common_chainmask.patch
+++ b/package/mac80211/patches/580-ath9k_remove_common_chainmask.patch
@@ -90,7 +90,7 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -1655,7 +1655,7 @@ u8 ath_txchainmask_reduction(struct ath_
+@@ -1657,7 +1657,7 @@ u8 ath_txchainmask_reduction(struct ath_
static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, int len)
{
@@ -99,7 +99,7 @@
struct ath9k_11n_rate_series series[4];
struct sk_buff *skb;
struct ieee80211_tx_info *tx_info;
-@@ -1715,7 +1715,7 @@ static void ath_buf_set_rate(struct ath_
+@@ -1717,7 +1717,7 @@ static void ath_buf_set_rate(struct ath_
/* MCS rates */
series[i].Rate = rix | 0x80;
series[i].ChSel = ath_txchainmask_reduction(sc,
@@ -108,7 +108,7 @@
series[i].PktDuration = ath_pkt_duration(sc, rix, len,
is_40, is_sgi, is_sp);
if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
-@@ -1740,10 +1740,10 @@ static void ath_buf_set_rate(struct ath_
+@@ -1742,10 +1742,10 @@ static void ath_buf_set_rate(struct ath_
}
if (bf->bf_state.bfs_paprd)