nvram: handle nvram at varying offsets within the eraseblock (fixes Edimax PS-1208mfg...
[openwrt/openwrt.git] / package / mac80211 / patches / 540-ath9k_aggr_fix.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -329,7 +329,6 @@ static void ath_tx_complete_aggr(struct
4 int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
5 bool rc_update = true;
6 struct ieee80211_tx_rate rates[4];
7 - unsigned long flags;
8
9 skb = bf->bf_mpdu;
10 hdr = (struct ieee80211_hdr *)skb->data;
11 @@ -346,9 +345,21 @@ static void ath_tx_complete_aggr(struct
12 if (!sta) {
13 rcu_read_unlock();
14
15 - spin_lock_irqsave(&sc->tx.txbuflock, flags);
16 - list_splice_tail_init(bf_q, &sc->tx.txbuf);
17 - spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
18 + INIT_LIST_HEAD(&bf_head);
19 + while (bf) {
20 + bf_next = bf->bf_next;
21 +
22 + bf->bf_state.bf_type |= BUF_XRETRY;
23 + if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) ||
24 + !bf->bf_stale || bf_next != NULL)
25 + list_move_tail(&bf->list, &bf_head);
26 +
27 + ath_tx_rc_status(bf, ts, 0, 0, false);
28 + ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
29 + 0, 0);
30 +
31 + bf = bf_next;
32 + }
33 return;
34 }
35