aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/txrx.c
diff options
context:
space:
mode:
authorAshok Nagarajan <asnagarajan@chromium.org>2013-03-08 10:58:45 -0800
committerJohn W. Linville <linville@tuxdriver.com>2013-03-08 16:02:48 -0500
commit8908c7d5392671610a2d80107845d4aeee92d9c1 (patch)
tree5434b6c0f94bdcb7b5106b238c4905623eb93433 /drivers/net/wireless/mwifiex/txrx.c
parentrndis_wlan: update email address (diff)
downloadlinux-dev-8908c7d5392671610a2d80107845d4aeee92d9c1.tar.xz
linux-dev-8908c7d5392671610a2d80107845d4aeee92d9c1.zip
mwifiex: Trigger a card reset on reaching tx_timeout threshold
tx_timeout doesn't always lead to a cmd_timeout. There are occurrences where cmd_timeout never gets triggered for a long time and we encounter a kernel crash. In this patch, we track the consecutive timeouts (tx_timeout_cnt). When tx_timeout_cnt exceeds the threshold, trigger a card reset thereby avoiding a kernel crash. Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org> Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/txrx.c')
-rw-r--r--drivers/net/wireless/mwifiex/txrx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index 296faec14365..8f923d0d2ba6 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -169,6 +169,8 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
if (!status) {
priv->stats.tx_packets++;
priv->stats.tx_bytes += skb->len;
+ if (priv->tx_timeout_cnt)
+ priv->tx_timeout_cnt = 0;
} else {
priv->stats.tx_errors++;
}