PERFORCE change 136757 for review
Sam Leffler
sam at FreeBSD.org
Mon Mar 3 17:58:20 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=136757
Change 136757 by sam at 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))
More information about the p4-projects
mailing list