aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_main.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-22 01:38:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-09 15:03:02 -0500
commit06f7bc7db79fabe6b2ec16eff0f59e4acc21eb72 (patch)
tree98db914af4e42ec79c78cb631dbaa7cff531f179 /drivers/net/wireless/wl12xx/wl1271_main.c
parent15305498a443c181c8fb5deafb94eae585fe3ad5 (diff)
wl1271: Fix queue stopping/waking for TX path
The queue stopping/waking functionality was broken in a way that could cause huge latencies in TX transfers and even cause the TX to stall in the right circumstances. Correct these problems. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 81fb02e82923..184264a53b20 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -791,15 +791,13 @@ static int wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
791 * The workqueue is slow to process the tx_queue and we need stop 791 * The workqueue is slow to process the tx_queue and we need stop
792 * the queue here, otherwise the queue will get too long. 792 * the queue here, otherwise the queue will get too long.
793 */ 793 */
794 if (skb_queue_len(&wl->tx_queue) >= WL1271_TX_QUEUE_MAX_LENGTH) { 794 if (skb_queue_len(&wl->tx_queue) >= WL1271_TX_QUEUE_HIGH_WATERMARK) {
795 ieee80211_stop_queues(wl->hw); 795 wl1271_debug(DEBUG_TX, "op_tx: stopping queues");
796 796
797 /* 797 spin_lock_irqsave(&wl->wl_lock, flags);
798 * FIXME: this is racy, the variable is not properly 798 ieee80211_stop_queues(wl->hw);
799 * protected. Maybe fix this by removing the stupid
800 * variable altogether and checking the real queue state?
801 */
802 set_bit(WL1271_FLAG_TX_QUEUE_STOPPED, &wl->flags); 799 set_bit(WL1271_FLAG_TX_QUEUE_STOPPED, &wl->flags);
800 spin_unlock_irqrestore(&wl->wl_lock, flags);
803 } 801 }
804 802
805 return NETDEV_TX_OK; 803 return NETDEV_TX_OK;