wifi: esp32: add config to enable automatic DHCPV4 negotiation
ESP32 wifi connection uses Zephyr's net stack. Once WiFi connects
in station mode, is requires the application to handle DHCPv4
negotiation. This PR adds support to automatic negotiation by
handling the dhcpv4 calls in driver layer.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
diff --git a/drivers/wifi/esp32/Kconfig.esp32 b/drivers/wifi/esp32/Kconfig.esp32
index 4064678..5abca09 100644
--- a/drivers/wifi/esp32/Kconfig.esp32
+++ b/drivers/wifi/esp32/Kconfig.esp32
@@ -29,10 +29,12 @@
help
WiFi password (WPA or WPA2) for the example to use.
-config ESP32_WIFI_STA_AUTO
- bool "Automatically connect to configured WiFi SSID"
+config ESP32_WIFI_STA_AUTO_DHCPV4
+ bool "Automatically starts DHCP4 negotiation"
+ depends on NET_DHCPV4
+ depends on NET_IPV4
help
- WiFi driver will automatically connect to SSID.
+ WiFi driver will automatically initiate DHCPV4 negotiation when connected.
config ESP32_WIFI_STA_RECONNECT
bool "WiFi connection retry"