svn commit: r301722 - head/sys/net80211
Andriy Voskoboinyk
avos at FreeBSD.org
Thu Jun 9 08:19:44 UTC 2016
Author: avos
Date: Thu Jun 9 08:19:42 2016
New Revision: 301722
URL: https://svnweb.freebsd.org/changeset/base/301722
Log:
net80211: fix duplicate packet counter incrementation.
Remove 'if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);' from raw xmit
and apbridge path; it will be incremented by ieee80211_tx_complete()
after packet transmission.
Noticed by: Imre Vadasz <imre at vdsz.com>
Modified:
head/sys/net80211/ieee80211_hostap.c
head/sys/net80211/ieee80211_output.c
Modified: head/sys/net80211/ieee80211_hostap.c
==============================================================================
--- head/sys/net80211/ieee80211_hostap.c Thu Jun 9 07:49:20 2016 (r301721)
+++ head/sys/net80211/ieee80211_hostap.c Thu Jun 9 08:19:42 2016 (r301722)
@@ -412,8 +412,8 @@ hostap_deliver_data(struct ieee80211vap
ieee80211_free_node(sta);
}
}
- if (mcopy != NULL && ieee80211_vap_xmitpkt(vap, mcopy) == 0)
- if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
+ if (mcopy != NULL)
+ (void) ieee80211_vap_xmitpkt(vap, mcopy);
}
if (m != NULL) {
/*
Modified: head/sys/net80211/ieee80211_output.c
==============================================================================
--- head/sys/net80211/ieee80211_output.c Thu Jun 9 07:49:20 2016 (r301721)
+++ head/sys/net80211/ieee80211_output.c Thu Jun 9 08:19:42 2016 (r301722)
@@ -647,7 +647,6 @@ ieee80211_output(struct ifnet *ifp, stru
if (ieee80211_classify(ni, m))
senderr(EIO); /* XXX */
- if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
IEEE80211_NODE_STAT(ni, tx_data);
if (IEEE80211_IS_MULTICAST(wh->i_addr1)) {
IEEE80211_NODE_STAT(ni, tx_mcast);
More information about the svn-src-all
mailing list