diff options
author | Sam Leffler <sam@FreeBSD.org> | 2009-06-02 16:57:27 +0000 |
---|---|---|
committer | Sam Leffler <sam@FreeBSD.org> | 2009-06-02 16:57:27 +0000 |
commit | 1da89db5d6c7939dbdd61a265f1c7c3d4530c358 (patch) | |
tree | bc8bccdfdebb6d3beff014952e931a816c29ce78 /sys/net80211/ieee80211_freebsd.c | |
parent | 869c7348e52f2b3de962eafae7601b439f0f4d10 (diff) | |
download | src-1da89db5d6c7939dbdd61a265f1c7c3d4530c358.tar.gz src-1da89db5d6c7939dbdd61a265f1c7c3d4530c358.zip |
Remove hack used to deal with ifnet teardown now that if_detach and the
bridge do a better job.
o move ether_ifdetach to the top of ieee80211_detach
o do not clear if_softc at the top of ieee80211_detach; we no longer need
this because we are safeguarded against calls coming back through if_ioctl
o simplify the bpf tracker now that we don't null if_softc
This also fixes an issue where having a bpf consumer active when a vap
is destroyed would cause a crash because bpf referenced free'd memory.
Reviewed by: imp
Notes
Notes:
svn path=/head/; revision=193312
Diffstat (limited to 'sys/net80211/ieee80211_freebsd.c')
-rw-r--r-- | sys/net80211/ieee80211_freebsd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index 481ef8818b70..47a76bba65e7 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -710,8 +710,7 @@ bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach) ieee80211_syncflag_ext(vap, IEEE80211_FEXT_BPF); if (vap->iv_opmode == IEEE80211_M_MONITOR) atomic_add_int(&vap->iv_ic->ic_montaps, 1); - /* NB: if_softc is NULL on vap detach */ - } else if (vap != NULL && !bpf_peers_present(vap->iv_rawbpf)) { + } else if (!bpf_peers_present(vap->iv_rawbpf)) { ieee80211_syncflag_ext(vap, -IEEE80211_FEXT_BPF); if (vap->iv_opmode == IEEE80211_M_MONITOR) atomic_subtract_int(&vap->iv_ic->ic_montaps, 1); |