diff options
Diffstat (limited to 'sys/dev/wtap')
| -rw-r--r-- | sys/dev/wtap/if_wtap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c index fe0a610c6058..3244c67213d8 100644 --- a/sys/dev/wtap/if_wtap.c +++ b/sys/dev/wtap/if_wtap.c @@ -451,6 +451,7 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) void wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m) { + struct epoch_tracker et; struct ieee80211com *ic = &sc->sc_ic; struct ieee80211_node *ni; int type; @@ -472,6 +473,7 @@ wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m) */ ni = ieee80211_find_rxnode_withkey(ic, mtod(m, const struct ieee80211_frame_min *),IEEE80211_KEYIX_NONE); + NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Sending station is known, dispatch directly. @@ -481,11 +483,13 @@ wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m) } else { type = ieee80211_input_all(ic, m, 1<<7, 10); } + NET_EPOCH_EXIT(et); } static void wtap_rx_proc(void *arg, int npending) { + struct epoch_tracker et; struct wtap_softc *sc = (struct wtap_softc *)arg; struct ieee80211com *ic = &sc->sc_ic; struct mbuf *m; @@ -526,6 +530,7 @@ wtap_rx_proc(void *arg, int npending) ni = ieee80211_find_rxnode_withkey(ic, mtod(m, const struct ieee80211_frame_min *), IEEE80211_KEYIX_NONE); + NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Sending station is known, dispatch directly. @@ -535,7 +540,8 @@ wtap_rx_proc(void *arg, int npending) } else { type = ieee80211_input_all(ic, m, 1<<7, 10); } - + NET_EPOCH_EXIT(et); + /* The mbufs are freed by the Net80211 stack */ free(bf, M_WTAP_RXBUF); } |
