From a36cc962a3201f29b998d6d779192de6134582de Mon Sep 17 00:00:00 2001 From: suda-morris <362953310@qq.com> Date: Fri, 23 Aug 2019 12:51:05 +0800 Subject: [PATCH 1/2] smartconfig: move smartconfig_ack to esp_wifi conponent --- components/esp_wifi/CMakeLists.txt | 3 ++- .../{smartconfig_ack => esp_wifi}/include/smartconfig_ack.h | 0 components/{smartconfig_ack => esp_wifi/src}/smartconfig_ack.c | 0 components/smartconfig_ack/CMakeLists.txt | 3 --- components/smartconfig_ack/component.mk | 2 -- 5 files changed, 2 insertions(+), 6 deletions(-) rename components/{smartconfig_ack => esp_wifi}/include/smartconfig_ack.h (100%) rename components/{smartconfig_ack => esp_wifi/src}/smartconfig_ack.c (100%) delete mode 100644 components/smartconfig_ack/CMakeLists.txt delete mode 100644 components/smartconfig_ack/component.mk diff --git a/components/esp_wifi/CMakeLists.txt b/components/esp_wifi/CMakeLists.txt index 925704f933..3b0e3d530e 100644 --- a/components/esp_wifi/CMakeLists.txt +++ b/components/esp_wifi/CMakeLists.txt @@ -10,9 +10,10 @@ idf_component_register(SRCS "src/coexist.c" "src/phy_init.c" "src/restore.c" "src/smartconfig.c" + "src/smartconfig_ack.c" "src/wifi_init.c" INCLUDE_DIRS "include" "${idf_target}/include" - PRIV_REQUIRES wpa_supplicant nvs_flash smartconfig_ack + PRIV_REQUIRES wpa_supplicant nvs_flash LDFRAGMENTS "${ldfragments}") idf_build_get_property(build_dir BUILD_DIR) diff --git a/components/smartconfig_ack/include/smartconfig_ack.h b/components/esp_wifi/include/smartconfig_ack.h similarity index 100% rename from components/smartconfig_ack/include/smartconfig_ack.h rename to components/esp_wifi/include/smartconfig_ack.h diff --git a/components/smartconfig_ack/smartconfig_ack.c b/components/esp_wifi/src/smartconfig_ack.c similarity index 100% rename from components/smartconfig_ack/smartconfig_ack.c rename to components/esp_wifi/src/smartconfig_ack.c diff --git a/components/smartconfig_ack/CMakeLists.txt b/components/smartconfig_ack/CMakeLists.txt deleted file mode 100644 index eb34b0713c..0000000000 --- a/components/smartconfig_ack/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -idf_component_register(SRCS "smartconfig_ack.c" - INCLUDE_DIRS include - PRIV_REQUIRES lwip tcpip_adapter) \ No newline at end of file diff --git a/components/smartconfig_ack/component.mk b/components/smartconfig_ack/component.mk deleted file mode 100644 index 58eac9a550..0000000000 --- a/components/smartconfig_ack/component.mk +++ /dev/null @@ -1,2 +0,0 @@ -# -# Component Makefile From e7033716dbd00be114a8dab5822c8676b142d6e4 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Wed, 28 Aug 2019 22:08:58 +0100 Subject: [PATCH 2/2] LwIP: Make IP_PKTINFO support configurable LwIP has support for IP_PKTINFO, but it cannot be activated as it is not configurable. This fix adds in the ability to configure it. Merges https://github.com/espressif/esp-idf/pull/3983 --- components/lwip/Kconfig | 7 +++++++ components/lwip/port/esp32/include/lwipopts.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 4b7d237b54..ec6787b80f 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -90,6 +90,13 @@ menu "LWIP" help Enabling this option allows checking for available data on a netconn. + config LWIP_NETBUF_RECVINFO + bool "Enable IP_PKTINFO option" + default n + help + Enabling this option allows checking for the destination address + of a received IPv4 Packet. + config LWIP_IP_FRAG bool "Enable fragment outgoing IP packets" default n diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 5b85fc6ccf..884ffb880a 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -556,6 +556,12 @@ */ #define SO_REUSE_RXTOALL CONFIG_LWIP_SO_REUSE_RXTOALL +/** + * LWIP_NETBUF_RECVINFO==1: Enable IP_PKTINFO option. + * This option is set via menuconfig. + */ +#define LWIP_NETBUF_RECVINFO CONFIG_LWIP_NETBUF_RECVINFO + /* ---------------------------------------- ---------- Statistics options ----------