Lines Matching refs:t

44 	struct mt76_txwi_cache *t;  in mt76_alloc_txwi()  local
49 size = L1_CACHE_ALIGN(dev->drv->txwi_size + sizeof(*t)); in mt76_alloc_txwi()
56 t = (struct mt76_txwi_cache *)(txwi + dev->drv->txwi_size); in mt76_alloc_txwi()
57 t->dma_addr = addr; in mt76_alloc_txwi()
59 return t; in mt76_alloc_txwi()
65 struct mt76_txwi_cache *t; in mt76_alloc_rxwi() local
67 t = kzalloc(L1_CACHE_ALIGN(sizeof(*t)), GFP_ATOMIC); in mt76_alloc_rxwi()
68 if (!t) in mt76_alloc_rxwi()
71 t->ptr = NULL; in mt76_alloc_rxwi()
72 return t; in mt76_alloc_rxwi()
78 struct mt76_txwi_cache *t = NULL; in __mt76_get_txwi() local
82 t = list_first_entry(&dev->txwi_cache, struct mt76_txwi_cache, in __mt76_get_txwi()
84 list_del(&t->list); in __mt76_get_txwi()
88 return t; in __mt76_get_txwi()
94 struct mt76_txwi_cache *t = NULL; in __mt76_get_rxwi() local
98 t = list_first_entry(&dev->rxwi_cache, struct mt76_txwi_cache, in __mt76_get_rxwi()
100 list_del(&t->list); in __mt76_get_rxwi()
104 return t; in __mt76_get_rxwi()
110 struct mt76_txwi_cache *t = __mt76_get_txwi(dev); in mt76_get_txwi() local
112 if (t) in mt76_get_txwi()
113 return t; in mt76_get_txwi()
121 struct mt76_txwi_cache *t = __mt76_get_rxwi(dev); in mt76_get_rxwi() local
123 if (t) in mt76_get_rxwi()
124 return t; in mt76_get_rxwi()
131 mt76_put_txwi(struct mt76_dev *dev, struct mt76_txwi_cache *t) in mt76_put_txwi() argument
133 if (!t) in mt76_put_txwi()
137 list_add(&t->list, &dev->txwi_cache); in mt76_put_txwi()
143 mt76_put_rxwi(struct mt76_dev *dev, struct mt76_txwi_cache *t) in mt76_put_rxwi() argument
145 if (!t) in mt76_put_rxwi()
149 list_add(&t->list, &dev->rxwi_cache); in mt76_put_rxwi()
157 struct mt76_txwi_cache *t; in mt76_free_pending_txwi() local
160 while ((t = __mt76_get_txwi(dev)) != NULL) { in mt76_free_pending_txwi()
161 dma_unmap_single(dev->dma_dev, t->dma_addr, dev->drv->txwi_size, in mt76_free_pending_txwi()
163 kfree(mt76_get_txwi_ptr(dev, t)); in mt76_free_pending_txwi()
171 struct mt76_txwi_cache *t; in mt76_free_pending_rxwi() local
174 while ((t = __mt76_get_rxwi(dev)) != NULL) { in mt76_free_pending_rxwi()
175 if (t->ptr) in mt76_free_pending_rxwi()
176 mt76_put_page_pool_buf(t->ptr, false); in mt76_free_pending_rxwi()
177 kfree(t); in mt76_free_pending_rxwi()
404 struct mt76_txwi_cache *t = mt76_rx_token_release(dev, token); in mt76_dma_get_buf() local
406 if (!t) in mt76_dma_get_buf()
409 dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr, in mt76_dma_get_buf()
413 buf = t->ptr; in mt76_dma_get_buf()
414 t->dma_addr = 0; in mt76_dma_get_buf()
415 t->ptr = NULL; in mt76_dma_get_buf()
417 mt76_put_rxwi(dev, t); in mt76_dma_get_buf()
505 struct mt76_txwi_cache *t; in mt76_dma_tx_queue_skb() local
513 t = mt76_get_txwi(dev); in mt76_dma_tx_queue_skb()
514 if (!t) in mt76_dma_tx_queue_skb()
517 txwi = mt76_get_txwi_ptr(dev, t); in mt76_dma_tx_queue_skb()
528 tx_info.buf[n].addr = t->dma_addr; in mt76_dma_tx_queue_skb()
552 dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr, dev->drv->txwi_size, in mt76_dma_tx_queue_skb()
555 dma_sync_single_for_device(dev->dma_dev, t->dma_addr, dev->drv->txwi_size, in mt76_dma_tx_queue_skb()
561 tx_info.info, tx_info.skb, t); in mt76_dma_tx_queue_skb()
579 mt76_put_txwi(dev, t); in mt76_dma_tx_queue_skb()