From 90c816b6658b715d151f0706c1ef73a77c5d703b Mon Sep 17 00:00:00 2001 From: Yuri Ershov Date: Wed, 27 Oct 2010 17:34:39 +0400 Subject: [PATCH] wl1251: move all transmission to happen in tx_work Currently TX queue is consumed both in wl->tx_work and in wl->irq_work. This was problematic with the PS-Poll implementation, and caused stalls because of synchronisation issues between the workqueues. Fix that by consuming TX queue only in TX work. Signed-off-by: Kalle Valo Reviewed-by: Juuso Oikarinen Signed-off-by: Juuso Oikarinen Signed-off-by: Yuri Ershov --- drivers/net/wireless/wl12xx/wl1251_tx.c | 26 +------------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index 62918c9..e72c5f7 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c @@ -429,7 +429,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl, { struct ieee80211_tx_info *info; struct sk_buff *skb; - int hdrlen, ret; + int hdrlen; u8 *frame; skb = wl->tx_frames[result->id]; @@ -480,30 +480,6 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl, out: wl->tx_frames[result->id] = NULL; - - if (wl->tx_queue_stopped) { - wl1251_debug(DEBUG_TX, "cb: queue was stopped"); - - skb = skb_dequeue(&wl->tx_queue); - - /* The skb can be NULL because tx_work might have been - scheduled before the queue was stopped making the - queue empty */ - - if (skb) { - ret = wl1251_tx_frame(wl, skb); - if (ret == -EBUSY) { - /* firmware buffer is still full */ - wl1251_debug(DEBUG_TX, "cb: fw buffer " - "still full"); - skb_queue_head(&wl->tx_queue, skb); - return; - } else if (ret < 0) { - dev_kfree_skb(skb); - return; - } - } - } } /* Called upon reception of a TX complete interrupt */ -- 2.39.5