aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2011-03-01 08:14:38 -0500
committerLuciano Coelho <coelho@ti.com>2011-03-03 09:10:46 -0500
commit8aad24642a7c06832a75f1d20e8e3112b4fbd815 (patch)
tree53d29682577134e535cf3b96281fec45847c61f1 /drivers/net
parent50e9f746f63c9b881f2ca4a35dbdfd34b1a8a215 (diff)
wl12xx: Reorder data handling in irq_work
The FW has a limited amount of memory for holding frames. In case it runs out of memory reserved for RX frames, it'll have no other choice but to drop packets received from the AP. Thus, it is important to handle RX data interrupts as soon as possible, before handling anything else. In addition, since there are enough TX descriptors to go around, it is better to first send TX frames, and only then handle TX completions. Fix this by changing the order of function calls in wl1271_irq_work. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/wl12xx/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 947491a1d9cc..65e8a0cc92d0 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -685,10 +685,7 @@ static void wl1271_irq_work(struct work_struct *work)
685 if (intr & WL1271_ACX_INTR_DATA) { 685 if (intr & WL1271_ACX_INTR_DATA) {
686 wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA"); 686 wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_DATA");
687 687
688 /* check for tx results */ 688 wl1271_rx(wl, &wl->fw_status->common);
689 if (wl->fw_status->common.tx_results_counter !=
690 (wl->tx_results_count & 0xff))
691 wl1271_tx_complete(wl);
692 689
693 /* Check if any tx blocks were freed */ 690 /* Check if any tx blocks were freed */
694 if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) && 691 if (!test_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags) &&
@@ -700,7 +697,10 @@ static void wl1271_irq_work(struct work_struct *work)
700 wl1271_tx_work_locked(wl); 697 wl1271_tx_work_locked(wl);
701 } 698 }
702 699
703 wl1271_rx(wl, &wl->fw_status->common); 700 /* check for tx results */
701 if (wl->fw_status->common.tx_results_counter !=
702 (wl->tx_results_count & 0xff))
703 wl1271_tx_complete(wl);
704 } 704 }
705 705
706 if (intr & WL1271_ACX_INTR_EVENT_A) { 706 if (intr & WL1271_ACX_INTR_EVENT_A) {