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 Better way of ensureing that asynchronous ...
details: https://anonhg.NetBSD.org/src-all/rev/bf46896bed1f
branches: trunk
changeset: 377104:bf46896bed1f
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Fri Aug 05 23:30:49 2022 +1000
description:
Better way of ensureing that asynchronous events are complete.
diffstat:
sys/dev/usb/if_urtwn.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 8e5f690c1305 -r bf46896bed1f sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Fri Aug 05 23:29:29 2022 +1000
+++ b/sys/dev/usb/if_urtwn.c Fri Aug 05 23:30:49 2022 +1000
@@ -258,7 +258,7 @@ static int urtwn_configure_pipes(struct
static void urtwn_task(void *);
static void urtwn_do_async(struct urtwn_softc *,
void (*)(struct urtwn_softc *, void *), void *, int);
-static void urtwn_wait_async(struct urtwn_softc *);
+//static void urtwn_wait_async(struct urtwn_softc *);
static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *,
int);
static void urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t);
@@ -748,7 +748,7 @@ urtwn_do_async(struct urtwn_softc *sc,
splx(s);
}
-static void
+__unused static void
urtwn_wait_async(struct urtwn_softc *sc)
{
@@ -1724,6 +1724,10 @@ urtwn_newstate(struct ieee80211vap *vap,
nstate, arg, ostate, 0);
callout_stop(&sc->sc_calib_to);
+ if (sc->sc_uw.uw_pri != NULL)
+ usb_rem_task_wait(sc->sc_uw.uw_udev, &sc->sc_task,
+ USB_TASKQ_DRIVER, usbwifi_mutex_ic(&sc->sc_uw));
+
switch (ostate) {
case IEEE80211_S_INIT:
@@ -4610,8 +4614,10 @@ urtwn_init(struct usbwifi *uw)
/* Set default channel. */
urtwn_set_chan(sc, ic->ic_curchan);
+#if 0
// XXXX can't do that here while core is locked?
urtwn_wait_async(sc);
+#endif
return 0;
Home |
Main Index |
Thread Index |
Old Index