Lines Matching full:ni

187 sta_authretry(struct ieee80211vap *vap, struct ieee80211_node *ni, int reason)  in sta_authretry()  argument
197 IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_AUTH, 1); in sta_authretry()
233 struct ieee80211_node *ni; in sta_newstate() local
246 ni = vap->iv_bss; /* NB: no reference held */ in sta_newstate()
256 IEEE80211_SEND_MGMT(ni, in sta_newstate()
259 ieee80211_sta_leave(ni); in sta_newstate()
262 IEEE80211_SEND_MGMT(ni, in sta_newstate()
332 ieee80211_sta_leave(ni); in sta_newstate()
344 IEEE80211_SEND_MGMT(ni, in sta_newstate()
352 IEEE80211_SEND_MGMT(ni, in sta_newstate()
356 sta_authretry(vap, ni, arg>>8); in sta_newstate()
364 IEEE80211_SEND_MGMT(ni, in sta_newstate()
369 ieee80211_sta_leave(ni); in sta_newstate()
372 IEEE80211_SEND_MGMT(ni, in sta_newstate()
386 IEEE80211_SEND_MGMT(ni, in sta_newstate()
391 ieee80211_sta_leave(ni); in sta_newstate()
393 IEEE80211_SEND_MGMT(ni, arg ? in sta_newstate()
417 ether_sprintf(ni->ni_bssid)); in sta_newstate()
419 ni->ni_esslen); in sta_newstate()
423 IEEE80211_RATE2MBS(ni->ni_txrate)); in sta_newstate()
426 ieee80211_scan_assoc_success(vap, ni->ni_macaddr); in sta_newstate()
427 ieee80211_notify_node_join(ni, in sta_newstate()
444 if (ni->ni_authmode != IEEE80211_AUTH_8021X) in sta_newstate()
445 ieee80211_node_authorize(ni); in sta_newstate()
536 sta_input(struct ieee80211_node *ni, struct mbuf *m, in sta_input() argument
539 struct ieee80211vap *vap = ni->ni_vap; in sta_input()
540 struct ieee80211com *ic = ni->ni_ic; in sta_input()
551 KASSERT(ni != NULL, ("%s: null node, mbuf %p", __func__, m)); in sta_input()
566 ni->ni_macaddr, NULL, in sta_input()
573 ni->ni_macaddr, NULL, "wrong version, fc %02x:%02x", in sta_input()
603 ni->ni_inact = ni->ni_inact_reload; in sta_input()
617 if (!IEEE80211_ADDR_EQ(bssid, ni->ni_bssid)) { in sta_input()
648 IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi); in sta_input()
649 ni->ni_noise = nf; in sta_input()
656 if (! ieee80211_check_rxseq(ni, wh, bssid, rxs)) in sta_input()
667 ni->ni_macaddr, NULL, in sta_input()
681 ieee80211_ampdu_reorder(ni, m, rxs) != 0) { in sta_input()
773 IEEE80211_NODE_STAT(ni, rx_noprivacy); in sta_input()
776 if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { in sta_input()
778 IEEE80211_NODE_STAT(ni, rx_wepfail); in sta_input()
801 m = ieee80211_defrag(ni, m, hdrspace, has_decrypted); in sta_input()
819 ni->ni_macaddr, "data", "%s", "demic error"); in sta_input()
821 IEEE80211_NODE_STAT(ni, rx_demicfail); in sta_input()
841 ni->ni_macaddr, "data", "%s", "decap error"); in sta_input()
843 IEEE80211_NODE_STAT(ni, rx_decap); in sta_input()
850 if (!ieee80211_node_is_authorized(ni)) { in sta_input()
862 ni->ni_macaddr, "data", "unauthorized or " in sta_input()
867 IEEE80211_NODE_STAT(ni, rx_unauth); in sta_input()
884 IEEE80211_NODE_STAT(ni, rx_unencrypted); in sta_input()
890 m = ieee80211_decap_amsdu(ni, m); in sta_input()
895 m = ieee80211_decap_fastframe(vap, ni, m); in sta_input()
900 ieee80211_deliver_data(vap, ni, m); in sta_input()
905 IEEE80211_NODE_STAT(ni, rx_mgmt); in sta_input()
914 ni->ni_macaddr, "mgt", "too short: len %u", in sta_input()
964 if (ieee80211_crypto_decap(ni, m, hdrspace, &key) == 0) { in sta_input()
972 vap->iv_recv_mgmt(ni, m, subtype, rxs, rssi, nf); in sta_input()
977 IEEE80211_NODE_STAT(ni, rx_ctrl); in sta_input()
978 vap->iv_recv_ctl(ni, m, subtype); in sta_input()
999 sta_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, in sta_auth_open() argument
1002 struct ieee80211vap *vap = ni->ni_vap; in sta_auth_open()
1004 if (ni->ni_authmode == IEEE80211_AUTH_SHARED) { in sta_auth_open()
1006 ni->ni_macaddr, "open auth", in sta_auth_open()
1007 "bad sta auth mode %u", ni->ni_authmode); in sta_auth_open()
1018 ni, "open auth failed (reason %d)", status); in sta_auth_open()
1028 sta_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, in sta_auth_shared() argument
1032 struct ieee80211vap *vap = ni->ni_vap; in sta_auth_shared()
1045 ni->ni_macaddr, "shared key auth", in sta_auth_shared()
1054 if (ni->ni_authmode != IEEE80211_AUTH_AUTO && in sta_auth_shared()
1055 ni->ni_authmode != IEEE80211_AUTH_SHARED) { in sta_auth_shared()
1057 ni->ni_macaddr, "shared key auth", in sta_auth_shared()
1058 "bad sta auth mode %u", ni->ni_authmode); in sta_auth_shared()
1067 ni->ni_macaddr, "shared key auth", in sta_auth_shared()
1082 ni->ni_macaddr, "shared key auth", in sta_auth_shared()
1089 ni->ni_macaddr, "shared key auth", in sta_auth_shared()
1101 if (ni->ni_challenge != NULL) { in sta_auth_shared()
1102 IEEE80211_FREE(ni->ni_challenge, M_80211_NODE); in sta_auth_shared()
1103 ni->ni_challenge = NULL; in sta_auth_shared()
1116 if (!ieee80211_alloc_challenge(ni)) in sta_auth_shared()
1119 memcpy(ni->ni_challenge, &challenge[2], challenge[1]); in sta_auth_shared()
1120 IEEE80211_SEND_MGMT(ni, in sta_auth_shared()
1148 struct ieee80211_node *ni) in ieee80211_parse_wmeie() argument
1152 ni->ni_uapsd = 0; in ieee80211_parse_wmeie()
1155 IEEE80211_DISCARD_IE(ni->ni_vap, in ieee80211_parse_wmeie()
1161 ni->ni_uapsd = frm[WME_CAPINFO_IE_OFFSET]; in ieee80211_parse_wmeie()
1163 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_POWER | IEEE80211_MSG_ASSOC, in ieee80211_parse_wmeie()
1164 ni, "U-APSD settings from STA: 0x%02x", ni->ni_uapsd); in ieee80211_parse_wmeie()
1394 sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, in sta_recv_mgmt() argument
1399 struct ieee80211vap *vap = ni->ni_vap; in sta_recv_mgmt()
1400 struct ieee80211com *ic = ni->ni_ic; in sta_recv_mgmt()
1425 if (!((ic->ic_flags & IEEE80211_F_SCAN) || ni->ni_associd)) { in sta_recv_mgmt()
1438 if (ieee80211_parse_beacon(ni, m0, rxchan, &scan) != 0) { in sta_recv_mgmt()
1449 IEEE80211_NODE_STAT(ni, rx_beacons); in sta_recv_mgmt()
1451 IEEE80211_NODE_STAT(ni, rx_proberesp); in sta_recv_mgmt()
1457 if (ni->ni_associd != 0 && in sta_recv_mgmt()
1459 IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid))) { in sta_recv_mgmt()
1461 memcpy(ni->ni_tstamp.data, scan.tstamp, in sta_recv_mgmt()
1462 sizeof(ni->ni_tstamp)); in sta_recv_mgmt()
1466 if (ni->ni_erp != scan.erp) { in sta_recv_mgmt()
1470 ni->ni_erp, scan.erp); in sta_recv_mgmt()
1472 (ni->ni_erp & IEEE80211_ERP_USE_PROTECTION)) in sta_recv_mgmt()
1476 ni->ni_erp = scan.erp; in sta_recv_mgmt()
1481 if ((ni->ni_capinfo ^ scan.capinfo) & IEEE80211_CAPINFO_SHORT_SLOTTIME) { in sta_recv_mgmt()
1485 ni->ni_capinfo, scan.capinfo); in sta_recv_mgmt()
1493 ni->ni_capinfo = (ni->ni_capinfo &~ IEEE80211_CAPINFO_SHORT_SLOTTIME) in sta_recv_mgmt()
1498 (ni->ni_flags & IEEE80211_NODE_QOS)) { in sta_recv_mgmt()
1503 ni->ni_flags |= in sta_recv_mgmt()
1509 ni->ni_flags &= ~IEEE80211_NODE_UAPSD; in sta_recv_mgmt()
1512 ieee80211_parse_athparams(ni, scan.ath, wh); in sta_recv_mgmt()
1517 ieee80211_ht_updateparams(ni, in sta_recv_mgmt()
1524 ieee80211_vht_updateparams(ni, in sta_recv_mgmt()
1529 if (ieee80211_ht_updateparams_final(ni, in sta_recv_mgmt()
1543 ic->ic_set_quiet(ni, scan.quiet); in sta_recv_mgmt()
1544 ni->ni_quiet_ie_set = 1; in sta_recv_mgmt()
1545 memcpy(&ni->ni_quiet_ie, scan.quiet, in sta_recv_mgmt()
1548 if (ni->ni_quiet_ie_set == 1) in sta_recv_mgmt()
1549 ic->ic_set_quiet(ni, NULL); in sta_recv_mgmt()
1550 ni->ni_quiet_ie_set = 0; in sta_recv_mgmt()
1551 bzero(&ni->ni_quiet_ie, in sta_recv_mgmt()
1563 int aid = IEEE80211_AID(ni->ni_associd); in sta_recv_mgmt()
1618 ni->ni_dtim_count = tim->tim_count; in sta_recv_mgmt()
1619 ni->ni_dtim_period = tim->tim_period; in sta_recv_mgmt()
1724 ieee80211_send_error(ni, wh->i_addr2, in sta_recv_mgmt()
1731 sta_auth_shared(ni, wh, frm + 6, efrm, rssi, nf, in sta_recv_mgmt()
1734 sta_auth_open(ni, wh, rssi, nf, seq, status); in sta_recv_mgmt()
1766 ni = vap->iv_bss; in sta_recv_mgmt()
1830 rate = ieee80211_setup_rates(ni, rates, xrates, in sta_recv_mgmt()
1845 ni->ni_capinfo = capinfo; in sta_recv_mgmt()
1846 ni->ni_associd = associd; in sta_recv_mgmt()
1847 if (ni->ni_jointime == 0) in sta_recv_mgmt()
1848 ni->ni_jointime = time_uptime; in sta_recv_mgmt()
1851 ni->ni_flags |= IEEE80211_NODE_QOS; in sta_recv_mgmt()
1854 ni->ni_flags &= ~IEEE80211_NODE_QOS; in sta_recv_mgmt()
1864 ieee80211_ht_node_init(ni); in sta_recv_mgmt()
1865 ieee80211_ht_updateparams(ni, htcap, htinfo); in sta_recv_mgmt()
1873 if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) { in sta_recv_mgmt()
1876 ni->ni_macaddr, in sta_recv_mgmt()
1879 ieee80211_vht_node_init(ni); in sta_recv_mgmt()
1880 ieee80211_vht_updateparams(ni, vhtcap, vhtopmode); in sta_recv_mgmt()
1881 ieee80211_setup_vht_rates(ni, vhtcap, vhtopmode); in sta_recv_mgmt()
1885 ieee80211_ht_updateparams_final(ni, htcap, htinfo); in sta_recv_mgmt()
1886 ieee80211_setup_htrates(ni, htcap, in sta_recv_mgmt()
1888 ieee80211_setup_basic_htrates(ni, htinfo); in sta_recv_mgmt()
1890 ieee80211_node_setuptxparms(ni); in sta_recv_mgmt()
1891 ieee80211_ratectl_node_init(ni); in sta_recv_mgmt()
1899 ieee80211_ff_node_init(ni); in sta_recv_mgmt()
1908 (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE)) { in sta_recv_mgmt()
1917 (ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME)); in sta_recv_mgmt()
1925 (ni->ni_erp & IEEE80211_ERP_USE_PROTECTION)) in sta_recv_mgmt()
1934 IEEE80211_NODE_AID(ni), in sta_recv_mgmt()
1938 ni->ni_flags & IEEE80211_NODE_QOS ? ", QoS" : "", in sta_recv_mgmt()
1939 ni->ni_flags & IEEE80211_NODE_HT ? in sta_recv_mgmt()
1940 (ni->ni_chw == IEEE80211_STA_RX_BW_40 ? ", HT40" : ", HT20") : "", in sta_recv_mgmt()
1941 ni->ni_flags & IEEE80211_NODE_AMPDU ? " (+AMPDU)" : "", in sta_recv_mgmt()
1942 ni->ni_flags & IEEE80211_NODE_AMSDU ? " (+AMSDU)" : "", in sta_recv_mgmt()
1943 ni->ni_flags & IEEE80211_NODE_MIMO_RTS ? " (+SMPS-DYN)" : in sta_recv_mgmt()
1944 ni->ni_flags & IEEE80211_NODE_MIMO_PS ? " (+SMPS)" : "", in sta_recv_mgmt()
1945 ni->ni_flags & IEEE80211_NODE_RIFS ? " (+RIFS)" : "", in sta_recv_mgmt()
1946 IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) ? in sta_recv_mgmt()
1948 IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_TURBOP) ? in sta_recv_mgmt()
1977 IEEE80211_NODE_STAT(ni, rx_deauth); in sta_recv_mgmt()
1979 IEEE80211_NOTE(vap, IEEE80211_MSG_AUTH, ni, in sta_recv_mgmt()
2011 IEEE80211_NODE_STAT(ni, rx_disassoc); in sta_recv_mgmt()
2013 IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni, in sta_recv_mgmt()
2033 if (ieee80211_parse_action(ni, m0) == 0) in sta_recv_mgmt()
2034 (void)ic->ic_recv_action(ni, wh, frm, efrm); in sta_recv_mgmt()
2058 sta_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype) in sta_recv_ctl() argument
2062 ieee80211_recv_bar(ni, m); in sta_recv_ctl()