Date: Thu, 9 Jun 2016 08:19:42 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301722 - head/sys/net80211 Message-ID: <201606090819.u598JgB8060924@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606090819.u598JgB8060924>