]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/sntp.c
cpuat91: update defaut environement
[karo-tx-uboot.git] / net / sntp.c
index 95e75422c107dcdbd9eb8f25f021c0d21ba77e4a..76c10ecd3b5d4565c684d155659e5a2036636860 100644 (file)
@@ -12,9 +12,7 @@
 
 #include "sntp.h"
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_SNTP)
-
-#define SNTP_TIMEOUT 10
+#define SNTP_TIMEOUT 10000UL
 
 static int SntpOurPort;
 
@@ -25,7 +23,7 @@ SntpSend (void)
        int pktlen = SNTP_PACKET_LEN;
        int sport;
 
-       debug ("%s\n", __FUNCTION__);
+       debug("%s\n", __func__);
 
        memset (&pkt, 0, sizeof(pkt));
 
@@ -56,7 +54,7 @@ SntpHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
        struct rtc_time tm;
        ulong seconds;
 
-       debug ("%s\n", __FUNCTION__);
+       debug("%s\n", __func__);
 
        if (dest != SntpOurPort) return;
 
@@ -80,13 +78,11 @@ SntpHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
 void
 SntpStart (void)
 {
-       debug ("%s\n", __FUNCTION__);
+       debug("%s\n", __func__);
 
-       NetSetTimeout (SNTP_TIMEOUT * CFG_HZ, SntpTimeout);
+       NetSetTimeout (SNTP_TIMEOUT, SntpTimeout);
        NetSetHandler(SntpHandler);
        memset (NetServerEther, 0, 6);
 
        SntpSend ();
 }
-
-#endif