Skip to content

Commit 4f92fbf

Browse files
committed
fix(aft_netif): Made Ethernet common connect working
1 parent fa19983 commit 4f92fbf

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

components/freertos_tcp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ idf_component_register(SRCS ${fpt_srcs}
5353
port/FreeRTOSIPConfig.c
5454
port/NetworkInterface.c
5555
port/FreeRTOS_AppHooks.c
56-
esp_netif/defaults.c
5756
esp_netif/interface.c
5857
esp_netif/esp_netif_impl.c
5958
INCLUDE_DIRS "port/include" ${fpt_include_dir} ${fdir}

components/freertos_tcp/esp_netif/defaults.c

Lines changed: 0 additions & 16 deletions
This file was deleted.

components/freertos_tcp/esp_netif/esp_netif_impl.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,22 @@ esp_err_t esp_netif_tcpip_exec(esp_netif_callback_fn fn, void *ctx)
482482
return fn(ctx);
483483
}
484484

485+
esp_netif_t *esp_netif_find_if(esp_netif_find_predicate_t fn, void *ctx)
486+
{
487+
for (NetworkInterface_t *netif = FreeRTOS_FirstNetworkInterface(); netif != NULL; netif = FreeRTOS_NextNetworkInterface(netif) ) {
488+
esp_netif_t *esp_netif = netif->pvArgument;
489+
if (fn(esp_netif, ctx)) {
490+
return esp_netif;
491+
}
492+
}
493+
return NULL;
494+
}
495+
496+
esp_err_t esp_netif_set_link_speed(esp_netif_t *esp_netif, uint32_t speed)
497+
{
498+
return ESP_OK;
499+
}
500+
485501
/* Called by FreeRTOS+TCP when the network connects or disconnects. Disconnect
486502
* events are only received if implemented in the MAC driver. */
487503
void vApplicationIPNetworkEventHook_Multi( eIPCallbackEvent_t eNetworkEvent,

components/freertos_tcp/esp_netif/interface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ static const struct esp_netif_netstack_config s_netif_config = {
4747

4848
const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_sta = &s_netif_config;
4949
const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_wifi_ap = &s_netif_config;
50+
const esp_netif_netstack_config_t *_g_esp_netif_netstack_default_eth = &s_netif_config;

0 commit comments

Comments
 (0)