Lines Matching full:ni

65 static	int wds_input(struct ieee80211_node *ni, struct mbuf *m,
101 wds_flush(struct ieee80211_node *ni) in wds_flush() argument
103 struct ieee80211com *ic = ni->ni_ic; in wds_flush()
108 (void *)(uintptr_t) ieee80211_mac_hash(ic, ni->ni_macaddr)); in wds_flush()
112 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_WDS, ni, in wds_flush()
114 ic->ic_node_getsignal(ni, &rssi, &nf); in wds_flush()
118 ieee80211_input(ni, m, rssi, nf); in wds_flush()
127 struct ieee80211_node *ni, *obss; in ieee80211_create_wds() local
149 ni = ieee80211_find_node_locked(&ic->ic_sta, vap->iv_des_bssid); in ieee80211_create_wds()
150 if (ni == NULL) { in ieee80211_create_wds()
161 } else if (ni->ni_wdsvap != NULL) { in ieee80211_create_wds()
172 ni->ni_wdsvap->iv_ifp->if_xname); in ieee80211_create_wds()
178 obss = vap->iv_update_bss(vap, ni); in ieee80211_create_wds()
179 ni->ni_wdsvap = vap; in ieee80211_create_wds()
197 ni = ieee80211_node_create_wds(vap, vap->iv_des_bssid, chan); in ieee80211_create_wds()
198 if (ni != NULL) { in ieee80211_create_wds()
199 obss = vap->iv_update_bss(vap, ieee80211_ref_node(ni)); in ieee80211_create_wds()
200 ni->ni_flags |= IEEE80211_NODE_AREF; in ieee80211_create_wds()
205 ic->ic_newassoc(ni, 1); in ieee80211_create_wds()
208 vap->iv_auth->ia_node_join(ni); in ieee80211_create_wds()
209 if (ni->ni_authmode != IEEE80211_AUTH_8021X) in ieee80211_create_wds()
210 ieee80211_node_authorize(ni); in ieee80211_create_wds()
212 ieee80211_notify_node_join(ni, 1 /*newassoc*/); in ieee80211_create_wds()
220 if (ni != NULL) in ieee80211_create_wds()
221 wds_flush(ni); in ieee80211_create_wds()
222 return (ni == NULL ? ENOENT : 0); in ieee80211_create_wds()
234 struct ieee80211_node *ni; in ieee80211_dwds_mcast() local
262 ni = ieee80211_find_txnode(vap, eh->ether_dhost); in ieee80211_dwds_mcast()
263 if (ni == NULL) { in ieee80211_dwds_mcast()
270 if (ieee80211_classify(ni, mcopy)) { in ieee80211_dwds_mcast()
278 ieee80211_free_node(ni); in ieee80211_dwds_mcast()
288 mcopy = ieee80211_encap(vap, ni, mcopy); in ieee80211_dwds_mcast()
292 ieee80211_free_node(ni); in ieee80211_dwds_mcast()
297 mcopy->m_pkthdr.rcvif = (void *) ni; in ieee80211_dwds_mcast()
318 ieee80211_dwds_discover(struct ieee80211_node *ni, struct mbuf *m) in ieee80211_dwds_discover() argument
320 struct ieee80211com *ic = ni->ni_ic; in ieee80211_dwds_discover()
332 ieee80211_mac_hash(ic, ni->ni_macaddr); in ieee80211_dwds_discover()
334 ((ni->ni_intval * ic->ic_lintval) << 2) / 1024); in ieee80211_dwds_discover()
335 ieee80211_notify_wds_discover(ni); in ieee80211_dwds_discover()
407 wds_input(struct ieee80211_node *ni, struct mbuf *m, in wds_input() argument
410 struct ieee80211vap *vap = ni->ni_vap; in wds_input()
411 struct ieee80211com *ic = ni->ni_ic; in wds_input()
446 KASSERT(ni != NULL, ("null node")); in wds_input()
452 ni->ni_macaddr, NULL, in wds_input()
466 ni->ni_inact = ni->ni_inact_reload; in wds_input()
470 ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", in wds_input()
483 IEEE80211_MSG_ANY, ni->ni_macaddr, NULL, in wds_input()
497 IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); in wds_input()
498 ni->ni_noise = nf; in wds_input()
504 if (! ieee80211_check_rxseq(ni, wh, wh->i_addr1, rxs)) in wds_input()
513 ni->ni_macaddr, NULL, in wds_input()
540 ieee80211_ampdu_reorder(ni, m, rxs) != 0) { in wds_input()
562 IEEE80211_NODE_STAT(ni, rx_noprivacy); in wds_input()
565 if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { in wds_input()
567 IEEE80211_NODE_STAT(ni, rx_wepfail); in wds_input()
590 m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); in wds_input()
603 ni->ni_macaddr, "data", "%s", "demic error"); in wds_input()
605 IEEE80211_NODE_STAT(ni, rx_demicfail); in wds_input()
625 ni->ni_macaddr, "data", "%s", "decap error"); in wds_input()
627 IEEE80211_NODE_STAT(ni, rx_decap); in wds_input()
634 if (!ieee80211_node_is_authorized(ni)) { in wds_input()
646 ni->ni_macaddr, "data", "unauthorized or " in wds_input()
651 IEEE80211_NODE_STAT(ni, rx_unauth); in wds_input()
668 IEEE80211_NODE_STAT(ni, rx_unencrypted); in wds_input()
674 m = ieee80211_decap_amsdu(ni, m); in wds_input()
679 m = ieee80211_decap_fastframe(vap, ni, m); in wds_input()
684 ieee80211_deliver_data(vap, ni, m); in wds_input()
689 IEEE80211_NODE_STAT(ni, rx_mgmt); in wds_input()
698 ni->ni_macaddr, "mgt", "too short: len %u", in wds_input()
716 vap->iv_recv_mgmt(ni, m, subtype, rxs, rssi, nf); in wds_input()
721 IEEE80211_NODE_STAT(ni, rx_ctrl); in wds_input()
742 wds_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, in wds_recv_mgmt() argument
745 struct ieee80211vap *vap = ni->ni_vap; in wds_recv_mgmt()
746 struct ieee80211com *ic = ni->ni_ic; in wds_recv_mgmt()
756 if (ni == vap->iv_bss) { in wds_recv_mgmt()
771 if (ieee80211_parse_action(ni, m0) == 0) in wds_recv_mgmt()
772 (void)ic->ic_recv_action(ni, wh, frm, efrm); in wds_recv_mgmt()