Lines Matching refs:wh
478 struct ieee80211_frame *wh; in hostap_input() local
504 wh = mtod(m, struct ieee80211_frame *); in hostap_input()
506 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; in hostap_input()
508 hdrspace = ieee80211_hdrspace(ic, wh); /* XXX optimize? */ in hostap_input()
530 wh = mtod(m, struct ieee80211_frame *); in hostap_input()
532 if (!IEEE80211_IS_FC0_CHECK_VER(wh, IEEE80211_FC0_VERSION_0)) { in hostap_input()
535 wh->i_fc[0], wh->i_fc[1]); in hostap_input()
540 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK; in hostap_input()
541 type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; in hostap_input()
542 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; in hostap_input()
545 bssid = wh->i_addr1; in hostap_input()
547 bssid = wh->i_addr1; in hostap_input()
557 bssid = wh->i_addr3; in hostap_input()
576 uint8_t tid = ieee80211_gettid(wh); in hostap_input()
577 if (IEEE80211_QOS_HAS_SEQ(wh) && in hostap_input()
580 if (! ieee80211_check_rxseq(ni, wh, bssid, rxs)) in hostap_input()
587 hdrspace = ieee80211_hdrspace(ic, wh); in hostap_input()
601 IEEE80211_MSG_INPUT, wh, "data", in hostap_input()
606 IEEE80211_MSG_WDS, wh, in hostap_input()
616 wh, "data", "%s", "unknown src"); in hostap_input()
617 ieee80211_send_error(ni, wh->i_addr2, in hostap_input()
625 wh, "data", "%s", "unassoc src"); in hostap_input()
637 if (((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) ^ in hostap_input()
640 wh->i_fc[1] & IEEE80211_FC1_PWR_MGT); in hostap_input()
650 IEEE80211_MSG_WDS, wh, in hostap_input()
682 if (is_hw_decrypted || IEEE80211_IS_PROTECTED(wh)) { in hostap_input()
688 wh, "WEP", "%s", "PRIVACY off"); in hostap_input()
698 wh = mtod(m, struct ieee80211_frame *); in hostap_input()
699 wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; in hostap_input()
710 qos = ieee80211_getqos(wh)[0]; in hostap_input()
717 if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { in hostap_input()
724 wh = NULL; /* no longer valid, catch any uses */ in hostap_input()
821 wh, "mgt", "incorrect dir 0x%x", dir); in hostap_input()
832 if (IEEE80211_IS_MULTICAST(wh->i_addr2)) { in hostap_input()
835 wh, NULL, "source is multicast: %s", in hostap_input()
836 ether_sprintf(wh->i_addr2)); in hostap_input()
845 ether_sprintf(wh->i_addr2), rssi); in hostap_input()
848 if (IEEE80211_IS_PROTECTED(wh)) { in hostap_input()
855 wh, NULL, in hostap_input()
865 wh, NULL, "%s", "WEP set but PRIVACY off"); in hostap_input()
869 hdrspace = ieee80211_hdrspace(ic, wh); in hostap_input()
874 wh = mtod(m, struct ieee80211_frame *); in hostap_input()
875 wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED; in hostap_input()
896 wh, "bad", "frame type 0x%x", type); in hostap_input()
912 hostap_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, in hostap_auth_open() argument
934 ieee80211_send_error(ni, wh->i_addr2, in hostap_auth_open()
945 ni = ieee80211_dup_bss(vap, wh->i_addr2); in hostap_auth_open()
990 hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, in hostap_auth_shared() argument
1075 ni = ieee80211_dup_bss(vap, wh->i_addr2); in hostap_auth_shared()
1173 ieee80211_send_error(ni, wh->i_addr2, in hostap_auth_shared()
1248 struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh) in ieee80211_parse_wpa() argument
1262 wh, "WPA", "not WPA, flags 0x%x", vap->iv_flags); in ieee80211_parse_wpa()
1268 wh, "WPA", "too short, len %u", len); in ieee80211_parse_wpa()
1277 wh, "WPA", "bad version %u", w); in ieee80211_parse_wpa()
1289 wh, "WPA", "unknown mcast cipher suite %08X", in ieee80211_parse_wpa()
1301 wh, "WPA", "ucast cipher data too short; len %u, n %u", in ieee80211_parse_wpa()
1318 wh, "WPA", "no usable pairwise cipher suite found (w=%d)", in ieee80211_parse_wpa()
1334 wh, "WPA", "key mgmt alg data too short; len %u, n %u", in ieee80211_parse_wpa()
1428 struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh) in ieee80211_parse_rsn() argument
1442 wh, "WPA", "not RSN, flags 0x%x", vap->iv_flags); in ieee80211_parse_rsn()
1449 wh, "RSN", "too short, len %u", len); in ieee80211_parse_rsn()
1457 wh, "RSN", "bad version %u", w); in ieee80211_parse_rsn()
1469 wh, "RSN", "unknown mcast cipher suite %08X", in ieee80211_parse_rsn()
1476 wh, "RSN", "invalid mcast cipher suite %d", in ieee80211_parse_rsn()
1488 wh, "RSN", "ucast cipher data too short; len %u, n %u", in ieee80211_parse_rsn()
1518 wh, "RSN", "no usable pairwise cipher suite found (w=%d)", in ieee80211_parse_rsn()
1529 wh, "RSN", "key mgmt alg data too short; len %u, n %u", in ieee80211_parse_rsn()
1561 const struct ieee80211_frame *wh, const uint8_t *wpa, in wpa_assocreq() argument
1589 wh, NULL, "%s", "no WPA/RSN IE in association request"); in wpa_assocreq()
1609 wh, NULL, in wpa_assocreq()
1619 reason = ieee80211_parse_wpa(vap, wpa, rsnparms, wh); in wpa_assocreq()
1621 reason = ieee80211_parse_rsn(vap, rsn, rsnparms, wh); in wpa_assocreq()
1691 ratesetmismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, in ratesetmismatch() argument
1694 IEEE80211_NOTE_MAC(ni->ni_vap, IEEE80211_MSG_ANY, wh->i_addr2, in ratesetmismatch()
1702 capinfomismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, in capinfomismatch() argument
1707 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, wh->i_addr2, in capinfomismatch()
1716 htcapmismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh, in htcapmismatch() argument
1719 IEEE80211_NOTE_MAC(ni->ni_vap, IEEE80211_MSG_ANY, wh->i_addr2, in htcapmismatch()
1727 authalgreject(struct ieee80211_node *ni, const struct ieee80211_frame *wh, in authalgreject() argument
1733 wh, NULL, "unsupported alg %d", algo); in authalgreject()
1735 ieee80211_send_error(ni, wh->i_addr2, IEEE80211_FC0_SUBTYPE_AUTH, in authalgreject()
1794 struct ieee80211_frame *wh; in hostap_recv_mgmt() local
1801 wh = mtod(m0, struct ieee80211_frame *); in hostap_recv_mgmt()
1802 frm = (uint8_t *)&wh[1]; in hostap_recv_mgmt()
1848 ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, in hostap_recv_mgmt()
1870 IEEE80211_MSG_ASSOC, wh, in hostap_recv_mgmt()
1918 if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) { in hostap_recv_mgmt()
1920 wh, NULL, "%s", "disallowed by ACL"); in hostap_recv_mgmt()
1954 wh, NULL, in hostap_recv_mgmt()
1961 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_INPUT, wh->i_addr2, in hostap_recv_mgmt()
1969 ieee80211_send_proberesp(vap, wh->i_addr2, in hostap_recv_mgmt()
1980 if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bss->ni_bssid)) { in hostap_recv_mgmt()
1982 wh, NULL, "%s", "wrong bssid"); in hostap_recv_mgmt()
1997 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_AUTH, wh->i_addr2, in hostap_recv_mgmt()
2002 if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) { in hostap_recv_mgmt()
2004 wh, NULL, "%s", "disallowed by ACL"); in hostap_recv_mgmt()
2006 ieee80211_send_error(ni, wh->i_addr2, in hostap_recv_mgmt()
2014 wh, NULL, "%s", "TKIP countermeasures enabled"); in hostap_recv_mgmt()
2016 ieee80211_send_error(ni, wh->i_addr2, in hostap_recv_mgmt()
2022 hostap_auth_shared(ni, wh, frm + 6, efrm, rssi, nf, in hostap_recv_mgmt()
2025 hostap_auth_open(ni, wh, rssi, nf, seq, status); in hostap_recv_mgmt()
2027 authalgreject(ni, wh, algo, in hostap_recv_mgmt()
2040 authalgreject(ni, wh, algo, in hostap_recv_mgmt()
2056 if (!IEEE80211_ADDR_EQ(wh->i_addr3, vap->iv_bss->ni_bssid)) { in hostap_recv_mgmt()
2058 wh, NULL, "%s", "wrong bssid"); in hostap_recv_mgmt()
2070 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, wh->i_addr2, in hostap_recv_mgmt()
2073 ieee80211_send_error(ni, wh->i_addr2, in hostap_recv_mgmt()
2168 !wpa_assocreq(ni, &rsnparms, wh, wpa, rsn, capinfo)) in hostap_recv_mgmt()
2177 capinfomismatch(ni, wh, reassoc, resp, in hostap_recv_mgmt()
2187 capinfomismatch(ni, wh, reassoc, resp, in hostap_recv_mgmt()
2195 ratesetmismatch(ni, wh, reassoc, resp, "legacy", rate); in hostap_recv_mgmt()
2206 ratesetmismatch(ni, wh, reassoc, resp, "11g", rate); in hostap_recv_mgmt()
2233 ratesetmismatch(ni, wh, reassoc, resp, in hostap_recv_mgmt()
2282 htcapmismatch(ni, wh, reassoc, resp); in hostap_recv_mgmt()
2310 if (ieee80211_parse_wmeie(wme, wh, ni) > 0) { in hostap_recv_mgmt()
2351 !IEEE80211_ADDR_EQ(wh->i_addr1, vap->iv_myaddr)) { in hostap_recv_mgmt()
2383 wh, NULL, "%s", "unknown node"); in hostap_recv_mgmt()
2385 } else if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1) && in hostap_recv_mgmt()
2386 !IEEE80211_IS_MULTICAST(wh->i_addr1)) { in hostap_recv_mgmt()
2388 wh, NULL, "%s", "not for us"); in hostap_recv_mgmt()
2392 wh, NULL, "wrong state %s", in hostap_recv_mgmt()
2397 (void)ic->ic_recv_action(ni, wh, frm, efrm); in hostap_recv_mgmt()
2406 wh, NULL, "%s", "not handled"); in hostap_recv_mgmt()
2412 wh, "mgt", "subtype 0x%x not handled", subtype); in hostap_recv_mgmt()
2439 struct ieee80211_frame_min *wh; in ieee80211_recv_pspoll() local
2444 wh = mtod(m0, struct ieee80211_frame_min *); in ieee80211_recv_pspoll()
2448 (struct ieee80211_frame *) wh, NULL, in ieee80211_recv_pspoll()
2456 aid = le16toh(*(uint16_t *)wh->i_dur); in ieee80211_recv_pspoll()
2460 (struct ieee80211_frame *) wh, NULL, in ieee80211_recv_pspoll()
2478 IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_POWER, wh->i_addr2, in ieee80211_recv_pspoll()