drivers: wifi: esp32: Mute implicit function declaration warning

Mute the function declaration warning, the compiler was emitting when
compiling the esp32 Wi-Fi driver with IPv4 disabled. The
net_dhcpv4_start() function was visible during compile time, even when
IPv4 was disabled.

Signed-off-by: Marc Lasch <mlasch@mailbox.org>
This commit is contained in:
Marc Lasch 2023-12-03 19:27:56 +01:00 committed by Fabio Baltieri
commit afa1bd842c

View file

@ -236,19 +236,19 @@ out:
static void esp_wifi_handle_connect_event(void) static void esp_wifi_handle_connect_event(void)
{ {
esp32_data.state = ESP32_STA_CONNECTED; esp32_data.state = ESP32_STA_CONNECTED;
if (IS_ENABLED(CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4)) { #if defined(CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4)
net_dhcpv4_start(esp32_wifi_iface); net_dhcpv4_start(esp32_wifi_iface);
} else { #else
wifi_mgmt_raise_connect_result_event(esp32_wifi_iface, 0); wifi_mgmt_raise_connect_result_event(esp32_wifi_iface, 0);
} #endif
} }
static void esp_wifi_handle_disconnect_event(void) static void esp_wifi_handle_disconnect_event(void)
{ {
if (esp32_data.state == ESP32_STA_CONNECTED) { if (esp32_data.state == ESP32_STA_CONNECTED) {
if (IS_ENABLED(CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4)) { #if defined(CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4)
net_dhcpv4_stop(esp32_wifi_iface); net_dhcpv4_stop(esp32_wifi_iface);
} #endif
wifi_mgmt_raise_disconnect_result_event(esp32_wifi_iface, 0); wifi_mgmt_raise_disconnect_result_event(esp32_wifi_iface, 0);
} else { } else {
wifi_mgmt_raise_disconnect_result_event(esp32_wifi_iface, -1); wifi_mgmt_raise_disconnect_result_event(esp32_wifi_iface, -1);