diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index 6634b3e27cfc..388492a7f41f 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c | |||
@@ -4,8 +4,6 @@ | |||
4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated | 4 | * Copyright (c) 1998-2007 Texas Instruments Incorporated |
5 | * Copyright (C) 2008 Nokia Corporation | 5 | * Copyright (C) 2008 Nokia Corporation |
6 | * | 6 | * |
7 | * Contact: Kalle Valo <kalle.valo@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
10 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
11 | * version 2 as published by the Free Software Foundation. | 9 | * version 2 as published by the Free Software Foundation. |
@@ -322,11 +320,6 @@ void wl1251_tx_work(struct work_struct *work) | |||
322 | 320 | ||
323 | ret = wl1251_tx_frame(wl, skb); | 321 | ret = wl1251_tx_frame(wl, skb); |
324 | if (ret == -EBUSY) { | 322 | if (ret == -EBUSY) { |
325 | /* firmware buffer is full, stop queues */ | ||
326 | wl1251_debug(DEBUG_TX, "tx_work: fw buffer full, " | ||
327 | "stop queues"); | ||
328 | ieee80211_stop_queues(wl->hw); | ||
329 | wl->tx_queue_stopped = true; | ||
330 | skb_queue_head(&wl->tx_queue, skb); | 323 | skb_queue_head(&wl->tx_queue, skb); |
331 | goto out; | 324 | goto out; |
332 | } else if (ret < 0) { | 325 | } else if (ret < 0) { |
@@ -449,6 +442,7 @@ void wl1251_tx_complete(struct wl1251 *wl) | |||
449 | { | 442 | { |
450 | int i, result_index, num_complete = 0; | 443 | int i, result_index, num_complete = 0; |
451 | struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr; | 444 | struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr; |
445 | unsigned long flags; | ||
452 | 446 | ||
453 | if (unlikely(wl->state != WL1251_STATE_ON)) | 447 | if (unlikely(wl->state != WL1251_STATE_ON)) |
454 | return; | 448 | return; |
@@ -477,6 +471,20 @@ void wl1251_tx_complete(struct wl1251 *wl) | |||
477 | } | 471 | } |
478 | } | 472 | } |
479 | 473 | ||
474 | if (wl->tx_queue_stopped | ||
475 | && | ||
476 | skb_queue_len(&wl->tx_queue) <= WL1251_TX_QUEUE_LOW_WATERMARK){ | ||
477 | |||
478 | /* firmware buffer has space, restart queues */ | ||
479 | wl1251_debug(DEBUG_TX, "tx_complete: waking queues"); | ||
480 | spin_lock_irqsave(&wl->wl_lock, flags); | ||
481 | ieee80211_wake_queues(wl->hw); | ||
482 | wl->tx_queue_stopped = false; | ||
483 | spin_unlock_irqrestore(&wl->wl_lock, flags); | ||
484 | ieee80211_queue_work(wl->hw, &wl->tx_work); | ||
485 | |||
486 | } | ||
487 | |||
480 | /* Every completed frame needs to be acknowledged */ | 488 | /* Every completed frame needs to be acknowledged */ |
481 | if (num_complete) { | 489 | if (num_complete) { |
482 | /* | 490 | /* |