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>
This commit is contained in:
Andriy Voskoboinyk 2016-06-09 08:19:42 +00:00
parent 03b521d4dc
commit 4d4d5e2508
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301722
2 changed files with 2 additions and 3 deletions

View File

@ -412,8 +412,8 @@ hostap_deliver_data(struct ieee80211vap *vap,
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) {
/*

View File

@ -647,7 +647,6 @@ ieee80211_output(struct ifnet *ifp, struct mbuf *m,
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);