diff options
Diffstat (limited to 'sys/net80211/ieee80211_sta.c')
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 33f6c27..9a52917 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -66,10 +66,9 @@ __FBSDID("$FreeBSD$"); static void sta_vattach(struct ieee80211vap *); static void sta_beacon_miss(struct ieee80211vap *); static int sta_newstate(struct ieee80211vap *, enum ieee80211_state, int); -static int sta_input(struct ieee80211_node *, struct mbuf *, - int rssi, int noise, uint32_t rstamp); +static int sta_input(struct ieee80211_node *, struct mbuf *, int, int); static void sta_recv_mgmt(struct ieee80211_node *, struct mbuf *, - int subtype, int rssi, int noise, uint32_t rstamp); + int subtype, int rssi, int nf); static void sta_recv_ctl(struct ieee80211_node *, struct mbuf *, int subtype); void @@ -490,8 +489,7 @@ doprint(struct ieee80211vap *vap, int subtype) * by the 802.11 layer. */ static int -sta_input(struct ieee80211_node *ni, struct mbuf *m, - int rssi, int noise, uint32_t rstamp) +sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf) { #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) #define HAS_SEQ(type) ((type & 0x4) == 0) @@ -566,8 +564,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, goto out; } IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); - ni->ni_noise = noise; - ni->ni_rstamp = rstamp; + ni->ni_noise = nf; if (HAS_SEQ(type)) { uint8_t tid = ieee80211_gettid(wh); if (IEEE80211_QOS_HAS_SEQ(wh) && @@ -743,8 +740,8 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, } /* copy to listener after decrypt */ - if (bpf_peers_present(vap->iv_rawbpf)) - bpf_mtap(vap->iv_rawbpf, m); + if (ieee80211_radiotap_active_vap(vap)) + ieee80211_radiotap_tx(vap, m); need_tap = 0; /* @@ -869,7 +866,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, wh = mtod(m, struct ieee80211_frame *); wh->i_fc[1] &= ~IEEE80211_FC1_WEP; } - vap->iv_recv_mgmt(ni, m, subtype, rssi, noise, rstamp); + vap->iv_recv_mgmt(ni, m, subtype, rssi, nf); goto out; case IEEE80211_FC0_TYPE_CTL: @@ -888,8 +885,8 @@ err: ifp->if_ierrors++; out: if (m != NULL) { - if (need_tap && bpf_peers_present(vap->iv_rawbpf)) - bpf_mtap(vap->iv_rawbpf, m); + if (need_tap) + ieee80211_radiotap_rx(vap, m); m_freem(m); } return type; @@ -898,7 +895,7 @@ out: static void sta_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, - int rssi, int noise, uint32_t rstamp, uint16_t seq, uint16_t status) + int rssi, int nf, uint16_t seq, uint16_t status) { struct ieee80211vap *vap = ni->ni_vap; @@ -927,7 +924,7 @@ sta_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, static void sta_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, - uint8_t *frm, uint8_t *efrm, int rssi, int noise, uint32_t rstamp, + uint8_t *frm, uint8_t *efrm, int rssi, int nf, uint16_t seq, uint16_t status) { struct ieee80211vap *vap = ni->ni_vap; @@ -1128,7 +1125,7 @@ startbgscan(struct ieee80211vap *vap) static void sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, - int subtype, int rssi, int noise, uint32_t rstamp) + int subtype, int rssi, int nf) { #define ISPROBE(_st) ((_st) == IEEE80211_FC0_SUBTYPE_PROBE_RESP) #define ISREASSOC(_st) ((_st) == IEEE80211_FC0_SUBTYPE_REASSOC_RESP) @@ -1264,7 +1261,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, */ if (ic->ic_flags & IEEE80211_F_SCAN) { ieee80211_add_scan(vap, &scan, wh, - subtype, rssi, noise, rstamp); + subtype, rssi, nf); } else if (contbgscan(vap)) { ieee80211_bg_scan(vap, 0); } else if (startbgscan(vap)) { @@ -1293,8 +1290,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, ieee80211_probe_curchan(vap, 1); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } - ieee80211_add_scan(vap, &scan, wh, - subtype, rssi, noise, rstamp); + ieee80211_add_scan(vap, &scan, wh, subtype, rssi, nf); return; } break; @@ -1329,11 +1325,10 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, return; } if (algo == IEEE80211_AUTH_ALG_SHARED) - sta_auth_shared(ni, wh, frm + 6, efrm, rssi, - noise, rstamp, seq, status); - else if (algo == IEEE80211_AUTH_ALG_OPEN) - sta_auth_open(ni, wh, rssi, noise, rstamp, + sta_auth_shared(ni, wh, frm + 6, efrm, rssi, nf, seq, status); + else if (algo == IEEE80211_AUTH_ALG_OPEN) + sta_auth_open(ni, wh, rssi, nf, seq, status); else { IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, wh, "auth", "unsupported alg %d", algo); |