summaryrefslogtreecommitdiff
path: root/net/sntp.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 01:41:01 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:32 -0600
commit049a95a7759c0e384c1fc7b8575d968d56a33997 (patch)
treec3d30763163e2e67324ebc8f54d6d84d1d8f9c8a /net/sntp.c
parent2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff)
downloadu-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.zip
u-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.gz
u-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.bz2
net: cosmetic: Change IPaddr_t to struct in_addr
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/sntp.c')
-rw-r--r--net/sntp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/sntp.c b/net/sntp.c
index 5de1952..3e45a83 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -37,8 +37,8 @@ SntpSend(void)
SntpOurPort = 10000 + (get_timer(0) % 4096);
sport = NTP_SERVICE_PORT;
- NetSendUDPPacket(NetServerEther, NetNtpServerIP, sport, SntpOurPort,
- pktlen);
+ NetSendUDPPacket(NetServerEther, net_ntp_server, sport, SntpOurPort,
+ pktlen);
}
static void
@@ -49,9 +49,8 @@ SntpTimeout(void)
return;
}
-static void
-SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
- unsigned len)
+static void sntp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
+ unsigned src, unsigned len)
{
struct sntp_pkt_t *rpktp = (struct sntp_pkt_t *)pkt;
struct rtc_time tm;
@@ -85,7 +84,7 @@ SntpStart(void)
debug("%s\n", __func__);
NetSetTimeout(SNTP_TIMEOUT, SntpTimeout);
- net_set_udp_handler(SntpHandler);
+ net_set_udp_handler(sntp_handler);
memset(NetServerEther, 0, sizeof(NetServerEther));
SntpSend();