Date: Mon, 3 Mar 2008 17:58:19 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 136757 for review Message-ID: <200803031758.m23HwJax069667@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=136757 Change 136757 by sam@sam_ebb on 2008/03/03 17:57:49 Reclaim clone state on device detach; add ieee80211_vap_destroy that calls back through the clone code to destroy state. Fixes leaking of clone state on cardbus eject. Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211.c#27 edit .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#21 edit .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#19 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211.c#27 (text+ko) ==== @@ -253,7 +253,7 @@ /* XXX ieee80211_stop_all? */ while ((vap = TAILQ_FIRST(&ic->ic_vaps)) != NULL) - ic->ic_vap_delete(vap); + ieee80211_vap_destroy(vap); ieee80211_sysctl_detach(ic); ieee80211_regdomain_detach(ic); ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#21 (text+ko) ==== @@ -100,6 +100,12 @@ } IFC_SIMPLE_DECLARE(wlan, 0); +void +ieee80211_vap_destroy(struct ieee80211vap *vap) +{ + ifc_simple_destroy(&wlan_cloner, vap->iv_ifp); +} + static int ieee80211_sysctl_msecs_ticks(SYSCTL_HANDLER_ARGS) { ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#19 (text+ko) ==== @@ -208,6 +208,8 @@ void ieee80211_drain_ifq(struct ifqueue *); void ieee80211_flush_ifq(struct ifqueue *, struct ieee80211vap *); +void ieee80211_vap_destroy(struct ieee80211vap *); + #define IFNET_IS_UP_RUNNING(_ifp) \ (((_ifp)->if_flags & IFF_UP) && \ ((_ifp)->if_drv_flags & IFF_DRV_RUNNING))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803031758.m23HwJax069667>