Module Name: src
Committed By: mrg
Date: Sat May 2 00:50:07 UTC 2020
Modified Files:
src/sys/dev/usb: if_urtwn.c
Log Message:
don't forget to destroy the new sc_media_mtx mutex.
now re-plugging and re-using the same softc doesn't give mutex
already initialised error.
To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/usb/if_urtwn.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/usb/if_urtwn.c
diff -u src/sys/dev/usb/if_urtwn.c:1.86 src/sys/dev/usb/if_urtwn.c:1.87
--- src/sys/dev/usb/if_urtwn.c:1.86 Thu Apr 16 17:18:27 2020
+++ src/sys/dev/usb/if_urtwn.c Sat May 2 00:50:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $ */
+/* $NetBSD: if_urtwn.c,v 1.87 2020/05/02 00:50:07 mrg Exp $ */
/* $OpenBSD: if_urtwn.c,v 1.42 2015/02/10 23:25:46 mpi Exp $ */
/*-
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.86 2020/04/16 17:18:27 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.87 2020/05/02 00:50:07 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -584,6 +584,8 @@ urtwn_detach(device_t self, int flags)
ieee80211_ifdetach(&sc->sc_ic);
if_detach(ifp);
+ mutex_destroy(&sc->sc_media_mtx);
+
/* Close Tx/Rx pipes. Abort done by urtwn_stop. */
urtwn_close_pipes(sc);
}