Search Linux Wireless

Re: [ath9k-devel] [RFC] ath9k: fix tx queue selection

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

 



2010/11/2 Felix Fietkau <nbd@xxxxxxxxxxx>:
> +       q = ath_get_mac80211_qnum(txq->axq_class, sc);
>        r = ath_tx_setup_buffer(hw, bf, skb, txctl);
>        if (unlikely(r)) {
>                ath_print(common, ATH_DBG_FATAL, "TX mem alloc failure\n");
> @@ -1756,8 +1757,8 @@ int ath_tx_start(struct ieee80211_hw *hw
>                 * we will at least have to run TX completionon one buffer
>                 * on the queue */
>                spin_lock_bh(&txq->axq_lock);
> -               if (!txq->stopped && txq->axq_depth > 1) {
> -                       ath_mac80211_stop_queue(sc, skb_get_queue_mapping(skb));
> +               if (q >= 0 && !txq->stopped && txq->axq_depth > 1) {
> +                       ath_mac80211_stop_queue(sc, q);
>                        txq->stopped = 1;
>                }

You cannot be sure that you are stopping the queue that the skb
actually came in on here since mac80211 queues are mapped to hw queues
by ath_get_hal_qnum() and that mapping is not reversible (due to the
default statement):

static int ath_get_hal_qnum(u16 queue, struct ath_softc *sc)
{
        int qnum;

        switch (queue) {
        case 0:
                qnum = sc->tx.hwq_map[WME_AC_VO];
                break;
        case 1:
                qnum = sc->tx.hwq_map[WME_AC_VI];
                break;
        case 2:
                qnum = sc->tx.hwq_map[WME_AC_BE];
                break;
        case 3:
                qnum = sc->tx.hwq_map[WME_AC_BK];
                break;
        default:
                qnum = sc->tx.hwq_map[WME_AC_BE];
                break;
        }

        return qnum;
}

/Björn
--
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