Lines Matching refs:txr
287 if (qca->txr.skb[qca->txr.head] == NULL) in qcaspi_transmit()
300 while (qca->txr.skb[qca->txr.head]) { in qcaspi_transmit()
301 pkt_len = qca->txr.skb[qca->txr.head]->len + QCASPI_HW_PKT_LEN; in qcaspi_transmit()
309 if (qcaspi_tx_frame(qca, qca->txr.skb[qca->txr.head]) == -1) { in qcaspi_transmit()
316 n_stats->tx_bytes += qca->txr.skb[qca->txr.head]->len; in qcaspi_transmit()
324 dev_kfree_skb(qca->txr.skb[qca->txr.head]); in qcaspi_transmit()
325 qca->txr.skb[qca->txr.head] = NULL; in qcaspi_transmit()
326 qca->txr.size -= pkt_len; in qcaspi_transmit()
327 new_head = qca->txr.head + 1; in qcaspi_transmit()
328 if (new_head >= qca->txr.count) in qcaspi_transmit()
330 qca->txr.head = new_head; in qcaspi_transmit()
459 qcaspi_tx_ring_has_space(struct tx_ring *txr) in qcaspi_tx_ring_has_space() argument
461 if (txr->skb[txr->tail]) in qcaspi_tx_ring_has_space()
464 return (txr->size + QCAFRM_MAX_LEN < QCASPI_HW_BUF_LEN) ? 1 : 0; in qcaspi_tx_ring_has_space()
481 if (qca->txr.skb[i]) { in qcaspi_flush_tx_ring()
482 dev_kfree_skb(qca->txr.skb[i]); in qcaspi_flush_tx_ring()
483 qca->txr.skb[i] = NULL; in qcaspi_flush_tx_ring()
487 qca->txr.tail = 0; in qcaspi_flush_tx_ring()
488 qca->txr.head = 0; in qcaspi_flush_tx_ring()
489 qca->txr.size = 0; in qcaspi_flush_tx_ring()
585 (qca->txr.skb[qca->txr.head] == NULL) && in qcaspi_spi_thread()
593 qca->txr.skb[qca->txr.head]); in qcaspi_spi_thread()
737 if (qca->txr.skb[qca->txr.tail]) { in qcaspi_netdev_xmit()
771 qca->txr.size += skb->len + QCASPI_HW_PKT_LEN; in qcaspi_netdev_xmit()
773 new_tail = qca->txr.tail + 1; in qcaspi_netdev_xmit()
774 if (new_tail >= qca->txr.count) in qcaspi_netdev_xmit()
777 qca->txr.skb[qca->txr.tail] = skb; in qcaspi_netdev_xmit()
778 qca->txr.tail = new_tail; in qcaspi_netdev_xmit()
780 if (!qcaspi_tx_ring_has_space(&qca->txr)) { in qcaspi_netdev_xmit()
877 memset(&qca->txr, 0, sizeof(qca->txr)); in qcaspi_netdev_setup()
878 qca->txr.count = TX_RING_MAX_LEN; in qcaspi_netdev_setup()