summaryrefslogtreecommitdiff
path: root/net/lwip/net-lwip.c
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2025-05-30 08:38:22 -0700
committerJerome Forissier <jerome.forissier@linaro.org>2025-07-08 09:53:59 +0200
commit08a8d1455a0f5f3ac7c2692a0b9ae6e98aea0291 (patch)
tree40838ea5c451388cd1e9d75ff92be204f8bbf556 /net/lwip/net-lwip.c
parentb379335f141e3ddca0cdbb5d9d39af0444530542 (diff)
net: lwip: call sys_check_timeouts and schedule on rx
Call schedule() in net_lwip_rx() to service U-Boot tasks and actions during packet rx. As a cleanup also move sys_check_timeouts() here and remove it from the functions that call net_lwip_rx(). This resolves the issue of an active watchdog resetting the board on long network activities. Suggested-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Diffstat (limited to 'net/lwip/net-lwip.c')
-rw-r--r--net/lwip/net-lwip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
index abc52b32049..ff4d634d1d1 100644
--- a/net/lwip/net-lwip.c
+++ b/net/lwip/net-lwip.c
@@ -14,8 +14,10 @@
#include <lwip/etharp.h>
#include <lwip/init.h>
#include <lwip/prot/etharp.h>
+#include <lwip/timeouts.h>
#include <net.h>
#include <timer.h>
+#include <u-boot/schedule.h>
/* xx:xx:xx:xx:xx:xx\0 */
#define MAC_ADDR_STRLEN 18
@@ -285,6 +287,11 @@ int net_lwip_rx(struct udevice *udev, struct netif *netif)
int len;
int i;
+ /* lwIP timers */
+ sys_check_timeouts();
+ /* Other tasks and actions */
+ schedule();
+
if (!eth_is_active(udev))
return -EINVAL;