Search Linux Wireless

Re: [PATCH] ath9k: Improve ath_tx_aggr_stop to avoid TID stuck in cleanup state.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nikolay,

On Sat, Nov 19, 2011 at 12:11 PM, Nikolay Martynov <mar.kolya@xxxxxxxxx> wrote:
> From: kolya <mar.kolya@xxxxxxxxx>
>
>  When tx agg is being stopped TID is flushed using ath_tx_flush_tid. It is possible that ath_tx_flush_tid completelly flushes TID (if all packets in this TID have already been retried). If this happened ath_tx_aggr_stop would leave TID in cleanup state permanently. Fix this by making ath_tx_flush_tid remove AGGR_ADDBA_COMPLETE and AGGR_CLEANUP flags from TID status if TID is empty.
> ---
>  drivers/net/wireless/ath/ath9k/xmit.c |   13 ++++++-------
>  1 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index 55d077e..3574b0f 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -180,6 +180,11 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
>        }
>
>        spin_unlock_bh(&txq->axq_lock);
> +
> +       if (tid->baw_head == tid->baw_tail) {
> +               tid->state &= ~AGGR_ADDBA_COMPLETE;
> +               tid->state &= ~AGGR_CLEANUP;
> +       }

should this in be protected by axq_lock ?

>  }
>
>  static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
> @@ -556,15 +561,9 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
>                spin_unlock_bh(&txq->axq_lock);
>        }
>
> -       if (tid->state & AGGR_CLEANUP) {
> +       if (tid->state & AGGR_CLEANUP)
>                ath_tx_flush_tid(sc, tid);
>
> -               if (tid->baw_head == tid->baw_tail) {
> -                       tid->state &= ~AGGR_ADDBA_COMPLETE;
> -                       tid->state &= ~AGGR_CLEANUP;
> -               }
> -       }
> -
>        rcu_read_unlock();
>
>        if (needreset) {

based on my understanding if we don't clear this flag, i assume we
might have problem in ath_tx_aggr_start?
but should not this be properly cleared ath_txcomplete_aggr via tasklet path?
please let me know if i had  missed somthing?

> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
shafi
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux