#define WL1251_DEFAULT_POWER_LEVEL 20
-#define WL1251_TX_QUEUE_LOW_WATERMARK 10
-#define WL1251_TX_QUEUE_HIGH_WATERMARK 25
+#define WL1251_TX_QUEUE_LOW_WATERMARK 8
+#define WL1251_TX_QUEUE_HIGH_WATERMARK 20
#define WL1251_DEFAULT_BEACON_INT 100
#define WL1251_DEFAULT_DTIM_PERIOD 1
return;
}
}
-
- wl1251_debug(DEBUG_TX, "cb: waking queues");
- ieee80211_wake_queues(wl->hw);
- wl->tx_queue_stopped = false;
}
}
int i, result_index, num_complete = 0;
struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr;
unsigned long flags;
+ int queue_len;
if (unlikely(wl->state != WL1251_STATE_ON))
return;
}
}
- if (wl->tx_queue_stopped
- &&
- skb_queue_len(&wl->tx_queue) <= WL1251_TX_QUEUE_LOW_WATERMARK){
-
- /* firmware buffer has space, restart queues */
- wl1251_debug(DEBUG_TX, "tx_complete: waking queues");
- spin_lock_irqsave(&wl->wl_lock, flags);
- ieee80211_wake_queues(wl->hw);
- wl->tx_queue_stopped = false;
- spin_unlock_irqrestore(&wl->wl_lock, flags);
- ieee80211_queue_work(wl->hw, &wl->tx_work);
-
- }
-
/* Every completed frame needs to be acknowledged */
if (num_complete) {
/*
}
wl->next_tx_complete = result_index;
+
+ queue_len = skb_queue_len(&wl->tx_queue);
+ if (wl->tx_queue_stopped &&
+ queue_len <= WL1251_TX_QUEUE_LOW_WATERMARK) {
+ /* firmware buffer has space, restart queues */
+ wl1251_debug(DEBUG_TX, "tx_complete: waking queues");
+ spin_lock_irqsave(&wl->wl_lock, flags);
+ ieee80211_wake_queues(wl->hw);
+ wl->tx_queue_stopped = false;
+ spin_unlock_irqrestore(&wl->wl_lock, flags);
+ }
+
+ if (queue_len > 0)
+ ieee80211_queue_work(wl->hw, &wl->tx_work);
}
/* caller must hold wl->mutex */