package/mac80211/patches/530-ath9k_aggr_state_fix.patch |
| 1 | --- a/drivers/net/wireless/ath/ath9k/xmit.c |
| 2 | @@ -120,26 +120,14 @@ static void ath_tx_queue_tid(struct ath_ |
| 3 | list_add_tail(&ac->list, &txq->axq_acq); |
| 4 | } |
| 5 | |
| 6 | -static void ath_tx_pause_tid(struct ath_softc *sc, struct ath_atx_tid *tid) |
| 7 | -{ |
| 8 | - struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum]; |
| 9 | - |
| 10 | - spin_lock_bh(&txq->axq_lock); |
| 11 | - tid->paused++; |
| 12 | - spin_unlock_bh(&txq->axq_lock); |
| 13 | -} |
| 14 | - |
| 15 | static void ath_tx_resume_tid(struct ath_softc *sc, struct ath_atx_tid *tid) |
| 16 | { |
| 17 | struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum]; |
| 18 | |
| 19 | - BUG_ON(tid->paused <= 0); |
| 20 | - spin_lock_bh(&txq->axq_lock); |
| 21 | - |
| 22 | - tid->paused--; |
| 23 | + WARN_ON(!tid->paused); |
| 24 | |
| 25 | - if (tid->paused > 0) |
| 26 | - goto unlock; |
| 27 | + spin_lock_bh(&txq->axq_lock); |
| 28 | + tid->paused = false; |
| 29 | |
| 30 | if (list_empty(&tid->buf_q)) |
| 31 | goto unlock; |
| 32 | @@ -157,15 +145,10 @@ static void ath_tx_flush_tid(struct ath_ |
| 33 | struct list_head bf_head; |
| 34 | INIT_LIST_HEAD(&bf_head); |
| 35 | |
| 36 | - BUG_ON(tid->paused <= 0); |
| 37 | - spin_lock_bh(&txq->axq_lock); |
| 38 | + WARN_ON(!tid->paused); |
| 39 | |
| 40 | - tid->paused--; |
| 41 | - |
| 42 | - if (tid->paused > 0) { |
| 43 | - spin_unlock_bh(&txq->axq_lock); |
| 44 | - return; |
| 45 | - } |
| 46 | + spin_lock_bh(&txq->axq_lock); |
| 47 | + tid->paused = false; |
| 48 | |
| 49 | while (!list_empty(&tid->buf_q)) { |
| 50 | bf = list_first_entry(&tid->buf_q, struct ath_buf, list); |
| 51 | @@ -811,7 +794,7 @@ void ath_tx_aggr_start(struct ath_softc |
| 52 | an = (struct ath_node *)sta->drv_priv; |
| 53 | txtid = ATH_AN_2_TID(an, tid); |
| 54 | txtid->state |= AGGR_ADDBA_PROGRESS; |
| 55 | - ath_tx_pause_tid(sc, txtid); |
| 56 | + txtid->paused = true; |
| 57 | *ssn = txtid->seq_start; |
| 58 | } |
| 59 | |
| 60 | @@ -835,10 +818,9 @@ void ath_tx_aggr_stop(struct ath_softc * |
| 61 | return; |
| 62 | } |
| 63 | |
| 64 | - ath_tx_pause_tid(sc, txtid); |
| 65 | - |
| 66 | /* drop all software retried frames and mark this TID */ |
| 67 | spin_lock_bh(&txq->axq_lock); |
| 68 | + txtid->paused = true; |
| 69 | while (!list_empty(&txtid->buf_q)) { |
| 70 | bf = list_first_entry(&txtid->buf_q, struct ath_buf, list); |
| 71 | if (!bf_isretried(bf)) { |