diff options
author | Arik Nemtsov <arik@wizery.com> | 2012-11-28 11:42:44 +0200 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-12-11 12:37:22 +0200 |
commit | d6037d22f30738e942ddfd29e3fef17deb075420 (patch) | |
tree | b2eb73c6cf0c538f1523f5c5119b365db8e6c591 /drivers/net/wireless/ti/wlcore/main.c | |
parent | 1c33db782d1d0d9be83feacbb065cd4956f485e7 (diff) |
wlcore: don't take mutex before stopping queues
Protect all functions touching queue_stop_reasons by spin-lock, since
they are accessed by op_tx. Now there's no need to take the mutex
before caling wlcore_queue_xxx functions.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/main.c')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 89f69d949443..56a5308b5b03 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -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); @@ -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, @@ -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); } |