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/b0d120a7c2b1
branches:  trunk
changeset: 375237:b0d120a7c2b1
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 c6f59baf26d7 -r b0d120a7c2b1 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
@@ -4388,6 +4388,10 @@ urtwn_init(struct usbwifi *uw)
 
        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