diff --git a/wlantest/process.c b/wlantest/process.c index 78908927e..6cdb10b9b 100644 --- a/wlantest/process.c +++ b/wlantest/process.c @@ -262,3 +262,10 @@ void wlantest_process_prism(struct wlantest *wt, const u8 *data, size_t len) rx_frame(wt, frame, frame_len); } + + +void wlantest_process_80211(struct wlantest *wt, const u8 *data, size_t len) +{ + wpa_hexdump(MSG_EXCESSIVE, "Process data", data, len); + rx_frame(wt, data, len); +} diff --git a/wlantest/readpcap.c b/wlantest/readpcap.c index ecb5ae22a..f2f6e9212 100644 --- a/wlantest/readpcap.c +++ b/wlantest/readpcap.c @@ -36,7 +36,8 @@ int read_cap_file(struct wlantest *wt, const char *fname) return -1; } dlt = pcap_datalink(pcap); - if (dlt != DLT_IEEE802_11_RADIO && dlt != DLT_PRISM_HEADER) { + if (dlt != DLT_IEEE802_11_RADIO && dlt != DLT_PRISM_HEADER && + dlt != DLT_IEEE802_11) { wpa_printf(MSG_ERROR, "Unsupported pcap datalink type: %d", dlt); pcap_close(pcap); @@ -82,6 +83,8 @@ int read_cap_file(struct wlantest *wt, const char *fname) case DLT_PRISM_HEADER: wlantest_process_prism(wt, data, hdr->caplen); break; + case DLT_IEEE802_11: + wlantest_process_80211(wt, data, hdr->caplen); } } diff --git a/wlantest/wlantest.h b/wlantest/wlantest.h index 81f473148..35e513572 100644 --- a/wlantest/wlantest.h +++ b/wlantest/wlantest.h @@ -155,6 +155,7 @@ void write_pcap_decrypted(struct wlantest *wt, const u8 *buf1, size_t len1, const u8 *buf2, size_t len2); void wlantest_process(struct wlantest *wt, const u8 *data, size_t len); void wlantest_process_prism(struct wlantest *wt, const u8 *data, size_t len); +void wlantest_process_80211(struct wlantest *wt, const u8 *data, size_t len); void wlantest_process_wired(struct wlantest *wt, const u8 *data, size_t len); u32 crc32(const u8 *frame, size_t frame_len); int monitor_init(struct wlantest *wt, const char *ifname);