projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dm: Expand and complete Kconfig in drivers/
[oweals/u-boot.git]
/
net
/
sntp.c
diff --git
a/net/sntp.c
b/net/sntp.c
index 69cddb16b5c053ae278ade14bf412161eb8016ff..5de19526e6394b213cd2204d594026d6201a5175 100644
(file)
--- a/
net/sntp.c
+++ b/
net/sntp.c
@@
-31,7
+31,7
@@
SntpSend(void)
pkt.vn = NTP_VERSION;
pkt.mode = NTP_MODE_CLIENT;
pkt.vn = NTP_VERSION;
pkt.mode = NTP_MODE_CLIENT;
- memcpy((char *)NetTxPacket + NetEthHdrSize() + IP_HDR_SIZE,
+ memcpy((char *)NetTxPacket + NetEthHdrSize() + IP_
UDP_
HDR_SIZE,
(char *)&pkt, pktlen);
SntpOurPort = 10000 + (get_timer(0) % 4096);
(char *)&pkt, pktlen);
SntpOurPort = 10000 + (get_timer(0) % 4096);
@@
-45,7
+45,7
@@
static void
SntpTimeout(void)
{
puts("Timeout\n");
SntpTimeout(void)
{
puts("Timeout\n");
-
NetState = NETLOOP_FAIL
;
+
net_set_state(NETLOOP_FAIL)
;
return;
}
return;
}
@@
-76,7
+76,7
@@
SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
tm.tm_year, tm.tm_mon, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
tm.tm_year, tm.tm_mon, tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
-
NetState = NETLOOP_SUCCESS
;
+
net_set_state(NETLOOP_SUCCESS)
;
}
void
}
void
@@
-85,7
+85,7
@@
SntpStart(void)
debug("%s\n", __func__);
NetSetTimeout(SNTP_TIMEOUT, SntpTimeout);
debug("%s\n", __func__);
NetSetTimeout(SNTP_TIMEOUT, SntpTimeout);
-
NetSetH
andler(SntpHandler);
+
net_set_udp_h
andler(SntpHandler);
memset(NetServerEther, 0, sizeof(NetServerEther));
SntpSend();
memset(NetServerEther, 0, sizeof(NetServerEther));
SntpSend();