Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/wtap/if_wtap.c
Show First 20 Lines • Show All 440 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
wtap_rx_proc(void *arg, int npending) | wtap_rx_proc(void *arg, int npending) | ||||
{ | { | ||||
struct epoch_tracker et; | struct epoch_tracker et; | ||||
struct wtap_softc *sc = (struct wtap_softc *)arg; | struct wtap_softc *sc = (struct wtap_softc *)arg; | ||||
struct ieee80211com *ic = &sc->sc_ic; | struct ieee80211com *ic = &sc->sc_ic; | ||||
struct mbuf *m; | struct mbuf *m; | ||||
struct ieee80211_node *ni; | struct ieee80211_node *ni; | ||||
int type; | |||||
struct wtap_buf *bf; | struct wtap_buf *bf; | ||||
#if 0 | #if 0 | ||||
DWTAP_PRINTF("%s\n", __func__); | DWTAP_PRINTF("%s\n", __func__); | ||||
#endif | #endif | ||||
for(;;) { | for(;;) { | ||||
mtx_lock(&sc->sc_mtx); | mtx_lock(&sc->sc_mtx); | ||||
Show All 24 Lines | #endif | ||||
ni = ieee80211_find_rxnode_withkey(ic, | ni = ieee80211_find_rxnode_withkey(ic, | ||||
mtod(m, const struct ieee80211_frame_min *), | mtod(m, const struct ieee80211_frame_min *), | ||||
IEEE80211_KEYIX_NONE); | IEEE80211_KEYIX_NONE); | ||||
NET_EPOCH_ENTER(et); | NET_EPOCH_ENTER(et); | ||||
if (ni != NULL) { | if (ni != NULL) { | ||||
/* | /* | ||||
* Sending station is known, dispatch directly. | * Sending station is known, dispatch directly. | ||||
*/ | */ | ||||
type = ieee80211_input(ni, m, 1<<7, 10); | ieee80211_input(ni, m, 1<<7, 10); | ||||
ieee80211_free_node(ni); | ieee80211_free_node(ni); | ||||
} else { | } else { | ||||
type = ieee80211_input_all(ic, m, 1<<7, 10); | ieee80211_input_all(ic, m, 1<<7, 10); | ||||
} | } | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
/* The mbufs are freed by the Net80211 stack */ | /* The mbufs are freed by the Net80211 stack */ | ||||
free(bf, M_WTAP_RXBUF); | free(bf, M_WTAP_RXBUF); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |