From owner-svn-src-all@freebsd.org Thu Jun 9 08:19:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F06A2ADCED4; Thu, 9 Jun 2016 08:19:43 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1D4C1D8A; Thu, 9 Jun 2016 08:19:43 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u598JgrS060926; Thu, 9 Jun 2016 08:19:42 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u598JgB8060924; Thu, 9 Jun 2016 08:19:42 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201606090819.u598JgB8060924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 9 Jun 2016 08:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301722 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 08:19:44 -0000 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 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);