svn commit: r191536 - head/sys/net80211
Sam Leffler
sam at FreeBSD.org
Sun Apr 26 21:11:12 UTC 2009
Author: sam
Date: Sun Apr 26 21:11:12 2009
New Revision: 191536
URL: http://svn.freebsd.org/changeset/base/191536
Log:
fixup ieee80211_output handling:
o correct bpf handling, send 'em to the right tap
o do accouting
o mark mbufs holding multicast frames
Modified:
head/sys/net80211/ieee80211_output.c
Modified: head/sys/net80211/ieee80211_output.c
==============================================================================
--- head/sys/net80211/ieee80211_output.c Sun Apr 26 21:06:11 2009 (r191535)
+++ head/sys/net80211/ieee80211_output.c Sun Apr 26 21:11:12 2009 (r191536)
@@ -384,7 +384,17 @@ ieee80211_output(struct ifnet *ifp, stru
if (ieee80211_classify(ni, m))
senderr(EIO); /* XXX */
- BPF_MTAP(ifp, m);
+ if (bpf_peers_present(vap->iv_rawbpf))
+ bpf_mtap(vap->iv_rawbpf, m);
+
+ IEEE80211_NODE_STAT(ni, tx_data);
+ if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
+ IEEE80211_NODE_STAT(ni, tx_mcast);
+ m->m_flags |= M_MCAST;
+ } else
+ IEEE80211_NODE_STAT(ni, tx_ucast);
+ /* NB: ieee80211_encap does not include 802.11 header */
+ IEEE80211_NODE_STAT_ADD(ni, tx_bytes, m->m_pkthdr.len);
/*
* NB: DLT_IEEE802_11_RADIO identifies the parameters are
More information about the svn-src-head
mailing list