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.
This commit is contained in:
parent
6d5b25315e
commit
ed31279e71
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user