net: extract function net_sntp_set_rtc() from sntp_handler()
authorJerome Forissier <jerome.forissier@linaro.org>
Wed, 25 Jun 2025 13:19:18 +0000 (15:19 +0200)
committerJerome Forissier <jerome.forissier@linaro.org>
Tue, 8 Jul 2025 09:07:37 +0000 (11:07 +0200)
commit77f0bed326b658fcb57f278bd5228afbe382401a
tree8edaf288f7ffc8b634884075e0c720892b917c14
parentab1fdb5436a33da35db2730ca66e6914dd9d5f4c
net: extract function net_sntp_set_rtc() from sntp_handler()

Extract the code that sets the RTC clock from sntp_handler() in
net/sntp.c and make it a new function net_sntp_set_rtc() in
net/net-common.c. This will allow re-use with NET_LWIP.

According to [1] it is safe to assume that all devices have been
converted to DM_RTC so drop the useless code.

[1] https://lists.denx.de/pipermail/u-boot/2025-June/591376.html

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
include/net-common.h
net/net-common.c
net/sntp.c