diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-01-30 10:28:01 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-01-30 10:28:01 +0000 |
| commit | b65f813c1ab99448278961c5ca80dc422b1eae29 (patch) | |
| tree | e9d3fc16d93a1cb5b2c696d2422cf4d78ae0199c /sys/dev/wtap | |
| parent | 21c4082de9e2cf9a0fd81a9a981ab06022956847 (diff) | |
Notes
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); } |
