ath9k: add a missing dma cache sync on aggregation software retry

SVN-Revision: 28132
master
Felix Fietkau 13 years ago
parent be077babbf
commit a4ad239191
  1. 19
      package/mac80211/patches/546-ath9k_retry_cache_sync.patch
  2. 18
      package/mac80211/patches/550-ath9k_limit_qlen.patch
  3. 9
      package/mac80211/patches/551-ath9k_sw_retry_reduce.patch
  4. 6
      package/mac80211/patches/580-ath9k_remove_common_chainmask.patch
  5. 8
      package/mac80211/patches/581-ath9k_use_reset_work.patch

@ -0,0 +1,19 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -263,6 +263,7 @@ static void ath_tx_set_retry(struct ath_
struct sk_buff *skb)
{
struct ath_frame_info *fi = get_frame_info(skb);
+ struct ath_buf *bf = fi->bf;
struct ieee80211_hdr *hdr;
TX_STAT_INC(txq->axq_qnum, a_retries);
@@ -271,6 +272,8 @@ static void ath_tx_set_retry(struct ath_
hdr = (struct ieee80211_hdr *)skb->data;
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_RETRY);
+ dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
+ sizeof(*hdr), DMA_TO_DEVICE);
}
static struct ath_buf *ath_tx_get_buffer(struct ath_softc *sc)

@ -33,7 +33,7 @@
debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -348,6 +348,14 @@ static void ath_tx_count_frames(struct a
@@ -351,6 +351,14 @@ static void ath_tx_count_frames(struct a
}
}
@ -48,7 +48,7 @@
static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_buf *bf, struct list_head *bf_q,
@@ -438,6 +446,8 @@ static void ath_tx_complete_aggr(struct
@@ -441,6 +449,8 @@ static void ath_tx_complete_aggr(struct
__skb_queue_head_init(&bf_pending);
ath_tx_count_frames(sc, bf, ts, txok, &nframes, &nbad);
@ -57,7 +57,7 @@
while (bf) {
u16 seqno = bf->bf_state.seqno;
@@ -836,6 +846,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
@@ -839,6 +849,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) {
@@ -1491,6 +1502,8 @@ static void ath_tx_send_ampdu(struct ath
@@ -1494,6 +1505,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;
@@ -1819,23 +1832,13 @@ error:
@@ -1822,23 +1835,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) {
/*
@@ -1877,6 +1880,7 @@ int ath_tx_start(struct ieee80211_hw *hw
@@ -1880,6 +1883,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;
@@ -1909,6 +1913,7 @@ int ath_tx_start(struct ieee80211_hw *hw
@@ -1912,6 +1916,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 &&
@@ -1918,6 +1923,24 @@ int ath_tx_start(struct ieee80211_hw *hw
@@ -1921,6 +1926,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.
@@ -1932,7 +1955,7 @@ int ath_tx_start(struct ieee80211_hw *hw
@@ -1935,7 +1958,7 @@ int ath_tx_start(struct ieee80211_hw *hw
}
spin_unlock_bh(&txq->axq_lock);

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -260,13 +260,16 @@ static void ath_tid_drain(struct ath_sof
@@ -260,14 +260,17 @@ static void ath_tid_drain(struct ath_sof
}
static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
@ -8,6 +8,7 @@
+ struct sk_buff *skb, int count)
{
struct ath_frame_info *fi = get_frame_info(skb);
struct ath_buf *bf = fi->bf;
struct ieee80211_hdr *hdr;
+ int prev = fi->retries;
@ -19,7 +20,7 @@
return;
hdr = (struct ieee80211_hdr *)skb->data;
@@ -380,6 +383,7 @@ static void ath_tx_complete_aggr(struct
@@ -383,6 +386,7 @@ static void ath_tx_complete_aggr(struct
int nframes;
u8 tidno;
bool clear_filter;
@ -27,7 +28,7 @@
skb = bf->bf_mpdu;
hdr = (struct ieee80211_hdr *)skb->data;
@@ -388,6 +392,10 @@ static void ath_tx_complete_aggr(struct
@@ -391,6 +395,10 @@ static void ath_tx_complete_aggr(struct
memcpy(rates, tx_info->control.rates, sizeof(rates));
@ -38,7 +39,7 @@
rcu_read_lock();
sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
@@ -475,7 +483,8 @@ static void ath_tx_complete_aggr(struct
@@ -478,7 +486,8 @@ static void ath_tx_complete_aggr(struct
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
!an->sleeping)

@ -90,7 +90,7 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1657,7 +1657,7 @@ u8 ath_txchainmask_reduction(struct ath_
@@ -1660,7 +1660,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;
@@ -1717,7 +1717,7 @@ static void ath_buf_set_rate(struct ath_
@@ -1720,7 +1720,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))
@@ -1742,10 +1742,10 @@ static void ath_buf_set_rate(struct ath_
@@ -1745,10 +1745,10 @@ static void ath_buf_set_rate(struct ath_
}
if (bf->bf_state.bfs_paprd)

@ -246,7 +246,7 @@
/**********************/
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -600,8 +600,10 @@ static void ath_tx_complete_aggr(struct
@@ -603,8 +603,10 @@ static void ath_tx_complete_aggr(struct
rcu_read_unlock();
@ -259,7 +259,7 @@
}
static bool ath_lookup_legacy(struct ath_buf *bf)
@@ -2181,6 +2183,9 @@ static void ath_tx_processq(struct ath_s
@@ -2184,6 +2186,9 @@ static void ath_tx_processq(struct ath_s
spin_lock_bh(&txq->axq_lock);
for (;;) {
@ -269,7 +269,7 @@
if (list_empty(&txq->axq_q)) {
txq->axq_link = NULL;
if (sc->sc_flags & SC_OP_TXAGGR)
@@ -2268,9 +2273,7 @@ static void ath_tx_complete_poll_work(st
@@ -2271,9 +2276,7 @@ static void ath_tx_complete_poll_work(st
if (needreset) {
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
"tx hung, resetting the chip\n");
@ -280,7 +280,7 @@
}
ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work,
@@ -2303,6 +2306,9 @@ void ath_tx_edma_tasklet(struct ath_soft
@@ -2306,6 +2309,9 @@ void ath_tx_edma_tasklet(struct ath_soft
int status;
for (;;) {

Loading…
Cancel
Save