Lines Matching defs:wh
162 struct ieee80211_frame *wh;
168 wh = mtod(m, struct ieee80211_frame *);
169 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
170 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
172 hdrspace = ieee80211_hdrspace(ic, wh);
179 wh = mtod(m, struct ieee80211_frame *);
185 wh, "data", "unknown dir 0x%x", dir);
190 IEEE80211_IS_MULTICAST(wh->i_addr1) &&
191 IEEE80211_ADDR_EQ(wh->i_addr3, ic->ic_myaddr)) {
199 wh, NULL, "%s", "multicast echo");
209 wh, "data", "unknown dir 0x%x", dir);
220 wh, "data", "unknown dir 0x%x", dir);
227 wh, "data", "%s", "unknown src");
228 ieee80211_send_error(ic, ni, wh->i_addr2,
236 wh, "data", "%s", "unassoc src");
247 if (((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) ^
250 wh->i_fc[1] & IEEE80211_FC1_PWR_MGT);
267 if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
273 wh, "WEP", "%s", "PRIVACY off");
284 wh = mtod(m, struct ieee80211_frame *);
285 wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
293 if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
390 struct ieee80211_frame *wh;
395 wh = mtod(m, struct ieee80211_frame *);
396 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
397 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
402 wh, "data", "unknown dir 0x%x", dir);
418 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
423 if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
430 wh, ieee80211_mgt_subtype_name[subtype >>
441 wh, "mgt", "%s", "WEP set but PRIVACY off");
445 hdrspace = ieee80211_hdrspace(ic, wh);
451 wh = mtod(m, struct ieee80211_frame *);
452 wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
481 struct ieee80211_frame *wh;
484 wh = mtod(m, struct ieee80211_frame *);
485 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
515 struct ieee80211_frame *wh;
554 wh = mtod(m, struct ieee80211_frame *);
556 if ((wh->i_fc[0] & IEEE80211_FC0_VERSION_MASK) !=
559 ni->ni_macaddr, NULL, "wrong version %x", wh->i_fc[0]);
564 dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
565 type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
572 bssid = wh->i_addr2;
587 if (!IEEE80211_IS_MULTICAST(wh->i_addr1) &&
588 !IEEE80211_ADDR_EQ(wh->i_addr1, ic->ic_myaddr)) {
591 ic->ic_myaddr, ":", wh->i_addr1, ":");
601 bssid = wh->i_addr1;
603 bssid = wh->i_addr1;
613 bssid = wh->i_addr3;
643 !IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) {
649 wh->i_addr2);
665 !IEEE80211_IS_MULTICAST(wh->i_addr1))) {
669 if (ieee80211_has_qos(wh)) {
690 rxseq = le16toh(*(u_int16_t *)wh->i_seq);
691 retry = wh->i_fc[1] & IEEE80211_FC1_RETRY;
739 wh, NULL, "bad frame type 0x%x", type);
762 struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
766 const u_int8_t more_frag = wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG;
769 IASSERT(!IEEE80211_IS_MULTICAST(wh->i_addr1), ("multicast fragm?"));
771 iseq = *(u_int16_t *)wh->i_seq;
811 !IEEE80211_ADDR_EQ(wh->i_addr1, lwh->i_addr1) ||
812 !IEEE80211_ADDR_EQ(wh->i_addr2, lwh->i_addr2)) {
936 struct ieee80211_qosframe_addr4 wh; /* Max size address frames */
945 memcpy(&wh, mtod(m, void *), hdrlen);
963 switch (wh.i_fc[1] & IEEE80211_FC1_DIR_MASK) {
965 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1);
966 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr2);
969 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr3);
970 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr2);
973 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr1);
974 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr3);
977 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr3);
978 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr4);
1086 ieee80211_auth_open(struct ieee80211com *ic, struct ieee80211_frame *wh,
1100 ieee80211_send_error(ic, ni, wh->i_addr2,
1127 ni = ieee80211_dup_bss(&ic->ic_sta, wh->i_addr2);
1177 wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
1232 ieee80211_auth_shared(struct ieee80211com *ic, struct ieee80211_frame *wh,
1333 ni = ieee80211_dup_bss(&ic->ic_sta, wh->i_addr2);
1435 ieee80211_getbssid(ic, wh)),
1447 wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
1462 wh, "shared key auth", "bad seq %d", seq);
1477 ieee80211_send_error(ic, ni, wh->i_addr2,
1515 wh->i_addr2, _ssid); \
1629 struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh)
1638 wh, "WPA", "not WPA, flags 0x%x", ic->ic_flags);
1650 wh, "WPA", "too short, len %u", len);
1662 wh, "WPA", "bad version %u", w);
1672 wh, "WPA", "mcast cipher mismatch; got %u, expected %u",
1684 wh, "WPA", "ucast cipher data too short; len %u, n %u",
1697 wh, "WPA", "%s", "ucast cipher set empty");
1711 wh, "WPA", "key mgmt alg data too short; len %u, n %u",
1724 wh, "WPA", "%s", "no acceptable key mgmt alg");
1800 struct ieee80211_rsnparms *rsn, const struct ieee80211_frame *wh)
1809 wh, "WPA", "not RSN, flags 0x%x", ic->ic_flags);
1821 wh, "RSN", "too short, len %u", len);
1830 wh, "RSN", "bad version %u", w);
1840 wh, "RSN", "mcast cipher mismatch; got %u, expected %u",
1852 wh, "RSN", "ucast cipher data too short; len %u, n %u",
1865 wh, "RSN", "%s", "ucast cipher set empty");
1879 wh, "RSN", "key mgmt alg data too short; len %u, n %u",
1892 wh, "RSN", "%s", "no acceptable key mgmt alg");
1910 const struct ieee80211_frame *wh)
1920 wh, "WME", "too short, len %u", len);
1967 struct ieee80211_frame *wh, struct ieee80211_scanparams *scan, int rssi,
1970 if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) {
1975 if ((ni = ieee80211_add_neighbor(ic, wh, scan)) == NULL)
1985 ieee80211_init_neighbor(ic, ni, wh, scan, 0);
1995 if (IEEE80211_ADDR_EQ(wh->i_addr3, ni->ni_bssid))
1998 IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
2032 wh, ieee80211_mgt_subtype_name[subtype >> \
2040 wh, ieee80211_mgt_subtype_name[subtype >> \
2051 wh, ieee80211_mgt_subtype_name[subtype >> \
2063 struct ieee80211_frame *wh;
2068 wh = mtod(m0, struct ieee80211_frame *);
2069 frm = (u_int8_t *)(wh + 1);
2156 wh, "ERP", "bad len %u", frm[1]);
2176 wh, "unhandled", "id %u, len %u", *frm, frm[1]);
2194 wh, ieee80211_mgt_subtype_name[subtype >>
2215 wh, ieee80211_mgt_subtype_name[subtype >>
2226 wh, ieee80211_mgt_subtype_name[subtype >>
2255 IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid))) {
2263 wh->i_addr2), ni->ni_erp, scan.sp_erp);
2279 wh->i_addr2),
2292 ieee80211_parse_wmeparams(ic, scan.sp_wme, wh) > 0) {
2305 ieee80211_add_scan(ic, &scan, wh, subtype, rssi,
2329 ieee80211_add_scan(ic, &scan, wh, subtype, rssi, rstamp);
2334 ieee80211_update_adhoc_node(ic, ni, wh, &scan, rssi, rstamp);
2342 struct ieee80211_frame *wh;
2349 wh = mtod(m0, struct ieee80211_frame *);
2350 frm = (u_int8_t *)(wh + 1);
2358 if (IEEE80211_IS_MULTICAST(wh->i_addr2)) {
2395 wh, ieee80211_mgt_subtype_name[subtype >>
2404 ni = ieee80211_tmp_node(ic, wh->i_addr2);
2406 wh->i_addr2, ni->ni_macaddr)) {
2416 wh->i_addr2);
2423 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2));
2433 wh, ieee80211_mgt_subtype_name[subtype >>
2451 struct ieee80211_frame *wh;
2456 wh = mtod(m0, struct ieee80211_frame *);
2457 frm = (u_int8_t *)(wh + 1);
2474 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2), algo, seq);
2479 if (ic->ic_acl != NULL && !ic->ic_acl->iac_check(ic, wh->i_addr2)) {
2481 wh, "auth", "%s", "disallowed by ACL");
2494 wh, "auth", "%s", "TKIP countermeasures enabled");
2507 ieee80211_auth_shared(ic, wh, frm + 6, efrm, ni, rssi,
2510 ieee80211_auth_open(ic, wh, ni, rssi, rstamp, seq, status);
2513 wh, "auth", "unsupported alg %d", algo);
2530 struct ieee80211_frame *wh;
2540 wh = mtod(m0, struct ieee80211_frame *);
2541 frm = (u_int8_t *)(wh + 1);
2570 if (!IEEE80211_ADDR_EQ(wh->i_addr3, ic->ic_bss->ni_bssid)) {
2572 wh, ieee80211_mgt_subtype_name[subtype >>
2621 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2623 ieee80211_send_error(ic, ni, wh->i_addr2,
2635 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2));
2657 reason = ieee80211_parse_wpa(ic, wpa, &rsn, wh);
2659 reason = ieee80211_parse_rsn(ic, wpa, &rsn, wh);
2674 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2691 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2714 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2773 struct ieee80211_frame *wh;
2781 wh = mtod(m0, struct ieee80211_frame *);
2782 frm = (u_int8_t *)(wh + 1);
2809 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2849 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2860 if (wme != NULL && ieee80211_parse_wmeparams(ic, wme, wh) >= 0) {
2899 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
2914 struct ieee80211_frame *wh;
2919 wh = mtod(m0, struct ieee80211_frame *);
2920 frm = (u_int8_t *)(wh + 1);
2938 if (!IEEE80211_ADDR_EQ(wh->i_addr1, ic->ic_myaddr)) {
2951 wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
2969 struct ieee80211_frame *wh;
2974 wh = mtod(m0, struct ieee80211_frame *);
2975 frm = (u_int8_t *)(wh + 1);
2995 if (!IEEE80211_ADDR_EQ(wh->i_addr1, ic->ic_myaddr)) {
3008 wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
3032 struct ieee80211_frame *wh;
3034 wh = mtod(m0, struct ieee80211_frame *);
3070 wh, "mgt", "subtype 0x%x not handled", subtype);
3152 struct ieee80211_frame_min *wh;
3158 wh = mtod(m0, struct ieee80211_frame_min *);
3161 (struct ieee80211_frame *)wh, "ps-poll",
3169 aid = le16toh(*(u_int16_t *)wh->i_dur);
3172 (struct ieee80211_frame *)wh, "ps-poll",
3186 ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2));
3226 ieee80211_getbssid(struct ieee80211com *ic, const struct ieee80211_frame *wh)
3229 return wh->i_addr2;
3230 if ((wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) != IEEE80211_FC1_DIR_NODS)
3231 return wh->i_addr1;
3232 if ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == IEEE80211_FC0_SUBTYPE_PS_POLL)
3233 return wh->i_addr1;
3234 return wh->i_addr3;
3268 const struct ieee80211_frame *wh,
3275 ether_snprintf(ebuf, sizeof(ebuf), ieee80211_getbssid(ic, wh)));
3288 const struct ieee80211_frame *wh,
3295 ether_snprintf(ebuf, sizeof(ebuf), ieee80211_getbssid(ic, wh)));