diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-02-10 13:47:18 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-13 15:20:14 -0500 |
commit | 9be86cf067f43c3a43a538189d773afc812e4017 (patch) | |
tree | 8677c171bdd00c83f525f4e1e2cfb2093ed25cd8 /drivers/net/wireless/ti/wlcore/tx.c | |
parent | wlcore: memset wl->rx_filter_enabled to zero after recovery (diff) | |
download | linux-dev-9be86cf067f43c3a43a538189d773afc812e4017.tar.xz linux-dev-9be86cf067f43c3a43a538189d773afc812e4017.zip |
wlcore: cancel Tx watchdog on suspend and rearm on first Tx after
Sometimes a tx_flush during suspend fails, but the FW manages to flush
out the packets during the time when the host is supsended. Cancel
the Tx-watchdog on suspend to not cause a spurious recovery on resume
for that case. Set a flag to reinit the watchdog on the first Tx after
resume, so we'll still recover if the FW is not empty and there's
indeed a problem.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/tx.c')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 87cd707affa2..ca886efb0a57 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -234,8 +234,13 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl->tx_blocks_available -= total_blocks; wl->tx_allocated_blocks += total_blocks; - /* If the FW was empty before, arm the Tx watchdog */ - if (wl->tx_allocated_blocks == total_blocks) + /* + * If the FW was empty before, arm the Tx watchdog. Also do + * this on the first Tx after resume, as we always cancel the + * watchdog on suspend. + */ + if (wl->tx_allocated_blocks == total_blocks || + test_and_clear_bit(WL1271_FLAG_REINIT_TX_WDOG, &wl->flags)) wl12xx_rearm_tx_watchdog_locked(wl); ac = wl1271_tx_get_queue(skb_get_queue_mapping(skb)); |