diff options
author | sam <sam@FreeBSD.org> | 2009-04-26 21:03:29 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-04-26 21:03:29 +0000 |
commit | 4ce505aeb1fc7df6cacd7f2471b45ca0297397d3 (patch) | |
tree | 20c2e200901c77c256af3278d3b980f9ad89e9dd /sys/net80211/ieee80211_hostap.c | |
parent | 151f899628ad49224d1a8f06ef68d7e75bd6a9cf (diff) | |
download | FreeBSD-src-4ce505aeb1fc7df6cacd7f2471b45ca0297397d3.zip FreeBSD-src-4ce505aeb1fc7df6cacd7f2471b45ca0297397d3.tar.gz |
o use shared code to handle bpf tap and mbuf cleanup
o swap conditional order to put the cheapest first
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r-- | sys/net80211/ieee80211_hostap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 5b16a8d..e0d10ec 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -831,11 +831,8 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } - if (bpf_peers_present(vap->iv_rawbpf)) - bpf_mtap(vap->iv_rawbpf, m); vap->iv_recv_mgmt(ni, m, subtype, rssi, noise, rstamp); - m_freem(m); - return IEEE80211_FC0_TYPE_MGT; + goto out; case IEEE80211_FC0_TYPE_CTL: vap->iv_stats.is_rx_ctl++; @@ -859,7 +856,7 @@ err: ifp->if_ierrors++; out: if (m != NULL) { - if (bpf_peers_present(vap->iv_rawbpf) && need_tap) + if (need_tap && bpf_peers_present(vap->iv_rawbpf)) bpf_mtap(vap->iv_rawbpf, m); m_freem(m); } |