Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2016 10:21:28 +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: r306900 - head/sys/dev/iwm
Message-ID:  <201610091021.u99ALSDM066767@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Sun Oct  9 10:21:28 2016
New Revision: 306900
URL: https://svnweb.freebsd.org/changeset/base/306900

Log:
  iwm: add missing 'Rx errors' counter incrementation.

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Sun Oct  9 04:37:21 2016	(r306899)
+++ head/sys/dev/iwm/if_iwm.c	Sun Oct  9 10:21:28 2016	(r306900)
@@ -2918,14 +2918,14 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
 		device_printf(sc->sc_dev,
 		    "dsp size out of range [0,20]: %d\n",
 		    phy_info->cfg_phy_cnt);
-		return;
+		goto fail;
 	}
 
 	if (!(rx_pkt_status & IWM_RX_MPDU_RES_STATUS_CRC_OK) ||
 	    !(rx_pkt_status & IWM_RX_MPDU_RES_STATUS_OVERRUN_OK)) {
 		IWM_DPRINTF(sc, IWM_DEBUG_RECV,
 		    "Bad CRC or FIFO: 0x%08X.\n", rx_pkt_status);
-		return; /* drop */
+		goto fail;
 	}
 
 	if (sc->sc_capaflags & IWM_UCODE_TLV_FLAGS_RX_ENERGY_API) {
@@ -2947,7 +2947,7 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
 	if (iwm_rx_addbuf(sc, IWM_RBUF_SIZE, sc->rxq.cur) != 0) {
 		device_printf(sc->sc_dev, "%s: unable to add more buffers\n",
 		    __func__);
-		return;
+		goto fail;
 	}
 
 	IWM_DPRINTF(sc, IWM_DEBUG_RECV,
@@ -3020,6 +3020,10 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc,
 		ieee80211_input_mimo_all(ic, m, &rxs);
 	}
 	IWM_LOCK(sc);
+
+	return;
+
+fail:	counter_u64_add(ic->ic_ierrors, 1);
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610091021.u99ALSDM066767>