freebsd11_network: Enable previously-disabled uses of counter(9).
Tested and verified this doesn't break anything.
This commit is contained in:
@@ -2036,10 +2036,7 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc,
|
||||
fail2: m_freem(m);
|
||||
|
||||
fail1:
|
||||
return;
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -3016,18 +3016,14 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
|
||||
if ((flags & IWN_RX_NOERROR) != IWN_RX_NOERROR) {
|
||||
DPRINTF(sc, IWN_DEBUG_RECV, "%s: RX flags error %x\n",
|
||||
__func__, flags);
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
/* Discard frames that are too short. */
|
||||
if (len < sizeof (struct ieee80211_frame_ack)) {
|
||||
DPRINTF(sc, IWN_DEBUG_RECV, "%s: frame too short: %d\n",
|
||||
__func__, len);
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3035,9 +3031,7 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
|
||||
if (m1 == NULL) {
|
||||
DPRINTF(sc, IWN_DEBUG_ANY, "%s: no mbuf to restock ring\n",
|
||||
__func__);
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
bus_dmamap_unload(ring->data_dmat, data->map);
|
||||
@@ -3062,9 +3056,7 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
|
||||
ring->desc[ring->cur] = htole32(paddr >> 8);
|
||||
bus_dmamap_sync(ring->desc_dma.tag, ring->desc_dma.map,
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_add(ic->ic_ierrors, 1);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -311,10 +311,8 @@ ieee80211_ifattach(struct ieee80211com *ic)
|
||||
taskqueue_thread_enqueue, &ic->ic_tq);
|
||||
taskqueue_start_threads(&ic->ic_tq, 1, PI_NET, "%s net80211 taskq",
|
||||
ic->ic_name);
|
||||
#ifndef __HAIKU__
|
||||
ic->ic_ierrors = counter_u64_alloc(M_WAITOK);
|
||||
ic->ic_oerrors = counter_u64_alloc(M_WAITOK);
|
||||
#endif
|
||||
/*
|
||||
* Fill in 802.11 available channel set, mark all
|
||||
* available channels as active, and pick a default
|
||||
@@ -395,10 +393,8 @@ ieee80211_ifdetach(struct ieee80211com *ic)
|
||||
ieee80211_power_detach(ic);
|
||||
ieee80211_node_detach(ic);
|
||||
|
||||
#ifndef __HAIKU__
|
||||
counter_u64_free(ic->ic_ierrors);
|
||||
counter_u64_free(ic->ic_oerrors);
|
||||
#endif
|
||||
|
||||
taskqueue_free(ic->ic_tq);
|
||||
IEEE80211_TX_LOCK_DESTROY(ic);
|
||||
@@ -457,14 +453,12 @@ ieee80211_get_counter(struct ifnet *ifp, ift_counter cnt)
|
||||
|
||||
rv = if_get_counter_default(ifp, cnt);
|
||||
switch (cnt) {
|
||||
#ifndef __HAIKU__
|
||||
case IFCOUNTER_OERRORS:
|
||||
rv += counter_u64_fetch(ic->ic_oerrors);
|
||||
break;
|
||||
case IFCOUNTER_IERRORS:
|
||||
rv += counter_u64_fetch(ic->ic_ierrors);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user