Skip to content

Commit

Permalink
Merge branch 'fix/mesh_netif_without_dhcps' into 'master'
Browse files Browse the repository at this point in the history
fix(wifi): Make DHCP server API calls only if available

Closes IDFGH-13061

See merge request espressif/esp-idf!31669
  • Loading branch information
david-cermak committed Jun 27, 2024
2 parents 5acaa74 + c6c980b commit 92b4231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/esp_wifi/src/wifi_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,10 @@ esp_err_t esp_netif_create_default_wifi_mesh_netifs(esp_netif_t **p_netif_sta, e
ESP_ERROR_CHECK(esp_netif_attach_wifi_ap(netif_ap));
ESP_ERROR_CHECK(esp_wifi_set_default_wifi_ap_handlers());

#ifdef CONFIG_LWIP_DHCPS
// ...and stop DHCP server to keep the ESP_NETIF_DHCP_STOPPED state
ESP_ERROR_CHECK(esp_netif_dhcps_stop(netif_ap));
#endif

// Create "almost" default station, but with un-flagged DHCP client
memcpy(&netif_cfg, ESP_NETIF_BASE_DEFAULT_WIFI_STA, sizeof(netif_cfg));
Expand Down

0 comments on commit 92b4231

Please sign in to comment.