Lines Matching refs:tx_ring
95 struct rtw89_pci_tx_ring *tx_ring)
97 struct rtw89_pci_dma_ring *bd_ring = &tx_ring->bd_ring;
144 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[RTW89_TXCH_CH12];
147 cnt = rtw89_pci_txbd_recalc(rtwdev, tx_ring);
462 struct rtw89_pci_tx_ring *tx_ring,
477 tx_ring->tx_acked++;
484 tx_ring->tx_retry_lmt++;
487 tx_ring->tx_life_time++;
490 tx_ring->tx_mac_id_drop++;
501 static void rtw89_pci_reclaim_txbd(struct rtw89_dev *rtwdev, struct rtw89_pci_tx_ring *tx_ring)
506 cnt = rtw89_pci_txbd_recalc(rtwdev, tx_ring);
508 txwd = list_first_entry_or_null(&tx_ring->busy_pages, struct rtw89_pci_tx_wd, list);
518 rtw89_pci_enqueue_txwd(tx_ring, txwd);
523 struct rtw89_pci_tx_ring *tx_ring)
525 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
530 txwd = list_first_entry_or_null(&tx_ring->busy_pages, struct rtw89_pci_tx_wd, list);
539 struct rtw89_pci_tx_ring *tx_ring,
546 u8 txch = tx_ring->txch;
549 rtw89_pci_reclaim_txbd(rtwdev, tx_ring);
565 rtw89_pci_tx_status(rtwdev, tx_ring, skb, tx_status);
569 rtw89_pci_enqueue_txwd(tx_ring, txwd);
576 struct rtw89_pci_tx_ring *tx_ring;
592 tx_ring = &rtwpci->tx_rings[txch];
593 wd_ring = &tx_ring->wd_ring;
596 rtw89_pci_release_txwd_skb(rtwdev, tx_ring, txwd, seq, tx_status);
600 struct rtw89_pci_tx_ring *tx_ring)
602 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
612 rtw89_pci_release_txwd_skb(rtwdev, tx_ring, txwd, i, RTW89_TX_MACID_DROP);
1105 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[RTW89_TXCH_CH12];
1110 cnt = rtw89_pci_get_avail_txbd_num(tx_ring);
1121 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[txch];
1122 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
1126 cnt = rtw89_pci_get_avail_txbd_num(tx_ring);
1138 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[txch];
1139 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
1149 bd_cnt = rtw89_pci_get_avail_txbd_num(tx_ring);
1159 bd_cnt = rtw89_pci_get_avail_txbd_num(tx_ring);
1161 rtw89_pci_reclaim_txbd(rtwdev, tx_ring);
1164 bd_cnt = rtw89_pci_get_avail_txbd_num(tx_ring);
1200 static void __rtw89_pci_tx_kick_off(struct rtw89_dev *rtwdev, struct rtw89_pci_tx_ring *tx_ring)
1203 struct rtw89_pci_dma_ring *bd_ring = &tx_ring->bd_ring;
1215 static void rtw89_pci_tx_bd_ring_update(struct rtw89_dev *rtwdev, struct rtw89_pci_tx_ring *tx_ring,
1218 struct rtw89_pci_dma_ring *bd_ring = &tx_ring->bd_ring;
1231 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[txch];
1238 __rtw89_pci_tx_kick_off(rtwdev, tx_ring);
1244 struct rtw89_pci_tx_ring *tx_ring;
1251 tx_ring = &rtwpci->tx_rings[txch];
1252 __rtw89_pci_tx_kick_off(rtwdev, tx_ring);
1259 struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[txch];
1260 struct rtw89_pci_dma_ring *bd_ring = &tx_ring->bd_ring;
1363 struct rtw89_pci_tx_ring *tx_ring,
1407 tx_ring->tx_cnt++;
1430 struct rtw89_pci_tx_ring *tx_ring,
1463 rtw89_pci_tx_bd_ring_update(rtwdev, tx_ring, 1);
1469 struct rtw89_pci_tx_ring *tx_ring,
1481 if (tx_ring->txch == RTW89_TXCH_CH12)
1482 return rtw89_pci_fwcmd_submit(rtwdev, tx_ring, txbd, tx_req);
1484 txwd = rtw89_pci_dequeue_txwd(tx_ring);
1491 ret = rtw89_pci_txwd_submit(rtwdev, tx_ring, txwd, tx_req);
1497 list_add_tail(&txwd->list, &tx_ring->busy_pages);
1505 rtw89_pci_tx_bd_ring_update(rtwdev, tx_ring, 1);
1510 rtw89_pci_enqueue_txwd(tx_ring, txwd);
1519 struct rtw89_pci_tx_ring *tx_ring;
1533 tx_ring = &rtwpci->tx_rings[txch];
1536 n_avail_txbd = rtw89_pci_get_avail_txbd_num(tx_ring);
1543 txbd = rtw89_pci_get_next_txbd(tx_ring);
1544 ret = rtw89_pci_txbd_submit(rtwdev, tx_ring, txbd, tx_req);
1624 struct rtw89_pci_tx_ring *tx_ring;
1639 tx_ring = &rtwpci->tx_rings[i];
1640 bd_ring = &tx_ring->bd_ring;
1687 struct rtw89_pci_tx_ring *tx_ring)
1689 rtw89_pci_release_busy_txwd(rtwdev, tx_ring);
1690 rtw89_pci_release_pending_txwd_skb(rtwdev, tx_ring);
1778 struct rtw89_pci_tx_ring *tx_ring;
1786 tx_ring = &rtwpci->tx_rings[i];
1787 tx_ring->bd_ring.addr.idx = low_power ?
3181 struct rtw89_pci_tx_ring *tx_ring)
3183 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
3196 struct rtw89_pci_tx_ring *tx_ring)
3202 head = tx_ring->bd_ring.head;
3203 dma = tx_ring->bd_ring.dma;
3204 ring_sz = tx_ring->bd_ring.desc_size * tx_ring->bd_ring.len;
3207 tx_ring->bd_ring.head = NULL;
3215 struct rtw89_pci_tx_ring *tx_ring;
3221 tx_ring = &rtwpci->tx_rings[i];
3222 rtw89_pci_free_tx_wd_ring(rtwdev, pdev, tx_ring);
3223 rtw89_pci_free_tx_ring(rtwdev, pdev, tx_ring);
3308 struct rtw89_pci_tx_ring *tx_ring,
3311 struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring;
3349 rtw89_pci_enqueue_txwd(tx_ring, txwd);
3359 struct rtw89_pci_tx_ring *tx_ring,
3369 ret = rtw89_pci_alloc_tx_wd_ring(rtwdev, pdev, tx_ring, txch);
3387 INIT_LIST_HEAD(&tx_ring->busy_pages);
3388 tx_ring->bd_ring.head = head;
3389 tx_ring->bd_ring.dma = dma;
3390 tx_ring->bd_ring.len = len;
3391 tx_ring->bd_ring.desc_size = desc_size;
3392 tx_ring->bd_ring.addr = *txch_addr;
3393 tx_ring->bd_ring.wp = 0;
3394 tx_ring->bd_ring.rp = 0;
3395 tx_ring->txch = txch;
3400 rtw89_pci_free_tx_wd_ring(rtwdev, pdev, tx_ring);
3410 struct rtw89_pci_tx_ring *tx_ring;
3419 tx_ring = &rtwpci->tx_rings[i];
3422 ret = rtw89_pci_alloc_tx_ring(rtwdev, pdev, tx_ring,
3439 tx_ring = &rtwpci->tx_rings[i];
3440 rtw89_pci_free_tx_ring(rtwdev, pdev, tx_ring);