Merge branch 'bugfix/lwip_dhcps_disabled_build' into 'master'

lfix build with CONFIG_LWIP_DHCPS disabled

See merge request espressif/esp-idf!17730
This commit is contained in:
Mahavir Jain
2022-04-11 21:08:17 +08:00
3 changed files with 5 additions and 0 deletions

View File

@@ -42,6 +42,8 @@ typedef struct {
/**
* @brief Get IP information for stations connected to the Wi-Fi AP interface
*
* @note If `CONFIG_LWIP_DHCPS` is disabled then `ip` address field will not be populated in sta list
*
* @warning This API works only for the default Wi-Fi AP interface, i.e. esp-netif with key="WIFI_AP_DEF"
*
* @param[in] wifi_sta_list Wi-Fi station info list, returned from esp_wifi_ap_get_sta_list()

View File

@@ -29,7 +29,9 @@ esp_err_t esp_netif_get_sta_list(const wifi_sta_list_t *wifi_sta_list, esp_netif
netif_sta_list->num = wifi_sta_list->num;
for (int i = 0; i < wifi_sta_list->num; i++) {
memcpy(netif_sta_list->sta[i].mac, wifi_sta_list->sta[i].mac, 6);
#if CONFIG_LWIP_DHCPS
dhcp_search_ip_on_mac(ap->dhcps, netif_sta_list->sta[i].mac, (ip4_addr_t*)&netif_sta_list->sta[i].ip);
#endif
}
return ESP_OK;

View File

@@ -2,3 +2,4 @@ CONFIG_EXAMPLE_IPV4=y
CONFIG_EXAMPLE_IPV6=n
CONFIG_EXAMPLE_CONNECT_IPV6=n
CONFIG_LWIP_IPV6=n
CONFIG_LWIP_DHCPS=n