mmc: omap: don't set wrong voltage select for mmc2
[pandora-u-boot.git] / net / sntp.c
index 69cddb1..5de1952 100644 (file)
@@ -31,7 +31,7 @@ SntpSend(void)
        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);
@@ -45,7 +45,7 @@ static void
 SntpTimeout(void)
 {
        puts("Timeout\n");
-       NetState = NETLOOP_FAIL;
+       net_set_state(NETLOOP_FAIL);
        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);
 
-       NetState = NETLOOP_SUCCESS;
+       net_set_state(NETLOOP_SUCCESS);
 }
 
 void
@@ -85,7 +85,7 @@ SntpStart(void)
        debug("%s\n", __func__);
 
        NetSetTimeout(SNTP_TIMEOUT, SntpTimeout);
-       NetSetHandler(SntpHandler);
+       net_set_udp_handler(SntpHandler);
        memset(NetServerEther, 0, sizeof(NetServerEther));
 
        SntpSend();