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 Ensure that init is not called twice for m...



details:   https://anonhg.NetBSD.org/src-all/rev/f238c159d338
branches:  trunk
changeset: 365687:f238c159d338
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Fri Apr 08 14:24:35 2022 +1000

description:
Ensure that init is not called twice for multiple vaps.

diffstat:

 sys/dev/usb/if_urtwn.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r c68e2cb51a1e -r f238c159d338 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Fri Apr 08 14:23:39 2022 +1000
+++ b/sys/dev/usb/if_urtwn.c    Fri Apr 08 14:24:35 2022 +1000
@@ -4387,6 +4387,10 @@
 
        usbwifi_isowned_ic(&sc->sc_uw);
 
+       if (ISSET(sc->sc_uw.uw_flags, URTWN_FLAG_FWREADY)) {
+               return EEXIST;
+       }
+
        mutex_enter(&sc->sc_task_mtx);
        /* Init host async commands ring. */
        sc->cmdq.cur = sc->cmdq.next = sc->cmdq.queued = 0;



Home | Main Index | Thread Index | Old Index