diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_tx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_tx.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_tx.c b/drivers/net/wireless/wl12xx/wl1251_tx.c index 6d618fb1fd9..388492a7f41 100644 --- a/drivers/net/wireless/wl12xx/wl1251_tx.c +++ b/drivers/net/wireless/wl12xx/wl1251_tx.c | |||
@@ -320,11 +320,6 @@ void wl1251_tx_work(struct work_struct *work) | |||
320 | 320 | ||
321 | ret = wl1251_tx_frame(wl, skb); | 321 | ret = wl1251_tx_frame(wl, skb); |
322 | if (ret == -EBUSY) { | 322 | if (ret == -EBUSY) { |
323 | /* firmware buffer is full, stop queues */ | ||
324 | wl1251_debug(DEBUG_TX, "tx_work: fw buffer full, " | ||
325 | "stop queues"); | ||
326 | ieee80211_stop_queues(wl->hw); | ||
327 | wl->tx_queue_stopped = true; | ||
328 | skb_queue_head(&wl->tx_queue, skb); | 323 | skb_queue_head(&wl->tx_queue, skb); |
329 | goto out; | 324 | goto out; |
330 | } else if (ret < 0) { | 325 | } else if (ret < 0) { |
@@ -447,6 +442,7 @@ void wl1251_tx_complete(struct wl1251 *wl) | |||
447 | { | 442 | { |
448 | int i, result_index, num_complete = 0; | 443 | int i, result_index, num_complete = 0; |
449 | 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; | ||
450 | 446 | ||
451 | if (unlikely(wl->state != WL1251_STATE_ON)) | 447 | if (unlikely(wl->state != WL1251_STATE_ON)) |
452 | return; | 448 | return; |
@@ -475,6 +471,20 @@ void wl1251_tx_complete(struct wl1251 *wl) | |||
475 | } | 471 | } |
476 | } | 472 | } |
477 | 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 | |||
478 | /* Every completed frame needs to be acknowledged */ | 488 | /* Every completed frame needs to be acknowledged */ |
479 | if (num_complete) { | 489 | if (num_complete) { |
480 | /* | 490 | /* |