From 4623c73135fd0971fc98990b6e21614ede891bfc Mon Sep 17 00:00:00 2001 From: Andriy Voskoboinyk Date: Sun, 9 Oct 2016 10:21:28 +0000 Subject: [PATCH] iwm: add missing 'Rx errors' counter incrementation. --- sys/dev/iwm/if_iwm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index fdb6de1a3111..397b3a85c651 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -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