If the watchdog frequency is changed from high to low,
the watchdog won't be tickled again until the previous
period has expired, which may result in a watchdog timeout.
This change ensures that the new frequency is applied immediately.

Signed-off-by: Michael Jones <m...@meshplusplus.com>
---
 watchdog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/watchdog.c b/watchdog.c
index 20b6e20..20830c3 100644
--- a/watchdog.c
+++ b/watchdog.c
@@ -140,6 +140,7 @@ int watchdog_frequency(int frequency)
     if (frequency) {
         DEBUG(4, "Set watchdog frequency: %ds\n", frequency);
         wdt_frequency = frequency;
+        watchdog_timeout_cb(&wdt_timeout);
     }
 
     return wdt_frequency;
-- 
2.26.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to