Lines Matching refs:q
43 u32 ath9k_hw_gettxbuf(struct ath_hal *ah, u32 q) in ath9k_hw_gettxbuf() argument
45 return REG_READ(ah, AR_QTXDP(q)); in ath9k_hw_gettxbuf()
48 bool ath9k_hw_puttxbuf(struct ath_hal *ah, u32 q, u32 txdp) in ath9k_hw_puttxbuf() argument
50 REG_WRITE(ah, AR_QTXDP(q), txdp); in ath9k_hw_puttxbuf()
55 bool ath9k_hw_txstart(struct ath_hal *ah, u32 q) in ath9k_hw_txstart() argument
57 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "queue %u\n", q); in ath9k_hw_txstart()
59 REG_WRITE(ah, AR_Q_TXE, 1 << q); in ath9k_hw_txstart()
64 u32 ath9k_hw_numtxpending(struct ath_hal *ah, u32 q) in ath9k_hw_numtxpending() argument
68 npend = REG_READ(ah, AR_QSTS(q)) & AR_Q_STS_PEND_FR_CNT; in ath9k_hw_numtxpending()
71 if (REG_READ(ah, AR_Q_TXE) & (1 << q)) in ath9k_hw_numtxpending()
108 bool ath9k_hw_stoptxdma(struct ath_hal *ah, u32 q) in ath9k_hw_stoptxdma() argument
112 REG_WRITE(ah, AR_Q_TXD, 1 << q); in ath9k_hw_stoptxdma()
115 if (ath9k_hw_numtxpending(ah, q) == 0) in ath9k_hw_stoptxdma()
120 if (ath9k_hw_numtxpending(ah, q)) { in ath9k_hw_stoptxdma()
123 __func__, ath9k_hw_numtxpending(ah, q), q); in ath9k_hw_stoptxdma()
149 while (ath9k_hw_numtxpending(ah, q)) { in ath9k_hw_stoptxdma()
443 bool ath9k_hw_set_txq_props(struct ath_hal *ah, int q, in ath9k_hw_set_txq_props() argument
451 if (q >= pCap->total_queues) { in ath9k_hw_set_txq_props()
452 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); in ath9k_hw_set_txq_props()
456 qi = &ahp->ah_txq[q]; in ath9k_hw_set_txq_props()
512 bool ath9k_hw_get_txq_props(struct ath_hal *ah, int q, in ath9k_hw_get_txq_props() argument
519 if (q >= pCap->total_queues) { in ath9k_hw_get_txq_props()
520 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); in ath9k_hw_get_txq_props()
524 qi = &ahp->ah_txq[q]; in ath9k_hw_get_txq_props()
554 int q; in ath9k_hw_setuptxqueue() local
558 q = pCap->total_queues - 1; in ath9k_hw_setuptxqueue()
561 q = pCap->total_queues - 2; in ath9k_hw_setuptxqueue()
564 q = 1; in ath9k_hw_setuptxqueue()
567 q = pCap->total_queues - 3; in ath9k_hw_setuptxqueue()
570 for (q = 0; q < pCap->total_queues; q++) in ath9k_hw_setuptxqueue()
571 if (ahp->ah_txq[q].tqi_type == in ath9k_hw_setuptxqueue()
574 if (q == pCap->total_queues) { in ath9k_hw_setuptxqueue()
585 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "queue %u\n", q); in ath9k_hw_setuptxqueue()
587 qi = &ahp->ah_txq[q]; in ath9k_hw_setuptxqueue()
590 "tx queue %u already active\n", q); in ath9k_hw_setuptxqueue()
608 (void) ath9k_hw_set_txq_props(ah, q, qinfo); in ath9k_hw_setuptxqueue()
611 return q; in ath9k_hw_setuptxqueue()
614 bool ath9k_hw_releasetxqueue(struct ath_hal *ah, u32 q) in ath9k_hw_releasetxqueue() argument
620 if (q >= pCap->total_queues) { in ath9k_hw_releasetxqueue()
621 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); in ath9k_hw_releasetxqueue()
624 qi = &ahp->ah_txq[q]; in ath9k_hw_releasetxqueue()
626 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); in ath9k_hw_releasetxqueue()
630 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "release queue %u\n", q); in ath9k_hw_releasetxqueue()
633 ahp->ah_txOkInterruptMask &= ~(1 << q); in ath9k_hw_releasetxqueue()
634 ahp->ah_txErrInterruptMask &= ~(1 << q); in ath9k_hw_releasetxqueue()
635 ahp->ah_txDescInterruptMask &= ~(1 << q); in ath9k_hw_releasetxqueue()
636 ahp->ah_txEolInterruptMask &= ~(1 << q); in ath9k_hw_releasetxqueue()
637 ahp->ah_txUrnInterruptMask &= ~(1 << q); in ath9k_hw_releasetxqueue()
643 bool ath9k_hw_resettxqueue(struct ath_hal *ah, u32 q) in ath9k_hw_resettxqueue() argument
651 if (q >= pCap->total_queues) { in ath9k_hw_resettxqueue()
652 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); in ath9k_hw_resettxqueue()
656 qi = &ahp->ah_txq[q]; in ath9k_hw_resettxqueue()
658 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); in ath9k_hw_resettxqueue()
662 DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "reset queue %u\n", q); in ath9k_hw_resettxqueue()
674 REG_WRITE(ah, AR_DLCL_IFS(q), in ath9k_hw_resettxqueue()
679 REG_WRITE(ah, AR_DRETRY_LIMIT(q), in ath9k_hw_resettxqueue()
684 REG_WRITE(ah, AR_QMISC(q), AR_Q_MISC_DCU_EARLY_TERM_REQ); in ath9k_hw_resettxqueue()
685 REG_WRITE(ah, AR_DMISC(q), in ath9k_hw_resettxqueue()
689 REG_WRITE(ah, AR_QCBRCFG(q), in ath9k_hw_resettxqueue()
692 REG_WRITE(ah, AR_QMISC(q), in ath9k_hw_resettxqueue()
693 REG_READ(ah, AR_QMISC(q)) | AR_Q_MISC_FSP_CBR | in ath9k_hw_resettxqueue()
698 REG_WRITE(ah, AR_QRDYTIMECFG(q), in ath9k_hw_resettxqueue()
703 REG_WRITE(ah, AR_DCHNTIME(q), in ath9k_hw_resettxqueue()
709 REG_WRITE(ah, AR_QMISC(q), in ath9k_hw_resettxqueue()
710 REG_READ(ah, AR_QMISC(q)) | in ath9k_hw_resettxqueue()
716 REG_WRITE(ah, AR_DMISC(q), in ath9k_hw_resettxqueue()
717 REG_READ(ah, AR_DMISC(q)) | in ath9k_hw_resettxqueue()
721 REG_WRITE(ah, AR_DMISC(q), in ath9k_hw_resettxqueue()
722 REG_READ(ah, AR_DMISC(q)) | in ath9k_hw_resettxqueue()
727 REG_WRITE(ah, AR_QMISC(q), REG_READ(ah, AR_QMISC(q)) in ath9k_hw_resettxqueue()
732 REG_WRITE(ah, AR_DMISC(q), REG_READ(ah, AR_DMISC(q)) in ath9k_hw_resettxqueue()
739 REG_WRITE(ah, AR_QMISC(q), REG_READ(ah, AR_QMISC(q)) in ath9k_hw_resettxqueue()
747 REG_WRITE(ah, AR_QRDYTIMECFG(q), in ath9k_hw_resettxqueue()
749 REG_WRITE(ah, AR_DMISC(q), REG_READ(ah, AR_DMISC(q)) in ath9k_hw_resettxqueue()
754 REG_WRITE(ah, AR_QMISC(q), in ath9k_hw_resettxqueue()
755 REG_READ(ah, AR_QMISC(q)) | AR_Q_MISC_CBR_INCR_DIS1); in ath9k_hw_resettxqueue()
758 REG_WRITE(ah, AR_DMISC(q), REG_READ(ah, AR_DMISC(q)) | in ath9k_hw_resettxqueue()
766 REG_WRITE(ah, AR_DMISC(q), in ath9k_hw_resettxqueue()
767 REG_READ(ah, AR_DMISC(q)) | in ath9k_hw_resettxqueue()
774 ahp->ah_txOkInterruptMask |= 1 << q; in ath9k_hw_resettxqueue()
776 ahp->ah_txOkInterruptMask &= ~(1 << q); in ath9k_hw_resettxqueue()
778 ahp->ah_txErrInterruptMask |= 1 << q; in ath9k_hw_resettxqueue()
780 ahp->ah_txErrInterruptMask &= ~(1 << q); in ath9k_hw_resettxqueue()
782 ahp->ah_txDescInterruptMask |= 1 << q; in ath9k_hw_resettxqueue()
784 ahp->ah_txDescInterruptMask &= ~(1 << q); in ath9k_hw_resettxqueue()
786 ahp->ah_txEolInterruptMask |= 1 << q; in ath9k_hw_resettxqueue()
788 ahp->ah_txEolInterruptMask &= ~(1 << q); in ath9k_hw_resettxqueue()
790 ahp->ah_txUrnInterruptMask |= 1 << q; in ath9k_hw_resettxqueue()
792 ahp->ah_txUrnInterruptMask &= ~(1 << q); in ath9k_hw_resettxqueue()