From owner-svn-src-head@freebsd.org Sun Oct 11 02:00:09 2015 Return-Path: Delivered-To: svn-src-head@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 56C9BA0FBC4; Sun, 11 Oct 2015 02:00:09 +0000 (UTC) (envelope-from adrian@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 2320E17ED; Sun, 11 Oct 2015 02:00:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9B208eW030283; Sun, 11 Oct 2015 02:00:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9B208nm030282; Sun, 11 Oct 2015 02:00:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510110200.t9B208nm030282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Oct 2015 02:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289129 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 02:00:09 -0000 Author: adrian Date: Sun Oct 11 02:00:08 2015 New Revision: 289129 URL: https://svnweb.freebsd.org/changeset/base/289129 Log: wpi(4): do not count failures twice for ic_raw_xmit(). Tested: * Tested with Intel 3945BG, STA mode Submitted by: Differential Revision: https://reviews.freebsd.org/D3768 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Oct 11 01:58:50 2015 (r289128) +++ head/sys/dev/wpi/if_wpi.c Sun Oct 11 02:00:08 2015 (r289129) @@ -3001,14 +3001,6 @@ wpi_tx_ring_is_full(struct wpi_softc *sc return retval; } -static __inline void -wpi_handle_tx_failure(struct ieee80211_node *ni) -{ - /* NB: m is reclaimed on tx failure */ - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - ieee80211_free_node(ni); -} - static int wpi_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_bpf_params *params) @@ -3046,8 +3038,8 @@ wpi_raw_xmit(struct ieee80211_node *ni, unlock: WPI_TX_UNLOCK(sc); if (error != 0) { - wpi_handle_tx_failure(ni); m_freem(m); + ieee80211_free_node(ni); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); return error; @@ -3085,7 +3077,8 @@ wpi_transmit(struct ieee80211com *ic, st error = 0; ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (wpi_tx_data(sc, m, ni) != 0) { - wpi_handle_tx_failure(ni); + if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); m_freem(m); }