提交 381e9fff 编写于 作者: A Amitkumar Karwar 提交者: John W. Linville

mwifiex: skip delay main work logic for USB interface.

We had introduced delay main work logic to avoid processing
interrupts when Rx pending packet count reaches high threshold.
interrupt processing is restarted later when packet count
reduces lower threashold. This helped to reduce unnecessary
overhead and improve throughput for SD and PCIe chipsets.

As there are no interrupts for USB, we will skip this logic for
USB chipsets.
Signed-off-by: NCathy Luo <cluo@marvell.com>
Signed-off-by: NAvinash Patil <patila@marvell.com>
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 798ea8ee
...@@ -149,7 +149,8 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter) ...@@ -149,7 +149,8 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
/* Check for Rx data */ /* Check for Rx data */
while ((skb = skb_dequeue(&adapter->rx_data_q))) { while ((skb = skb_dequeue(&adapter->rx_data_q))) {
atomic_dec(&adapter->rx_pending); atomic_dec(&adapter->rx_pending);
if (adapter->delay_main_work && if ((adapter->delay_main_work ||
adapter->iface_type == MWIFIEX_USB) &&
(atomic_read(&adapter->rx_pending) < LOW_RX_PENDING)) { (atomic_read(&adapter->rx_pending) < LOW_RX_PENDING)) {
if (adapter->if_ops.submit_rem_rx_urbs) if (adapter->if_ops.submit_rem_rx_urbs)
adapter->if_ops.submit_rem_rx_urbs(adapter); adapter->if_ops.submit_rem_rx_urbs(adapter);
...@@ -202,12 +203,15 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -202,12 +203,15 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
(adapter->hw_status == MWIFIEX_HW_STATUS_NOT_READY)) (adapter->hw_status == MWIFIEX_HW_STATUS_NOT_READY))
break; break;
/* If we process interrupts first, it would increase RX pending /* For non-USB interfaces, If we process interrupts first, it
* even further. Avoid this by checking if rx_pending has * would increase RX pending even further. Avoid this by
* crossed high threshold and schedule rx work queue * checking if rx_pending has crossed high threshold and
* and then process interrupts * schedule rx work queue and then process interrupts.
* For USB interface, there are no interrupts. We already have
* HIGH_RX_PENDING check in usb.c
*/ */
if (atomic_read(&adapter->rx_pending) >= HIGH_RX_PENDING) { if (atomic_read(&adapter->rx_pending) >= HIGH_RX_PENDING &&
adapter->iface_type != MWIFIEX_USB) {
adapter->delay_main_work = true; adapter->delay_main_work = true;
if (!adapter->rx_processing) if (!adapter->rx_processing)
queue_work(adapter->rx_workqueue, queue_work(adapter->rx_workqueue,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册