Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Sprinkle delay in some places. Improves s...
details: https://anonhg.NetBSD.org/src-all/rev/cf44d2c64d74
branches: trunk
changeset: 939870:cf44d2c64d74
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Fri Jun 05 04:30:14 2020 +1000
description:
Sprinkle delay in some places. Improves stability.
diffstat:
sys/dev/usb/if_urtwn.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diffs (80 lines):
diff -r cd6d8728f258 -r cf44d2c64d74 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Tue Jun 02 02:04:47 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Fri Jun 05 04:30:14 2020 +1000
@@ -2347,6 +2347,8 @@
callout_stop(&sc->sc_scan_to);
callout_stop(&sc->sc_calib_to);
+ DELAY(1000);
+
switch (ostate) {
case IEEE80211_S_INIT:
break;
@@ -2402,6 +2404,7 @@
urtwn_read_1(sc, R92C_BCN_CTRL) &
~(R92C_BCN_CTRL_EN_BCN | R92C_BCN_CTRL_TXBCN_RPT));
}
+ DELAY(1000);
/* Reset EDCA parameters. */
urtwn_write_4(sc, R92C_EDCA_VO_PARAM, 0x002f3217);
@@ -2420,6 +2423,8 @@
break;
}
+ DELAY(1000);
+
switch (nstate) {
case IEEE80211_S_INIT:
/* Turn link LED off. */
@@ -2564,6 +2569,8 @@
} else /* IEEE_MODE_11NG */
urtwn_write_1(sc, R92C_INIRTS_RATE_SEL, 12); /* MCS 0 */
+ DELAY(1000);
+
/* Enable Rx of data frames. */
urtwn_write_2(sc, R92C_RXFLTMAP2, 0xffff);
@@ -4352,6 +4359,7 @@
error = ETIMEDOUT;
goto fail;
}
+ DELAY(10000);
fail:
firmware_free(fw, fwlen);
return error;
@@ -5524,6 +5532,7 @@
urtwn_stop(ifp, 0);
+ DELAY(2000);
mutex_enter(&sc->sc_write_mtx);
mutex_enter(&sc->sc_task_mtx);
@@ -5779,6 +5788,7 @@
urtwn_wait_async(sc);
splx(s);
+ DELAY(2000);
sc->tx_timer = 0;
ifp->if_timer = 0;
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
@@ -5839,6 +5849,8 @@
urtwn_write_1(sc, R92C_SYS_FUNC_EN,
R92C_SYS_FUNC_EN_USBD | R92C_SYS_FUNC_EN_USBA);
+ DELAY(10000);
+
/*
* Reset digital sequence
*/
@@ -5856,6 +5868,8 @@
}
}
+ DELAY(10000);
+
/* Reset MAC and Enable 8051 */
urtwn_write_1(sc, R92C_SYS_FUNC_EN + 1, 0x54);
Home |
Main Index |
Thread Index |
Old Index