From 5a44e8c44b09f08ee9e42d177f79640c96f4c857 Mon Sep 17 00:00:00 2001 From: adrian Date: Mon, 12 Oct 2015 04:30:38 +0000 Subject: net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened. Move error handling into ieee80211_parent_xmitpkt() instead of spreading it between functions. Submitted by: Differential Revision: https://reviews.freebsd.org/D3772 --- sys/dev/iwn/if_iwn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/dev/iwn') diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index c1ed6ab..fe36294 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -4950,9 +4950,7 @@ iwn_transmit(struct ieee80211com *ic, struct mbuf *m) } error = iwn_tx_data(sc, m, ni); - if (error) { - if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); - } else + if (!error) sc->sc_tx_timer = 5; IWN_UNLOCK(sc); return (error); -- cgit v1.1