diff options
author | wpaul <wpaul@FreeBSD.org> | 2004-08-03 17:00:39 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2004-08-03 17:00:39 +0000 |
commit | 0c50dcdea3542f7b90ed10e8003b328f28aa3367 (patch) | |
tree | 47a8a4313e2b085ad7c00f8bf8c615634768cdf6 /sys/dev | |
parent | f381f9a20569a6ced5cd706cffb54b45b68eb98f (diff) | |
download | FreeBSD-src-0c50dcdea3542f7b90ed10e8003b328f28aa3367.zip FreeBSD-src-0c50dcdea3542f7b90ed10e8003b328f28aa3367.tar.gz |
Minor cleanups:
- Fix typo in comment
- Remember to free() sc->ndis_txarray on detach
- Remember to do an ifmedia_removeall() for ethernet devices
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index e1b8d98..48da1f8 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -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); |