fix(lib): add esp_wifi_set_recv_data_frame_payload to enable or disable receiving data frame payload

This commit is contained in:
Chen Wen
2019-11-25 20:50:10 +08:00
parent 843d1486b9
commit cc81867ef0
2 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,13 @@ config FILTER_MASK_DATA
bool "Receive data packets"
default n
config FILTER_MASK_DATA_FRAME_PAYLOAD
depends on FILTER_MASK_DATA
bool "Receive data frame payload"
default n
help
Select this option to enable recv data frame payload
config FILTER_MASK_MISC
bool "Receive misc packets"
default n

View File

@ -131,6 +131,12 @@ static void sniffer_task(void* pvParameters)
sniffer_filter.filter_mask |= WIFI_PROMIS_FILTER_MASK_DATA;
#endif
#if CONFIG_FILTER_MASK_DATA_FRAME_PAYLOAD
/*Enable to receive the correct data frame payload*/
extern esp_err_t esp_wifi_set_recv_data_frame_payload(bool enable_recv);
ESP_ERROR_CHECK(esp_wifi_set_recv_data_frame_payload(true));
#endif
#if CONFIG_FILTER_MASK_MISC
sniffer_filter.filter_mask |= WIFI_PROMIS_FILTER_MASK_MISC;
#endif