Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352219
b: refs/heads/master
c: d6037d2
h: refs/heads/master
i:
  352217: 5f91b48
  352215: 00d09a6
v: v3
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Dec 11, 2012
1 parent eeab20e commit 4be47b8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c33db782d1d0d9be83feacbb065cd4956f485e7
refs/heads/master: d6037d22f30738e942ddfd29e3fef17deb075420
9 changes: 3 additions & 6 deletions trunk/drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,8 +1200,8 @@ static void wl1271_op_tx(struct ieee80211_hw *hw,
*/
if (hlid == WL12XX_INVALID_LINK_ID ||
(!test_bit(hlid, wlvif->links_map)) ||
(wlcore_is_queue_stopped(wl, wlvif, q) &&
!wlcore_is_queue_stopped_by_reason(wl, wlvif, q,
(wlcore_is_queue_stopped_locked(wl, wlvif, q) &&
!wlcore_is_queue_stopped_by_reason_locked(wl, wlvif, q,
WLCORE_QUEUE_STOP_REASON_WATERMARK))) {
wl1271_debug(DEBUG_TX, "DROP skb hlid %d q %d", hlid, q);
ieee80211_free_txskb(hw, skb);
Expand All @@ -1220,7 +1220,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw,
* the queue here, otherwise the queue will get too long.
*/
if (wlvif->tx_queue_count[q] >= WL1271_TX_QUEUE_HIGH_WATERMARK &&
!wlcore_is_queue_stopped_by_reason(wl, wlvif, q,
!wlcore_is_queue_stopped_by_reason_locked(wl, wlvif, q,
WLCORE_QUEUE_STOP_REASON_WATERMARK)) {
wl1271_debug(DEBUG_TX, "op_tx: stopping queues for q %d", q);
wlcore_stop_queue_locked(wl, wlvif, q,
Expand Down Expand Up @@ -3229,10 +3229,7 @@ static int wlcore_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
* stop the queues and flush to ensure the next packets are
* in sync with FW spare block accounting
*/
mutex_lock(&wl->mutex);
wlcore_stop_queues(wl, WLCORE_QUEUE_STOP_REASON_SPARE_BLK);
mutex_unlock(&wl->mutex);

wl1271_tx_flush(wl);
}

Expand Down
23 changes: 21 additions & 2 deletions trunk/drivers/net/wireless/ti/wlcore/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,14 +1287,33 @@ void wlcore_wake_queues(struct wl1271 *wl,
bool wlcore_is_queue_stopped_by_reason(struct wl1271 *wl,
struct wl12xx_vif *wlvif, u8 queue,
enum wlcore_queue_stop_reason reason)
{
unsigned long flags;
bool stopped;

spin_lock_irqsave(&wl->wl_lock, flags);
stopped = wlcore_is_queue_stopped_by_reason_locked(wl, wlvif, queue,
reason);
spin_unlock_irqrestore(&wl->wl_lock, flags);

return stopped;
}

bool wlcore_is_queue_stopped_by_reason_locked(struct wl1271 *wl,
struct wl12xx_vif *wlvif, u8 queue,
enum wlcore_queue_stop_reason reason)
{
int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);

WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
return test_bit(reason, &wl->queue_stop_reasons[hwq]);
}

bool wlcore_is_queue_stopped(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 queue)
bool wlcore_is_queue_stopped_locked(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 queue)
{
int hwq = wlcore_tx_get_mac80211_queue(wlvif, queue);

WARN_ON_ONCE(!spin_is_locked(&wl->wl_lock));
return !!wl->queue_stop_reasons[hwq];
}
9 changes: 7 additions & 2 deletions trunk/drivers/net/wireless/ti/wlcore/tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,13 @@ void wlcore_wake_queues(struct wl1271 *wl,
bool wlcore_is_queue_stopped_by_reason(struct wl1271 *wl,
struct wl12xx_vif *wlvif, u8 queue,
enum wlcore_queue_stop_reason reason);
bool wlcore_is_queue_stopped(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 queue);
bool
wlcore_is_queue_stopped_by_reason_locked(struct wl1271 *wl,
struct wl12xx_vif *wlvif,
u8 queue,
enum wlcore_queue_stop_reason reason);
bool wlcore_is_queue_stopped_locked(struct wl1271 *wl, struct wl12xx_vif *wlvif,
u8 queue);

/* from main.c */
void wl1271_free_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid);
Expand Down

0 comments on commit 4be47b8

Please sign in to comment.