aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-02-27 17:41:32 -0500
committerLuciano Coelho <coelho@ti.com>2012-02-28 06:25:09 -0500
commit18aa755b84715f36e2811734f95cb822bcacfd89 (patch)
treea6db34428a267d3f453a9d38dd4009bda54ca6c0 /drivers/net/wireless/wl12xx
parent49c9cd26445aa8bc8348c384c943b758c57c47a9 (diff)
wl12xx: flush all Tx queues on tx_flush timeout
Ensure our queues are empty at the end of a tx_flush(), in case we timeout on passively waiting for them. This makes sure no left-overs are transmitted when we are on the wrong channel. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/tx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 6640c3975cfb..8f78fddcb723 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -1040,6 +1040,7 @@ void wl12xx_tx_reset(struct wl1271 *wl, bool reset_tx_queues)
1040void wl1271_tx_flush(struct wl1271 *wl) 1040void wl1271_tx_flush(struct wl1271 *wl)
1041{ 1041{
1042 unsigned long timeout; 1042 unsigned long timeout;
1043 int i;
1043 timeout = jiffies + usecs_to_jiffies(WL1271_TX_FLUSH_TIMEOUT); 1044 timeout = jiffies + usecs_to_jiffies(WL1271_TX_FLUSH_TIMEOUT);
1044 1045
1045 while (!time_after(jiffies, timeout)) { 1046 while (!time_after(jiffies, timeout)) {
@@ -1057,6 +1058,12 @@ void wl1271_tx_flush(struct wl1271 *wl)
1057 } 1058 }
1058 1059
1059 wl1271_warning("Unable to flush all TX buffers, timed out."); 1060 wl1271_warning("Unable to flush all TX buffers, timed out.");
1061
1062 /* forcibly flush all Tx buffers on our queues */
1063 mutex_lock(&wl->mutex);
1064 for (i = 0; i < WL12XX_MAX_LINKS; i++)
1065 wl1271_tx_reset_link_queues(wl, i);
1066 mutex_unlock(&wl->mutex);
1060} 1067}
1061 1068
1062u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set) 1069u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set)