Commit 98a65b59 authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by John W. Linville

wil6210: report reset time

Useful to detect hardware problems
Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent aa27deaa
...@@ -230,7 +230,7 @@ void wil_priv_deinit(struct wil6210_priv *wil) ...@@ -230,7 +230,7 @@ void wil_priv_deinit(struct wil6210_priv *wil)
static void wil_target_reset(struct wil6210_priv *wil) static void wil_target_reset(struct wil6210_priv *wil)
{ {
int delay = 100; int delay = 0;
u32 baud_rate; u32 baud_rate;
u32 rev_id; u32 rev_id;
...@@ -277,7 +277,7 @@ static void wil_target_reset(struct wil6210_priv *wil) ...@@ -277,7 +277,7 @@ static void wil_target_reset(struct wil6210_priv *wil)
do { do {
msleep(1); msleep(1);
baud_rate = R(RGF_USER_SERIAL_BAUD_RATE); baud_rate = R(RGF_USER_SERIAL_BAUD_RATE);
if (delay-- < 0) { if (delay++ > 100) {
wil_err(wil, "Reset not completed\n"); wil_err(wil, "Reset not completed\n");
return; return;
} }
...@@ -286,7 +286,7 @@ static void wil_target_reset(struct wil6210_priv *wil) ...@@ -286,7 +286,7 @@ static void wil_target_reset(struct wil6210_priv *wil)
if (rev_id == 2) if (rev_id == 2)
W(RGF_LOS_COUNTER_CTL, BIT(8)); W(RGF_LOS_COUNTER_CTL, BIT(8));
wil_dbg_misc(wil, "Reset completed\n"); wil_dbg_misc(wil, "Reset completed in %d ms\n", delay);
#undef R #undef R
#undef W #undef W
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment