aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index c81e95b45c14..faf221ca3f41 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -3,8 +3,6 @@
3 * 3 *
4 * Copyright (C) 2008-2009 Nokia Corporation 4 * Copyright (C) 2008-2009 Nokia Corporation
5 * 5 *
6 * Contact: Kalle Valo <kalle.valo@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation. 8 * version 2 as published by the Free Software Foundation.
@@ -377,6 +375,7 @@ out:
377static int wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 375static int wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
378{ 376{
379 struct wl1251 *wl = hw->priv; 377 struct wl1251 *wl = hw->priv;
378 unsigned long flags;
380 379
381 skb_queue_tail(&wl->tx_queue, skb); 380 skb_queue_tail(&wl->tx_queue, skb);
382 381
@@ -391,16 +390,13 @@ static int wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
391 * The workqueue is slow to process the tx_queue and we need stop 390 * The workqueue is slow to process the tx_queue and we need stop
392 * the queue here, otherwise the queue will get too long. 391 * the queue here, otherwise the queue will get too long.
393 */ 392 */
394 if (skb_queue_len(&wl->tx_queue) >= WL1251_TX_QUEUE_MAX_LENGTH) { 393 if (skb_queue_len(&wl->tx_queue) >= WL1251_TX_QUEUE_HIGH_WATERMARK) {
395 wl1251_debug(DEBUG_TX, "op_tx: tx_queue full, stop queues"); 394 wl1251_debug(DEBUG_TX, "op_tx: tx_queue full, stop queues");
396 ieee80211_stop_queues(wl->hw);
397 395
398 /* 396 spin_lock_irqsave(&wl->wl_lock, flags);
399 * FIXME: this is racy, the variable is not properly 397 ieee80211_stop_queues(wl->hw);
400 * protected. Maybe fix this by removing the stupid
401 * variable altogether and checking the real queue state?
402 */
403 wl->tx_queue_stopped = true; 398 wl->tx_queue_stopped = true;
399 spin_unlock_irqrestore(&wl->wl_lock, flags);
404 } 400 }
405 401
406 return NETDEV_TX_OK; 402 return NETDEV_TX_OK;
@@ -469,9 +465,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
469 WARN_ON(wl->state != WL1251_STATE_ON); 465 WARN_ON(wl->state != WL1251_STATE_ON);
470 466
471 if (wl->scanning) { 467 if (wl->scanning) {
472 mutex_unlock(&wl->mutex);
473 ieee80211_scan_completed(wl->hw, true); 468 ieee80211_scan_completed(wl->hw, true);
474 mutex_lock(&wl->mutex);
475 wl->scanning = false; 469 wl->scanning = false;
476 } 470 }
477 471
@@ -1437,5 +1431,5 @@ EXPORT_SYMBOL_GPL(wl1251_free_hw);
1437 1431
1438MODULE_DESCRIPTION("TI wl1251 Wireles LAN Driver Core"); 1432MODULE_DESCRIPTION("TI wl1251 Wireles LAN Driver Core");
1439MODULE_LICENSE("GPL"); 1433MODULE_LICENSE("GPL");
1440MODULE_AUTHOR("Kalle Valo <kalle.valo@nokia.com>"); 1434MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");
1441MODULE_FIRMWARE(WL1251_FW_NAME); 1435MODULE_FIRMWARE(WL1251_FW_NAME);