Lines Matching +full:rx +full:- +full:input +full:- +full:m

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
63 ieee80211_process_mimo(struct ieee80211_node *ni, struct ieee80211_rx_stats *rx) in ieee80211_process_mimo() argument
68 if ((rx->r_flags & (IEEE80211_R_C_CHAIN | IEEE80211_R_C_NF | IEEE80211_R_C_RSSI)) != in ieee80211_process_mimo()
73 for (i = 0; i < MIN(rx->c_chain, IEEE80211_MAX_CHAINS); i++) { in ieee80211_process_mimo()
74 IEEE80211_RSSI_LPF(ni->ni_mimo_rssi_ctl[i], rx->c_rssi_ctl[i]); in ieee80211_process_mimo()
75 IEEE80211_RSSI_LPF(ni->ni_mimo_rssi_ext[i], rx->c_rssi_ext[i]); in ieee80211_process_mimo()
79 for(i = 0; i < MIN(rx->c_chain, IEEE80211_MAX_CHAINS); i++) { in ieee80211_process_mimo()
80 ni->ni_mimo_noise_ctl[i] = rx->c_nf_ctl[i]; in ieee80211_process_mimo()
81 ni->ni_mimo_noise_ext[i] = rx->c_nf_ext[i]; in ieee80211_process_mimo()
83 ni->ni_mimo_chains = rx->c_chain; in ieee80211_process_mimo()
87 ieee80211_input_mimo(struct ieee80211_node *ni, struct mbuf *m) in ieee80211_input_mimo() argument
93 if (ieee80211_get_rx_params(m, &rxs) != 0) in ieee80211_input_mimo()
94 return (-1); in ieee80211_input_mimo()
99 //return ieee80211_input(ni, m, rx->rssi, rx->nf); in ieee80211_input_mimo()
100 return ni->ni_vap->iv_input(ni, m, &rxs, rxs.c_rssi, rxs.c_nf); in ieee80211_input_mimo()
104 ieee80211_input_all(struct ieee80211com *ic, struct mbuf *m, int rssi, int nf) in ieee80211_input_all() argument
106 struct ieee80211_rx_stats rx; in ieee80211_input_all() local
108 rx.r_flags = IEEE80211_R_NF | IEEE80211_R_RSSI; in ieee80211_input_all()
109 rx.c_nf = nf; in ieee80211_input_all()
110 rx.c_rssi = rssi; in ieee80211_input_all()
112 if (!ieee80211_add_rx_params(m, &rx)) in ieee80211_input_all()
113 return (-1); in ieee80211_input_all()
115 return ieee80211_input_mimo_all(ic, m); in ieee80211_input_all()
119 ieee80211_input_mimo_all(struct ieee80211com *ic, struct mbuf *m) in ieee80211_input_mimo_all() argument
122 int type = -1; in ieee80211_input_mimo_all()
124 m->m_flags |= M_BCAST; /* NB: mark for bpf tap'ing */ in ieee80211_input_mimo_all()
127 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { in ieee80211_input_mimo_all()
132 if (vap->iv_state == IEEE80211_S_INIT) in ieee80211_input_mimo_all()
138 * to--so don't spam them with mcast frames. in ieee80211_input_mimo_all()
140 if (vap->iv_opmode == IEEE80211_M_WDS) in ieee80211_input_mimo_all()
148 mcopy = m_dup(m, IEEE80211_M_NOWAIT); in ieee80211_input_mimo_all()
154 mcopy = m; in ieee80211_input_mimo_all()
155 m = NULL; in ieee80211_input_mimo_all()
157 ni = ieee80211_ref_node(vap->iv_bss); in ieee80211_input_mimo_all()
161 if (m != NULL) /* no vaps, reclaim mbuf */ in ieee80211_input_mimo_all()
162 m_freem(m); in ieee80211_input_mimo_all()
169 * XXX should handle 3 concurrent reassemblies per-spec.
172 ieee80211_defrag(struct ieee80211_node *ni, struct mbuf *m, int hdrspace, in ieee80211_defrag() argument
175 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_defrag()
176 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); in ieee80211_defrag()
180 uint8_t more_frag = wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG; in ieee80211_defrag()
183 KASSERT(!IEEE80211_IS_MULTICAST(wh->i_addr1), ("multicast fragm?")); in ieee80211_defrag()
185 rxseq = le16toh(*(uint16_t *)wh->i_seq); in ieee80211_defrag()
189 if (!more_frag && fragno == 0 && ni->ni_rxfrag[0] == NULL) in ieee80211_defrag()
190 return m; in ieee80211_defrag()
193 /* XXX use a non-packet altering storage for this in the future. */ in ieee80211_defrag()
195 wh->i_fc[1] |= IEEE80211_FC1_PROTECTED; in ieee80211_defrag()
200 if (ni->ni_table == NULL) { in ieee80211_defrag()
203 * the table) then input packets should not reach here. in ieee80211_defrag()
210 m_freem(m); in ieee80211_defrag()
213 IEEE80211_NODE_LOCK(ni->ni_table); in ieee80211_defrag()
214 mfrag = ni->ni_rxfrag[0]; in ieee80211_defrag()
215 ni->ni_rxfrag[0] = NULL; in ieee80211_defrag()
216 IEEE80211_NODE_UNLOCK(ni->ni_table); in ieee80211_defrag()
226 last_rxseq = le16toh(*(uint16_t *)lwh->i_seq); in ieee80211_defrag()
232 IEEE80211_ADDR_EQ(wh->i_addr1, lwh->i_addr1) && in ieee80211_defrag()
233 IEEE80211_ADDR_EQ(wh->i_addr2, lwh->i_addr2) && in ieee80211_defrag()
234 !((wh->i_fc[1] ^ lwh->i_fc[1]) & IEEE80211_FC1_PROTECTED)) { in ieee80211_defrag()
237 *(uint16_t *) lwh->i_seq = *(uint16_t *) wh->i_seq; in ieee80211_defrag()
239 m_adj(m, hdrspace); /* strip header */ in ieee80211_defrag()
240 m_catpkt(mfrag, m); /* concatenate */ in ieee80211_defrag()
253 vap->iv_stats.is_rx_defrag++; in ieee80211_defrag()
255 m_freem(m); in ieee80211_defrag()
258 mfrag = m; in ieee80211_defrag()
261 ni->ni_rxfragstamp = ticks; in ieee80211_defrag()
262 ni->ni_rxfrag[0] = mfrag; in ieee80211_defrag()
268 wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; in ieee80211_defrag()
275 struct ieee80211_node *ni, struct mbuf *m) in ieee80211_deliver_data() argument
278 struct ether_header *eh = mtod(m, struct ether_header *); in ieee80211_deliver_data()
279 struct ifnet *ifp = vap->iv_ifp; in ieee80211_deliver_data()
282 m->m_flags &= ~(M_MCAST | M_BCAST); in ieee80211_deliver_data()
283 m_clrprotoflags(m); in ieee80211_deliver_data()
286 KASSERT(vap->iv_opmode != IEEE80211_M_HOSTAP, ("gack, hostap")); in ieee80211_deliver_data()
292 IEEE80211_NODE_STAT_ADD(ni, rx_bytes, m->m_pkthdr.len); in ieee80211_deliver_data()
293 if (ETHER_IS_MULTICAST(eh->ether_dhost)) { in ieee80211_deliver_data()
294 if (ETHER_IS_BROADCAST(eh->ether_dhost)) in ieee80211_deliver_data()
295 m->m_flags |= M_BCAST; in ieee80211_deliver_data()
297 m->m_flags |= M_MCAST; in ieee80211_deliver_data()
301 m->m_pkthdr.rcvif = ifp; in ieee80211_deliver_data()
303 if (ni->ni_vlan != 0) { in ieee80211_deliver_data()
305 m->m_pkthdr.ether_vtag = ni->ni_vlan; in ieee80211_deliver_data()
306 m->m_flags |= M_VLANTAG; in ieee80211_deliver_data()
309 ifp->if_input(ifp, m); in ieee80211_deliver_data()
314 ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen, in ieee80211_decap() argument
324 if (m->m_len < hdrlen + sizeof(*llc) && in ieee80211_decap()
325 (m = m_pullup(m, hdrlen + sizeof(*llc))) == NULL) { in ieee80211_decap()
326 vap->iv_stats.is_rx_tooshort++; in ieee80211_decap()
330 memcpy(&wh, mtod(m, caddr_t), hdrlen); in ieee80211_decap()
331 llc = (struct llc *)(mtod(m, caddr_t) + hdrlen); in ieee80211_decap()
332 if (llc->llc_dsap == LLC_SNAP_LSAP && llc->llc_ssap == LLC_SNAP_LSAP && in ieee80211_decap()
333 llc->llc_control == LLC_UI && llc->llc_snap.org_code[0] == 0 && in ieee80211_decap()
334 llc->llc_snap.org_code[1] == 0 && llc->llc_snap.org_code[2] == 0 && in ieee80211_decap()
336 !(llc->llc_snap.ether_type == htons(ETHERTYPE_AARP) || in ieee80211_decap()
337 llc->llc_snap.ether_type == htons(ETHERTYPE_IPX)) && in ieee80211_decap()
338 /* Do not want to touch A-MSDU frames. */ in ieee80211_decap()
340 m_adj(m, hdrlen + sizeof(struct llc) - sizeof(*eh)); in ieee80211_decap()
343 m_adj(m, hdrlen - sizeof(*eh)); in ieee80211_decap()
345 eh = mtod(m, struct ether_header *); in ieee80211_decap()
348 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1); in ieee80211_decap()
349 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr2); in ieee80211_decap()
352 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr3); in ieee80211_decap()
353 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr2); in ieee80211_decap()
356 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1); in ieee80211_decap()
357 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr3); in ieee80211_decap()
360 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr3); in ieee80211_decap()
361 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr4); in ieee80211_decap()
365 if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { in ieee80211_decap()
366 m = ieee80211_realign(vap, m, sizeof(*eh)); in ieee80211_decap()
367 if (m == NULL) in ieee80211_decap()
372 eh = mtod(m, struct ether_header *); in ieee80211_decap()
373 eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh)); in ieee80211_decap()
375 return m; in ieee80211_decap()
379 * Decap a frame encapsulated in a fast-frame/A-MSDU.
382 ieee80211_decap1(struct mbuf *m, int *framelen) in ieee80211_decap1() argument
400 if (m->m_len < FF_LLC_SIZE && (m = m_pullup(m, FF_LLC_SIZE)) == NULL) in ieee80211_decap1()
402 eh = mtod(m, struct ether_header *); /* 802.3 header is first */ in ieee80211_decap1()
406 * as an A-MSDU frame due to an adversary setting the A-MSDU present in ieee80211_decap1()
409 if (memcmp(eh->ether_dhost, llc_hdr_mac, ETHER_ADDR_LEN) == 0) in ieee80211_decap1()
413 *framelen = ntohs(eh->ether_type) /* encap'd frame size */ in ieee80211_decap1()
414 + sizeof(struct ether_header) - sizeof(struct llc); in ieee80211_decap1()
415 eh->ether_type = llc->llc_un.type_snap.ether_type; in ieee80211_decap1()
416 ovbcopy(eh, mtod(m, uint8_t *) + sizeof(struct llc), in ieee80211_decap1()
418 m_adj(m, sizeof(struct llc)); in ieee80211_decap1()
419 return m; in ieee80211_decap1()
430 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_setup_rates()
431 struct ieee80211_rateset *rs = &ni->ni_rates; in ieee80211_setup_rates()
434 rs->rs_nrates = rates[1]; in ieee80211_setup_rates()
435 memcpy(rs->rs_rates, rates + 2, rs->rs_nrates); in ieee80211_setup_rates()
442 if (rs->rs_nrates + nxrates > IEEE80211_RATE_MAXSIZE) { in ieee80211_setup_rates()
443 nxrates = IEEE80211_RATE_MAXSIZE - rs->rs_nrates; in ieee80211_setup_rates()
447 vap->iv_stats.is_rx_rstoobig++; in ieee80211_setup_rates()
449 memcpy(rs->rs_rates + rs->rs_nrates, xrates+2, nxrates); in ieee80211_setup_rates()
450 rs->rs_nrates += nxrates; in ieee80211_setup_rates()
466 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_send_error()
469 if (ni == vap->iv_bss) { in ieee80211_send_error()
470 if (vap->iv_state != IEEE80211_S_RUN) { in ieee80211_send_error()
475 * case iv_bss->ni_chan will not be setup. in ieee80211_send_error()
497 if (ni->ni_challenge == NULL) in ieee80211_alloc_challenge()
498 ni->ni_challenge = (uint32_t *) in ieee80211_alloc_challenge()
501 if (ni->ni_challenge == NULL) { in ieee80211_alloc_challenge()
502 IEEE80211_NOTE(ni->ni_vap, in ieee80211_alloc_challenge()
507 return (ni->ni_challenge != NULL); in ieee80211_alloc_challenge()
518 ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m, in ieee80211_parse_beacon() argument
521 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_parse_beacon()
522 struct ieee80211com *ic = ni->ni_ic; in ieee80211_parse_beacon()
526 wh = mtod(m, struct ieee80211_frame *); in ieee80211_parse_beacon()
528 efrm = mtod(m, uint8_t *) + m->m_len; in ieee80211_parse_beacon()
529 scan->status = 0; in ieee80211_parse_beacon()
533 * XXX Update from 802.11-2012 - eg where HT is in ieee80211_parse_beacon()
554 IEEE80211_VERIFY_LENGTH(efrm - frm, 12, in ieee80211_parse_beacon()
555 return (scan->status = IEEE80211_BPARSE_BADIELEN)); in ieee80211_parse_beacon()
557 scan->tstamp = frm; frm += 8; in ieee80211_parse_beacon()
558 scan->bintval = le16toh(*(uint16_t *)frm); frm += 2; in ieee80211_parse_beacon()
559 scan->capinfo = le16toh(*(uint16_t *)frm); frm += 2; in ieee80211_parse_beacon()
560 scan->bchan = ieee80211_chan2ieee(ic, rxchan); in ieee80211_parse_beacon()
561 scan->chan = scan->bchan; in ieee80211_parse_beacon()
562 scan->ies = frm; in ieee80211_parse_beacon()
563 scan->ies_len = efrm - frm; in ieee80211_parse_beacon()
565 while (efrm - frm > 1) { in ieee80211_parse_beacon()
566 IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, in ieee80211_parse_beacon()
567 return (scan->status = IEEE80211_BPARSE_BADIELEN)); in ieee80211_parse_beacon()
570 scan->ssid = frm; in ieee80211_parse_beacon()
573 scan->rates = frm; in ieee80211_parse_beacon()
576 scan->country = frm; in ieee80211_parse_beacon()
579 scan->csa = frm; in ieee80211_parse_beacon()
582 scan->quiet = frm; in ieee80211_parse_beacon()
585 if (ic->ic_phytype == IEEE80211_T_FH) { in ieee80211_parse_beacon()
586 scan->fhdwell = le16dec(&frm[2]); in ieee80211_parse_beacon()
587 scan->chan = IEEE80211_FH_CHAN(frm[4], frm[5]); in ieee80211_parse_beacon()
588 scan->fhindex = frm[6]; in ieee80211_parse_beacon()
594 * is problematic for multi-mode devices. in ieee80211_parse_beacon()
596 if (ic->ic_phytype != IEEE80211_T_FH) in ieee80211_parse_beacon()
597 scan->chan = frm[2]; in ieee80211_parse_beacon()
601 scan->tim = frm; in ieee80211_parse_beacon()
602 scan->timoff = frm - mtod(m, uint8_t *); in ieee80211_parse_beacon()
612 scan->xrates = frm; in ieee80211_parse_beacon()
619 vap->iv_stats.is_rx_elem_toobig++; in ieee80211_parse_beacon()
622 scan->erp = frm[2] | 0x100; in ieee80211_parse_beacon()
625 scan->htcap = frm; in ieee80211_parse_beacon()
628 scan->vhtcap = frm; in ieee80211_parse_beacon()
631 scan->vhtopmode = frm; in ieee80211_parse_beacon()
634 scan->rsn = frm; in ieee80211_parse_beacon()
637 scan->htinfo = frm; in ieee80211_parse_beacon()
641 scan->meshid = frm; in ieee80211_parse_beacon()
644 scan->meshconf = frm; in ieee80211_parse_beacon()
652 scan->wpa = frm; in ieee80211_parse_beacon()
654 scan->wme = frm; in ieee80211_parse_beacon()
657 scan->ath = frm; in ieee80211_parse_beacon()
661 scan->tdma = frm; in ieee80211_parse_beacon()
663 else if (vap->iv_flags_ht & IEEE80211_FHT_HTCOMPAT) { in ieee80211_parse_beacon()
665 * Accept pre-draft HT ie's if the in ieee80211_parse_beacon()
669 if (scan->htcap == NULL) in ieee80211_parse_beacon()
670 scan->htcap = frm; in ieee80211_parse_beacon()
672 if (scan->htinfo == NULL) in ieee80211_parse_beacon()
673 scan->htcap = frm; in ieee80211_parse_beacon()
681 vap->iv_stats.is_rx_elem_unknown++; in ieee80211_parse_beacon()
686 IEEE80211_VERIFY_ELEMENT(scan->rates, IEEE80211_RATE_MAXSIZE, in ieee80211_parse_beacon()
687 scan->status |= IEEE80211_BPARSE_RATES_INVALID); in ieee80211_parse_beacon()
688 if (scan->rates != NULL && scan->xrates != NULL) { in ieee80211_parse_beacon()
695 IEEE80211_VERIFY_ELEMENT(scan->xrates, in ieee80211_parse_beacon()
696 IEEE80211_RATE_MAXSIZE - scan->rates[1], in ieee80211_parse_beacon()
697 scan->status |= IEEE80211_BPARSE_XRATES_INVALID); in ieee80211_parse_beacon()
699 IEEE80211_VERIFY_ELEMENT(scan->ssid, IEEE80211_NWID_LEN, in ieee80211_parse_beacon()
700 scan->status |= IEEE80211_BPARSE_SSID_INVALID); in ieee80211_parse_beacon()
701 if (scan->chan != scan->bchan && ic->ic_phytype != IEEE80211_T_FH) { in ieee80211_parse_beacon()
714 wh, NULL, "for off-channel %u (bchan=%u)", in ieee80211_parse_beacon()
715 scan->chan, scan->bchan); in ieee80211_parse_beacon()
716 vap->iv_stats.is_rx_chanmismatch++; in ieee80211_parse_beacon()
717 scan->status |= IEEE80211_BPARSE_OFFCHAN; in ieee80211_parse_beacon()
719 if (!(IEEE80211_BINTVAL_MIN <= scan->bintval && in ieee80211_parse_beacon()
720 scan->bintval <= IEEE80211_BINTVAL_MAX)) { in ieee80211_parse_beacon()
724 (int) scan->bintval); in ieee80211_parse_beacon()
725 vap->iv_stats.is_rx_badbintval++; in ieee80211_parse_beacon()
726 scan->status |= IEEE80211_BPARSE_BINTVAL_INVALID; in ieee80211_parse_beacon()
728 if (scan->country != NULL) { in ieee80211_parse_beacon()
736 IEEE80211_VERIFY_LENGTH(scan->country[1], 3 * sizeof(uint8_t), in ieee80211_parse_beacon()
737 scan->country = NULL); in ieee80211_parse_beacon()
739 if (scan->csa != NULL) { in ieee80211_parse_beacon()
744 IEEE80211_VERIFY_LENGTH(scan->csa[1], 3 * sizeof(uint8_t), in ieee80211_parse_beacon()
745 scan->status |= IEEE80211_BPARSE_CSA_INVALID); in ieee80211_parse_beacon()
748 if (scan->meshid != NULL) { in ieee80211_parse_beacon()
749 IEEE80211_VERIFY_ELEMENT(scan->meshid, IEEE80211_MESHID_LEN, in ieee80211_parse_beacon()
750 scan->status |= IEEE80211_BPARSE_MESHID_INVALID); in ieee80211_parse_beacon()
755 * accepting both the standard ie's and the pre-draft in ieee80211_parse_beacon()
758 if (scan->htcap != NULL) { in ieee80211_parse_beacon()
759 IEEE80211_VERIFY_LENGTH(scan->htcap[1], in ieee80211_parse_beacon()
760 scan->htcap[0] == IEEE80211_ELEMID_VENDOR ? in ieee80211_parse_beacon()
761 4 + sizeof(struct ieee80211_ie_htcap)-2 : in ieee80211_parse_beacon()
762 sizeof(struct ieee80211_ie_htcap)-2, in ieee80211_parse_beacon()
763 scan->htcap = NULL); in ieee80211_parse_beacon()
765 if (scan->htinfo != NULL) { in ieee80211_parse_beacon()
766 IEEE80211_VERIFY_LENGTH(scan->htinfo[1], in ieee80211_parse_beacon()
767 scan->htinfo[0] == IEEE80211_ELEMID_VENDOR ? in ieee80211_parse_beacon()
768 4 + sizeof(struct ieee80211_ie_htinfo)-2 : in ieee80211_parse_beacon()
769 sizeof(struct ieee80211_ie_htinfo)-2, in ieee80211_parse_beacon()
770 scan->htinfo = NULL); in ieee80211_parse_beacon()
774 if (scan->vhtcap != NULL) { in ieee80211_parse_beacon()
775 IEEE80211_VERIFY_LENGTH(scan->vhtcap[1], in ieee80211_parse_beacon()
777 scan->vhtcap = NULL); in ieee80211_parse_beacon()
779 if (scan->vhtopmode != NULL) { in ieee80211_parse_beacon()
780 IEEE80211_VERIFY_LENGTH(scan->vhtopmode[1], in ieee80211_parse_beacon()
782 scan->vhtopmode = NULL); in ieee80211_parse_beacon()
785 return scan->status; in ieee80211_parse_beacon()
789 * Parse an Action frame. Return 0 on success, non-zero on failure.
792 ieee80211_parse_action(struct ieee80211_node *ni, struct mbuf *m) in ieee80211_parse_action() argument
794 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_parse_action()
805 wh = mtod(m, struct ieee80211_frame *); in ieee80211_parse_action()
807 efrm = mtod(m, u_int8_t *) + m->m_len; in ieee80211_parse_action()
808 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
812 vap->iv_stats.is_rx_action++; in ieee80211_parse_action()
816 switch (ia->ia_category) { in ieee80211_parse_action()
818 switch (ia->ia_action) { in ieee80211_parse_action()
820 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
825 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
830 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
837 switch (ia->ia_action) { in ieee80211_parse_action()
839 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
844 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
852 switch (ia->ia_action) { in ieee80211_parse_action()
858 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
866 IEEE80211_VERIFY_LENGTH(efrm - frm, in ieee80211_parse_action()
882 ia->ia_action); in ieee80211_parse_action()
888 if (IEEE80211_IS_MULTICAST(wh->i_addr1) || in ieee80211_parse_action()
889 IEEE80211_IS_MULTICAST(wh->i_addr2)) in ieee80211_parse_action()
895 switch (ia->ia_action) { in ieee80211_parse_action()
899 if (ni == vap->iv_bss) in ieee80211_parse_action()
933 if (vap->iv_opmode == IEEE80211_M_STA) in ieee80211_getbssid()
934 return wh->i_addr2; in ieee80211_getbssid()
935 if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) != IEEE80211_FC1_DIR_NODS) in ieee80211_getbssid()
936 return wh->i_addr1; in ieee80211_getbssid()
937 if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL) in ieee80211_getbssid()
938 return wh->i_addr1; in ieee80211_getbssid()
939 return wh->i_addr3; in ieee80211_getbssid()
955 if_printf(vap->iv_ifp, "%s", buf); /* NB: no \n */ in ieee80211_note()
973 if_printf(vap->iv_ifp, "[%s] %s\n", in ieee80211_note_frame()
992 if_printf(vap->iv_ifp, "[%s] %s\n", ether_sprintf(mac), buf); in ieee80211_note_mac()
1011 if_printf(vap->iv_ifp, "[%s] discard %s frame, %s\n", in ieee80211_discard_frame()
1013 type != NULL ? type : ieee80211_mgt_subtype_name(wh->i_fc[0]), in ieee80211_discard_frame()
1033 if_printf(vap->iv_ifp, "[%s] discard%s%s information element, %s\n", in ieee80211_discard_ie()
1054 if_printf(vap->iv_ifp, "[%s] discard%s%s frame, %s\n", in ieee80211_discard_mac()