diff options
author | Yan-Hsuan Chuang <yhchuang@realtek.com> | 2020-03-12 11:08:52 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-03-23 20:29:58 +0300 |
commit | aaab5d0e673749f82ff34e5f15ea8a689789a9ce (patch) | |
tree | 3e0fda8f6817300efc3b83841c6f975b3635c378 /drivers/net/wireless/realtek/rtw88/pci.h | |
parent | a5697a65ecd109ce7f8e3661b89a5dffae73b512 (diff) | |
download | linux-aaab5d0e673749f82ff34e5f15ea8a689789a9ce.tar.xz |
rtw88: kick off TX packets once for higher efficiency
Driver used to kick off every TX packets, that will waste some
time while we can do better to kick off the TX packets once after
they are all prepared to be transmitted.
For PCI, it uses DMA engine to transfer the SKBs to the device,
and the transition of the state of the DMA engine could be a cost.
Driver can save some time to kick off multiple SKBs once so that
the DMA engine will have only one transition.
So, split rtw_hci_ops::tx() to rtw_hci_ops::tx_write() and
rtw_hci_ops::tx_kick_off() to explicitly kick the SKBs off after
they are written to the prepared buffer. For packets come from
ieee80211_ops::tx(), write one and then kick it off immediately.
For packets queued in TX queue, which come from
ieee80211_ops::wake_tx_queue(), we can dequeue them, write them
to the buffer, and then kick them off together.
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200312080852.16684-6-yhchuang@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw88/pci.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtw88/pci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw88/pci.h b/drivers/net/wireless/realtek/rtw88/pci.h index 67b5e2fe2b62..3ac4fb328d31 100644 --- a/drivers/net/wireless/realtek/rtw88/pci.h +++ b/drivers/net/wireless/realtek/rtw88/pci.h @@ -208,6 +208,7 @@ struct rtw_pci { bool irq_enabled; u16 rx_tag; + DECLARE_BITMAP(tx_queued, RTK_MAX_TX_QUEUE_NUM); struct rtw_pci_tx_ring tx_rings[RTK_MAX_TX_QUEUE_NUM]; struct rtw_pci_rx_ring rx_rings[RTK_MAX_RX_QUEUE_NUM]; u16 link_ctrl; |