Minor cleanups:

- Fix typo in comment
- Remember to free() sc->ndis_txarray on detach
- Remember to do an ifmedia_removeall() for ethernet devices
This commit is contained in:
Bill Paul 2004-08-03 17:00:39 +00:00
parent 7d01f1820a
commit 64823e73c5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133080

View File

@ -439,7 +439,7 @@ ndis_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
/*
* Figure out of we're allowed to use multipacket sends
* Figure out if we're allowed to use multipacket sends
* with this driver, and if so, how many.
*/
@ -758,6 +758,12 @@ ndis_detach(dev)
if (sc->ndis_sc)
ndis_destroy_dma(sc);
if (sc->ndis_txarray)
free(sc->ndis_txarray, M_DEVBUF);
if (!sc->ndis_80211)
ifmedia_removeall(&sc->ifmedia);
ndis_unload_driver((void *)ifp);
if (sc->ndis_iftype == PCIBus)
@ -765,8 +771,8 @@ ndis_detach(dev)
#if __FreeBSD_version < 502113
sysctl_ctx_free(&sc->ndis_ctx);
#endif
mtx_destroy(&sc->ndis_mtx);
mtx_destroy(&sc->ndis_intrmtx);