Lines Matching refs:ndesc
193 Q_WRITE(q, ring_size, MT_DMA_RRO_EN | q->ndesc); in mt76_dma_sync_idx()
195 Q_WRITE(q, ring_size, q->ndesc); in mt76_dma_sync_idx()
203 if (!q || !q->ndesc) in __mt76_dma_queue_reset()
210 for (i = 0; i < q->ndesc; i++) in __mt76_dma_queue_reset()
278 q->head = (q->head + 1) % q->ndesc; in mt76_dma_add_rx_buf()
303 next = (q->head + 1) % q->ndesc; in mt76_dma_add_buf()
387 if (!q || !q->ndesc) in mt76_dma_tx_cleanup()
495 q->tail = (q->tail + 1) % q->ndesc; in mt76_dma_dequeue()
511 if (q->queued + 1 >= q->ndesc - 1) in mt76_dma_tx_queue_skb_raw()
590 if (q->queued + (tx_info.nbuf + 1) / 2 >= q->ndesc - 1) { in mt76_dma_tx_queue_skb()
640 if (!q->ndesc) in mt76_dma_rx_fill()
645 while (q->queued < q->ndesc - 1) { in mt76_dma_rx_fill()
693 q->ndesc = n_desc; in mt76_dma_alloc_queue()
699 q->desc = dmam_alloc_coherent(dev->dma_dev, q->ndesc * size, in mt76_dma_alloc_queue()
709 for (i = 0; i < q->ndesc; i++) { in mt76_dma_alloc_queue()
717 size = q->ndesc * sizeof(*q->entry); in mt76_dma_alloc_queue()
747 if (!q->ndesc) in mt76_dma_rx_cleanup()
776 if (!q->ndesc) in mt76_dma_rx_reset()
782 for (i = 0; i < q->ndesc; i++) in mt76_dma_rx_reset()