From: Ido Yariv Date: Mon, 18 Apr 2011 13:44:11 +0000 (+0300) Subject: wl12xx: Restart TX when TX descriptors are available X-Git-Tag: MMI-PSA29.97-13-9~19291^2~16^2~186^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef2e3004855e90d2919105e4a91d7df6ab9845a9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git wl12xx: Restart TX when TX descriptors are available The driver stops sending TX packets when either there aren't enough memory blocks, or it runs out of TX descriptors. The driver continues to send packets to the FW only when more memory blocks are available. The FW might free TX descriptors without freeing the corresponding memory blocks, especially when dynamic memory is enabled. In cases where memory blocks are not freed at all, the driver will keep waiting for more memory blocks indefinitely. Fix this by clearing the WL1271_FLAG_FW_TX_BUSY flag when there are available TX descriptors. Signed-off-by: Ido Yariv Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index c83665964467..cc837bba5468 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c @@ -65,6 +65,9 @@ static int wl1271_alloc_tx_id(struct wl1271 *wl, struct sk_buff *skb) static void wl1271_free_tx_id(struct wl1271 *wl, int id) { if (__test_and_clear_bit(id, wl->tx_frames_map)) { + if (unlikely(wl->tx_frames_cnt == ACX_TX_DESCRIPTORS)) + clear_bit(WL1271_FLAG_FW_TX_BUSY, &wl->flags); + wl->tx_frames[id] = NULL; wl->tx_frames_cnt--; }