aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/wil6210.h
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2014-05-27 14:45:45 +0300
committerJohn W. Linville <linville@tuxdriver.com>2014-05-29 13:10:29 -0400
commitfc219eed079eb0b11d93ed1adf4fa58f2b465215 (patch)
tree6d68c2202f1a2ec44723e481f50e8d902a0c8502 /drivers/net/wireless/ath/wil6210/wil6210.h
parentd87bac1b26e81192d7264a73ea11324be80b493c (diff)
wil6210: limit fw error recovery attempts
In case there is something fundamentally wrong with the firmware (example: RF cable disconnected), FW will always crash immediately after reset. This leads to infinite fw error recovery loop. Count consecutive unsuccessful error recovery attempts in a short period of time, and stop doing recovery after some reasonable count. It is still possible to manually reset fw doing interface down/up sequence. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wil6210.h')
-rw-r--r--drivers/net/wireless/ath/wil6210/wil6210.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 3427ac4a4fa..f8c598ebd9e 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -40,6 +40,8 @@ static inline u32 WIL_GET_BITS(u32 x, int b0, int b1)
#define WIL6210_MAX_CID (8) /* HW limit */
#define WIL6210_NAPI_BUDGET (16) /* arbitrary */
#define WIL6210_ITR_TRSH (10000) /* arbitrary - about 15 IRQs/msec */
+#define WIL6210_FW_RECOVERY_RETRIES (5) /* try to recover this many times */
+#define WIL6210_FW_RECOVERY_TO msecs_to_jiffies(5000)
/* Hardware definitions begin */
@@ -361,6 +363,8 @@ struct wil6210_priv {
u32 fw_version;
u32 hw_version;
u8 n_mids; /* number of additional MIDs as reported by FW */
+ int recovery_count; /* num of FW recovery attempts in a short time */
+ unsigned long last_fw_recovery; /* jiffies of last fw recovery */
/* profile */
u32 monitor_flags;
u32 secure_pcp; /* create secure PCP? */