Lines Matching refs:ndesc
197 Q_WRITE(q, ring_size, MT_DMA_RRO_EN | q->ndesc); in mt76_dma_sync_idx()
199 Q_WRITE(q, ring_size, q->ndesc); in mt76_dma_sync_idx()
207 if (!q || !q->ndesc) in __mt76_dma_queue_reset()
214 for (i = 0; i < q->ndesc; i++) in __mt76_dma_queue_reset()
282 q->head = (q->head + 1) % q->ndesc; in mt76_dma_add_rx_buf()
307 next = (q->head + 1) % q->ndesc; in mt76_dma_add_buf()
391 if (!q || !q->ndesc) in mt76_dma_tx_cleanup()
499 q->tail = (q->tail + 1) % q->ndesc; in mt76_dma_dequeue()
515 if (q->queued + 1 >= q->ndesc - 1) in mt76_dma_tx_queue_skb_raw()
594 if (q->queued + (tx_info.nbuf + 1) / 2 >= q->ndesc - 1) { in mt76_dma_tx_queue_skb()
645 if (!q->ndesc) in mt76_dma_rx_fill_buf()
648 while (q->queued < q->ndesc - 1) { in mt76_dma_rx_fill_buf()
688 if (!q->ndesc) in mt76_dma_rx_fill()
713 q->ndesc = n_desc; in mt76_dma_alloc_queue()
719 q->desc = dmam_alloc_coherent(dev->dma_dev, q->ndesc * size, in mt76_dma_alloc_queue()
729 for (i = 0; i < q->ndesc; i++) { in mt76_dma_alloc_queue()
737 size = q->ndesc * sizeof(*q->entry); in mt76_dma_alloc_queue()
767 if (!q->ndesc) in mt76_dma_rx_cleanup()
796 if (!q->ndesc) in mt76_dma_rx_reset()
802 for (i = 0; i < q->ndesc; i++) in mt76_dma_rx_reset()