mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-28 12:46:48 +08:00
feat(examples): add processing AMPDU pkt
This commit is contained in:
@ -50,10 +50,12 @@ static void sniffer_cb(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
for (count = 0; count < total_num; count++) {
|
||||
if (total_num > 1) {
|
||||
len = *((uint16_t*)(frame + MAC_HDR_LEN_MAX + 2 * count));
|
||||
|
||||
if (seq_buf == 0) {
|
||||
seq_buf = *((uint16_t *)(frame+22)) >> 4;
|
||||
seq_buf = *((uint16_t*)(frame + 22)) >> 4;
|
||||
}
|
||||
printf("seq_num:%d, total_num:%d\r\n", seq_buf, total_num);
|
||||
|
||||
ESP_LOGI(TAG, "seq_num:%d, total_num:%d\r\n", seq_buf, total_num);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
@ -81,10 +83,12 @@ static void sniffer_cb(void* buf, wifi_promiscuous_pkt_type_t type)
|
||||
}
|
||||
|
||||
++seq_buf;
|
||||
|
||||
if (total_num > 1) {
|
||||
*(uint16_t *)(frame + 22) = (seq_buf << 4) | (*(uint16_t *)(frame + 22) & 0xf);
|
||||
*(uint16_t*)(frame + 22) = (seq_buf << 4) | (*(uint16_t*)(frame + 22) & 0xf);
|
||||
}
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Rx ctrl header:");
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
|
Reference in New Issue
Block a user