&fops_interrupt);
        debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_xmit);
+       debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_BK]);
+       debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_BE]);
+       debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_VI]);
+       debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
+                          &sc->tx.txq_max_pending[WME_AC_VO]);
        debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
                            &fops_stations);
        debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
 
        for (i = 0; i < WME_NUM_AC; i++) {
                sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i);
                sc->tx.txq_map[i]->mac80211_qnum = i;
+               sc->tx.txq_max_pending[i] = ATH_MAX_QDEPTH;
        }
        return 0;
 }
 
 
        ath_txq_lock(sc, txq);
        if (txq == sc->tx.txq_map[q] &&
-           ++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) {
+           ++txq->pending_frames > sc->tx.txq_max_pending[q] &&
+           !txq->stopped) {
                ieee80211_stop_queue(sc->hw, q);
                txq->stopped = true;
        }
                if (WARN_ON(--txq->pending_frames < 0))
                        txq->pending_frames = 0;
 
-               if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) {
+               if (txq->stopped &&
+                   txq->pending_frames < sc->tx.txq_max_pending[q]) {
                        ieee80211_wake_queue(sc->hw, q);
                        txq->stopped = false;
                }