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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to