rx_data.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. /*
  2. * Received Data frame processing
  3. * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #include "utils/includes.h"
  9. #include <linux/if_ether.h>
  10. #include "utils/common.h"
  11. #include "common/defs.h"
  12. #include "common/ieee802_11_defs.h"
  13. #include "wlantest.h"
  14. static const char * data_stype(u16 stype)
  15. {
  16. switch (stype) {
  17. case WLAN_FC_STYPE_DATA:
  18. return "DATA";
  19. case WLAN_FC_STYPE_DATA_CFACK:
  20. return "DATA-CFACK";
  21. case WLAN_FC_STYPE_DATA_CFPOLL:
  22. return "DATA-CFPOLL";
  23. case WLAN_FC_STYPE_DATA_CFACKPOLL:
  24. return "DATA-CFACKPOLL";
  25. case WLAN_FC_STYPE_NULLFUNC:
  26. return "NULLFUNC";
  27. case WLAN_FC_STYPE_CFACK:
  28. return "CFACK";
  29. case WLAN_FC_STYPE_CFPOLL:
  30. return "CFPOLL";
  31. case WLAN_FC_STYPE_CFACKPOLL:
  32. return "CFACKPOLL";
  33. case WLAN_FC_STYPE_QOS_DATA:
  34. return "QOSDATA";
  35. case WLAN_FC_STYPE_QOS_DATA_CFACK:
  36. return "QOSDATA-CFACK";
  37. case WLAN_FC_STYPE_QOS_DATA_CFPOLL:
  38. return "QOSDATA-CFPOLL";
  39. case WLAN_FC_STYPE_QOS_DATA_CFACKPOLL:
  40. return "QOSDATA-CFACKPOLL";
  41. case WLAN_FC_STYPE_QOS_NULL:
  42. return "QOS-NULL";
  43. case WLAN_FC_STYPE_QOS_CFPOLL:
  44. return "QOS-CFPOLL";
  45. case WLAN_FC_STYPE_QOS_CFACKPOLL:
  46. return "QOS-CFACKPOLL";
  47. }
  48. return "??";
  49. }
  50. static void rx_data_eth(struct wlantest *wt, const u8 *bssid,
  51. const u8 *sta_addr, const u8 *dst, const u8 *src,
  52. u16 ethertype, const u8 *data, size_t len, int prot,
  53. const u8 *peer_addr)
  54. {
  55. switch (ethertype) {
  56. case ETH_P_PAE:
  57. rx_data_eapol(wt, dst, src, data, len, prot);
  58. break;
  59. case ETH_P_IP:
  60. rx_data_ip(wt, bssid, sta_addr, dst, src, data, len,
  61. peer_addr);
  62. break;
  63. case 0x890d:
  64. rx_data_80211_encap(wt, bssid, sta_addr, dst, src, data, len);
  65. break;
  66. }
  67. }
  68. static void rx_data_process(struct wlantest *wt, const u8 *bssid,
  69. const u8 *sta_addr,
  70. const u8 *dst, const u8 *src,
  71. const u8 *data, size_t len, int prot,
  72. const u8 *peer_addr)
  73. {
  74. if (len == 0)
  75. return;
  76. if (len >= 8 && os_memcmp(data, "\xaa\xaa\x03\x00\x00\x00", 6) == 0) {
  77. rx_data_eth(wt, bssid, sta_addr, dst, src,
  78. WPA_GET_BE16(data + 6), data + 8, len - 8, prot,
  79. peer_addr);
  80. return;
  81. }
  82. wpa_hexdump(MSG_DEBUG, "Unrecognized LLC", data, len > 8 ? 8 : len);
  83. }
  84. static void rx_data_bss_prot_group(struct wlantest *wt,
  85. const struct ieee80211_hdr *hdr,
  86. const u8 *qos, const u8 *dst, const u8 *src,
  87. const u8 *data, size_t len)
  88. {
  89. struct wlantest_bss *bss;
  90. int keyid;
  91. u8 *decrypted;
  92. size_t dlen;
  93. u8 pn[6];
  94. bss = bss_get(wt, hdr->addr2);
  95. if (bss == NULL)
  96. return;
  97. if (len < 4) {
  98. add_note(wt, MSG_INFO, "Too short group addressed data frame");
  99. return;
  100. }
  101. if (bss->group_cipher & (WPA_CIPHER_TKIP | WPA_CIPHER_CCMP) &&
  102. !(data[3] & 0x20)) {
  103. add_note(wt, MSG_INFO, "Expected TKIP/CCMP frame from "
  104. MACSTR " did not have ExtIV bit set to 1",
  105. MAC2STR(bss->bssid));
  106. return;
  107. }
  108. if (bss->group_cipher == WPA_CIPHER_TKIP) {
  109. if (data[3] & 0x1f) {
  110. add_note(wt, MSG_INFO, "TKIP frame from " MACSTR
  111. " used non-zero reserved bit",
  112. MAC2STR(bss->bssid));
  113. }
  114. if (data[1] != ((data[0] | 0x20) & 0x7f)) {
  115. add_note(wt, MSG_INFO, "TKIP frame from " MACSTR
  116. " used incorrect WEPSeed[1] (was 0x%x, "
  117. "expected 0x%x)",
  118. MAC2STR(bss->bssid), data[1],
  119. (data[0] | 0x20) & 0x7f);
  120. }
  121. } else if (bss->group_cipher == WPA_CIPHER_CCMP) {
  122. if (data[2] != 0 || (data[3] & 0x1f) != 0) {
  123. add_note(wt, MSG_INFO, "CCMP frame from " MACSTR
  124. " used non-zero reserved bit",
  125. MAC2STR(bss->bssid));
  126. }
  127. }
  128. keyid = data[3] >> 6;
  129. if (bss->gtk_len[keyid] == 0 && bss->group_cipher != WPA_CIPHER_WEP40)
  130. {
  131. add_note(wt, MSG_MSGDUMP, "No GTK known to decrypt the frame "
  132. "(A2=" MACSTR " KeyID=%d)",
  133. MAC2STR(hdr->addr2), keyid);
  134. return;
  135. }
  136. if (bss->group_cipher == WPA_CIPHER_TKIP)
  137. tkip_get_pn(pn, data);
  138. else if (bss->group_cipher == WPA_CIPHER_WEP40)
  139. goto skip_replay_det;
  140. else
  141. ccmp_get_pn(pn, data);
  142. if (os_memcmp(pn, bss->rsc[keyid], 6) <= 0) {
  143. u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
  144. add_note(wt, MSG_INFO, "CCMP/TKIP replay detected: A1=" MACSTR
  145. " A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
  146. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  147. MAC2STR(hdr->addr3),
  148. WLAN_GET_SEQ_SEQ(seq_ctrl),
  149. WLAN_GET_SEQ_FRAG(seq_ctrl));
  150. wpa_hexdump(MSG_INFO, "RX PN", pn, 6);
  151. wpa_hexdump(MSG_INFO, "RSC", bss->rsc[keyid], 6);
  152. }
  153. skip_replay_det:
  154. if (bss->group_cipher == WPA_CIPHER_TKIP)
  155. decrypted = tkip_decrypt(bss->gtk[keyid], hdr, data, len,
  156. &dlen);
  157. else if (bss->group_cipher == WPA_CIPHER_WEP40)
  158. decrypted = wep_decrypt(wt, hdr, data, len, &dlen);
  159. else
  160. decrypted = ccmp_decrypt(bss->gtk[keyid], hdr, data, len,
  161. &dlen);
  162. if (decrypted) {
  163. rx_data_process(wt, bss->bssid, NULL, dst, src, decrypted,
  164. dlen, 1, NULL);
  165. os_memcpy(bss->rsc[keyid], pn, 6);
  166. write_pcap_decrypted(wt, (const u8 *) hdr, 24 + (qos ? 2 : 0),
  167. decrypted, dlen);
  168. } else
  169. add_note(wt, MSG_DEBUG, "Failed to decrypt frame");
  170. os_free(decrypted);
  171. }
  172. static void rx_data_bss_prot(struct wlantest *wt,
  173. const struct ieee80211_hdr *hdr, const u8 *qos,
  174. const u8 *dst, const u8 *src, const u8 *data,
  175. size_t len)
  176. {
  177. struct wlantest_bss *bss;
  178. struct wlantest_sta *sta, *sta2;
  179. int keyid;
  180. u16 fc = le_to_host16(hdr->frame_control);
  181. u8 *decrypted;
  182. size_t dlen;
  183. int tid;
  184. u8 pn[6], *rsc;
  185. struct wlantest_tdls *tdls = NULL;
  186. const u8 *tk = NULL;
  187. if (hdr->addr1[0] & 0x01) {
  188. rx_data_bss_prot_group(wt, hdr, qos, dst, src, data, len);
  189. return;
  190. }
  191. if (fc & WLAN_FC_TODS) {
  192. bss = bss_get(wt, hdr->addr1);
  193. if (bss == NULL)
  194. return;
  195. sta = sta_get(bss, hdr->addr2);
  196. if (sta)
  197. sta->counters[WLANTEST_STA_COUNTER_PROT_DATA_TX]++;
  198. } else if (fc & WLAN_FC_FROMDS) {
  199. bss = bss_get(wt, hdr->addr2);
  200. if (bss == NULL)
  201. return;
  202. sta = sta_get(bss, hdr->addr1);
  203. } else {
  204. bss = bss_get(wt, hdr->addr3);
  205. if (bss == NULL)
  206. return;
  207. sta = sta_find(bss, hdr->addr2);
  208. sta2 = sta_find(bss, hdr->addr1);
  209. if (sta == NULL || sta2 == NULL)
  210. return;
  211. dl_list_for_each(tdls, &bss->tdls, struct wlantest_tdls, list)
  212. {
  213. if ((tdls->init == sta && tdls->resp == sta2) ||
  214. (tdls->init == sta2 && tdls->resp == sta)) {
  215. if (!tdls->link_up)
  216. wpa_printf(MSG_DEBUG, "TDLS: Link not "
  217. "up, but Data frame seen");
  218. tk = tdls->tpk.tk;
  219. break;
  220. }
  221. }
  222. }
  223. if ((sta == NULL ||
  224. (!sta->ptk_set && sta->pairwise_cipher != WPA_CIPHER_WEP40)) &&
  225. tk == NULL) {
  226. add_note(wt, MSG_MSGDUMP, "No PTK known to decrypt the frame");
  227. return;
  228. }
  229. if (len < 4) {
  230. add_note(wt, MSG_INFO, "Too short encrypted data frame");
  231. return;
  232. }
  233. if (sta->pairwise_cipher & (WPA_CIPHER_TKIP | WPA_CIPHER_CCMP) &&
  234. !(data[3] & 0x20)) {
  235. add_note(wt, MSG_INFO, "Expected TKIP/CCMP frame from "
  236. MACSTR " did not have ExtIV bit set to 1",
  237. MAC2STR(src));
  238. return;
  239. }
  240. if (tk == NULL && sta->pairwise_cipher == WPA_CIPHER_TKIP) {
  241. if (data[3] & 0x1f) {
  242. add_note(wt, MSG_INFO, "TKIP frame from " MACSTR
  243. " used non-zero reserved bit",
  244. MAC2STR(hdr->addr2));
  245. }
  246. if (data[1] != ((data[0] | 0x20) & 0x7f)) {
  247. add_note(wt, MSG_INFO, "TKIP frame from " MACSTR
  248. " used incorrect WEPSeed[1] (was 0x%x, "
  249. "expected 0x%x)",
  250. MAC2STR(hdr->addr2), data[1],
  251. (data[0] | 0x20) & 0x7f);
  252. }
  253. } else if (tk || sta->pairwise_cipher == WPA_CIPHER_CCMP) {
  254. if (data[2] != 0 || (data[3] & 0x1f) != 0) {
  255. add_note(wt, MSG_INFO, "CCMP frame from " MACSTR
  256. " used non-zero reserved bit",
  257. MAC2STR(hdr->addr2));
  258. }
  259. }
  260. keyid = data[3] >> 6;
  261. if (keyid != 0) {
  262. add_note(wt, MSG_INFO, "Unexpected non-zero KeyID %d in "
  263. "individually addressed Data frame from " MACSTR,
  264. keyid, MAC2STR(hdr->addr2));
  265. }
  266. if (qos)
  267. tid = qos[0] & 0x0f;
  268. else
  269. tid = 0;
  270. if (tk) {
  271. if (os_memcmp(hdr->addr2, tdls->init->addr, ETH_ALEN) == 0)
  272. rsc = tdls->rsc_init[tid];
  273. else
  274. rsc = tdls->rsc_resp[tid];
  275. } else if (fc & WLAN_FC_TODS)
  276. rsc = sta->rsc_tods[tid];
  277. else
  278. rsc = sta->rsc_fromds[tid];
  279. if (tk == NULL && sta->pairwise_cipher == WPA_CIPHER_TKIP)
  280. tkip_get_pn(pn, data);
  281. else if (sta->pairwise_cipher == WPA_CIPHER_WEP40)
  282. goto skip_replay_det;
  283. else
  284. ccmp_get_pn(pn, data);
  285. if (os_memcmp(pn, rsc, 6) <= 0) {
  286. u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
  287. add_note(wt, MSG_INFO, "CCMP/TKIP replay detected: A1=" MACSTR
  288. " A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
  289. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  290. MAC2STR(hdr->addr3),
  291. WLAN_GET_SEQ_SEQ(seq_ctrl),
  292. WLAN_GET_SEQ_FRAG(seq_ctrl));
  293. wpa_hexdump(MSG_INFO, "RX PN", pn, 6);
  294. wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
  295. }
  296. skip_replay_det:
  297. if (tk)
  298. decrypted = ccmp_decrypt(tk, hdr, data, len, &dlen);
  299. else if (sta->pairwise_cipher == WPA_CIPHER_TKIP)
  300. decrypted = tkip_decrypt(sta->ptk.tk1, hdr, data, len, &dlen);
  301. else if (sta->pairwise_cipher == WPA_CIPHER_WEP40)
  302. decrypted = wep_decrypt(wt, hdr, data, len, &dlen);
  303. else
  304. decrypted = ccmp_decrypt(sta->ptk.tk1, hdr, data, len, &dlen);
  305. if (decrypted) {
  306. u16 fc = le_to_host16(hdr->frame_control);
  307. const u8 *peer_addr = NULL;
  308. if (!(fc & (WLAN_FC_FROMDS | WLAN_FC_TODS)))
  309. peer_addr = hdr->addr1;
  310. os_memcpy(rsc, pn, 6);
  311. rx_data_process(wt, bss->bssid, sta->addr, dst, src, decrypted,
  312. dlen, 1, peer_addr);
  313. write_pcap_decrypted(wt, (const u8 *) hdr, 24 + (qos ? 2 : 0),
  314. decrypted, dlen);
  315. } else
  316. add_note(wt, MSG_DEBUG, "Failed to decrypt frame");
  317. os_free(decrypted);
  318. }
  319. static void rx_data_bss(struct wlantest *wt, const struct ieee80211_hdr *hdr,
  320. const u8 *qos, const u8 *dst, const u8 *src,
  321. const u8 *data, size_t len)
  322. {
  323. u16 fc = le_to_host16(hdr->frame_control);
  324. int prot = !!(fc & WLAN_FC_ISWEP);
  325. if (qos) {
  326. u8 ack = (qos[0] & 0x60) >> 5;
  327. wpa_printf(MSG_MSGDUMP, "BSS DATA: " MACSTR " -> " MACSTR
  328. " len=%u%s tid=%u%s%s",
  329. MAC2STR(src), MAC2STR(dst), (unsigned int) len,
  330. prot ? " Prot" : "", qos[0] & 0x0f,
  331. (qos[0] & 0x10) ? " EOSP" : "",
  332. ack == 0 ? "" :
  333. (ack == 1 ? " NoAck" :
  334. (ack == 2 ? " NoExpAck" : " BA")));
  335. } else {
  336. wpa_printf(MSG_MSGDUMP, "BSS DATA: " MACSTR " -> " MACSTR
  337. " len=%u%s",
  338. MAC2STR(src), MAC2STR(dst), (unsigned int) len,
  339. prot ? " Prot" : "");
  340. }
  341. if (prot)
  342. rx_data_bss_prot(wt, hdr, qos, dst, src, data, len);
  343. else {
  344. const u8 *bssid, *sta_addr, *peer_addr;
  345. if (fc & WLAN_FC_TODS) {
  346. bssid = hdr->addr1;
  347. sta_addr = hdr->addr2;
  348. peer_addr = NULL;
  349. } else if (fc & WLAN_FC_FROMDS) {
  350. bssid = hdr->addr2;
  351. sta_addr = hdr->addr1;
  352. peer_addr = NULL;
  353. } else {
  354. bssid = hdr->addr3;
  355. sta_addr = hdr->addr2;
  356. peer_addr = hdr->addr1;
  357. }
  358. rx_data_process(wt, bssid, sta_addr, dst, src, data, len, 0,
  359. peer_addr);
  360. }
  361. }
  362. static struct wlantest_tdls * get_tdls(struct wlantest *wt, const u8 *bssid,
  363. const u8 *sta1_addr,
  364. const u8 *sta2_addr)
  365. {
  366. struct wlantest_bss *bss;
  367. struct wlantest_sta *sta1, *sta2;
  368. struct wlantest_tdls *tdls;
  369. bss = bss_find(wt, bssid);
  370. if (bss == NULL)
  371. return NULL;
  372. sta1 = sta_find(bss, sta1_addr);
  373. if (sta1 == NULL)
  374. return NULL;
  375. sta2 = sta_find(bss, sta2_addr);
  376. if (sta2 == NULL)
  377. return NULL;
  378. dl_list_for_each(tdls, &bss->tdls, struct wlantest_tdls, list) {
  379. if ((tdls->init == sta1 && tdls->resp == sta2) ||
  380. (tdls->init == sta2 && tdls->resp == sta1))
  381. return tdls;
  382. }
  383. return NULL;
  384. }
  385. static void add_direct_link(struct wlantest *wt, const u8 *bssid,
  386. const u8 *sta1_addr, const u8 *sta2_addr)
  387. {
  388. struct wlantest_tdls *tdls;
  389. tdls = get_tdls(wt, bssid, sta1_addr, sta2_addr);
  390. if (tdls == NULL)
  391. return;
  392. if (tdls->link_up)
  393. tdls->counters[WLANTEST_TDLS_COUNTER_VALID_DIRECT_LINK]++;
  394. else
  395. tdls->counters[WLANTEST_TDLS_COUNTER_INVALID_DIRECT_LINK]++;
  396. }
  397. static void add_ap_path(struct wlantest *wt, const u8 *bssid,
  398. const u8 *sta1_addr, const u8 *sta2_addr)
  399. {
  400. struct wlantest_tdls *tdls;
  401. tdls = get_tdls(wt, bssid, sta1_addr, sta2_addr);
  402. if (tdls == NULL)
  403. return;
  404. if (tdls->link_up)
  405. tdls->counters[WLANTEST_TDLS_COUNTER_INVALID_AP_PATH]++;
  406. else
  407. tdls->counters[WLANTEST_TDLS_COUNTER_VALID_AP_PATH]++;
  408. }
  409. void rx_data(struct wlantest *wt, const u8 *data, size_t len)
  410. {
  411. const struct ieee80211_hdr *hdr;
  412. u16 fc, stype;
  413. size_t hdrlen;
  414. const u8 *qos = NULL;
  415. if (len < 24)
  416. return;
  417. hdr = (const struct ieee80211_hdr *) data;
  418. fc = le_to_host16(hdr->frame_control);
  419. stype = WLAN_FC_GET_STYPE(fc);
  420. hdrlen = 24;
  421. if ((fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) ==
  422. (WLAN_FC_TODS | WLAN_FC_FROMDS))
  423. hdrlen += ETH_ALEN;
  424. if (stype & 0x08) {
  425. qos = data + hdrlen;
  426. hdrlen += 2;
  427. }
  428. if (len < hdrlen)
  429. return;
  430. wt->rx_data++;
  431. switch (fc & (WLAN_FC_TODS | WLAN_FC_FROMDS)) {
  432. case 0:
  433. wpa_printf(MSG_EXCESSIVE, "DATA %s%s%s IBSS DA=" MACSTR " SA="
  434. MACSTR " BSSID=" MACSTR,
  435. data_stype(WLAN_FC_GET_STYPE(fc)),
  436. fc & WLAN_FC_PWRMGT ? " PwrMgt" : "",
  437. fc & WLAN_FC_ISWEP ? " Prot" : "",
  438. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  439. MAC2STR(hdr->addr3));
  440. add_direct_link(wt, hdr->addr3, hdr->addr1, hdr->addr2);
  441. rx_data_bss(wt, hdr, qos, hdr->addr1, hdr->addr2,
  442. data + hdrlen, len - hdrlen);
  443. break;
  444. case WLAN_FC_FROMDS:
  445. wpa_printf(MSG_EXCESSIVE, "DATA %s%s%s FromDS DA=" MACSTR
  446. " BSSID=" MACSTR " SA=" MACSTR,
  447. data_stype(WLAN_FC_GET_STYPE(fc)),
  448. fc & WLAN_FC_PWRMGT ? " PwrMgt" : "",
  449. fc & WLAN_FC_ISWEP ? " Prot" : "",
  450. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  451. MAC2STR(hdr->addr3));
  452. add_ap_path(wt, hdr->addr2, hdr->addr1, hdr->addr3);
  453. rx_data_bss(wt, hdr, qos, hdr->addr1, hdr->addr3,
  454. data + hdrlen, len - hdrlen);
  455. break;
  456. case WLAN_FC_TODS:
  457. wpa_printf(MSG_EXCESSIVE, "DATA %s%s%s ToDS BSSID=" MACSTR
  458. " SA=" MACSTR " DA=" MACSTR,
  459. data_stype(WLAN_FC_GET_STYPE(fc)),
  460. fc & WLAN_FC_PWRMGT ? " PwrMgt" : "",
  461. fc & WLAN_FC_ISWEP ? " Prot" : "",
  462. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  463. MAC2STR(hdr->addr3));
  464. add_ap_path(wt, hdr->addr1, hdr->addr3, hdr->addr2);
  465. rx_data_bss(wt, hdr, qos, hdr->addr3, hdr->addr2,
  466. data + hdrlen, len - hdrlen);
  467. break;
  468. case WLAN_FC_TODS | WLAN_FC_FROMDS:
  469. wpa_printf(MSG_EXCESSIVE, "DATA %s%s%s WDS RA=" MACSTR " TA="
  470. MACSTR " DA=" MACSTR " SA=" MACSTR,
  471. data_stype(WLAN_FC_GET_STYPE(fc)),
  472. fc & WLAN_FC_PWRMGT ? " PwrMgt" : "",
  473. fc & WLAN_FC_ISWEP ? " Prot" : "",
  474. MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
  475. MAC2STR(hdr->addr3),
  476. MAC2STR((const u8 *) (hdr + 1)));
  477. break;
  478. }
  479. }