Commit ba69f77a authored by hongming's avatar hongming

remote tcpip module config as golden image has no tcpip module.

parent 13801408
......@@ -12,8 +12,7 @@ obj-$(CONFIG_EMBEDDED_NODE) += \
dev/sfp.o \
dev/devicelist.o \
dev/rxts_calibrator.o \
dev/flash.o\
dev/tcpip_config.o
dev/flash.o
obj-$(CONFIG_WR_NODE) += \
dev/temperature.o \
......
......@@ -14,7 +14,6 @@
#include "ipv4.h"
#include "ptpd_netif.h"
#include "arp.h"
#include "tcpip_config.h"
static uint8_t __arp_queue[128];
static struct wrpc_socket __static_arp_socket = {
......@@ -78,15 +77,6 @@ static int process_arp(uint8_t * buf, int len)
return ARP_END;
}
tcpip_get_hisIP(hisIP);
if ( ((buf[ARP_OPER + 1] != 2)||memcmp(buf + ARP_SPA, hisIP, 4)) == 0 )
{
memcpy(hisMAC, buf + ARP_SHA, 6);
tcpip_set_hisMAC(hisMAC);
tcpip_get_hisMAC(hisMAC);
tcpip_status = TCPIP_OK;
}
return 0;
}
......@@ -99,11 +89,6 @@ static int arp_poll(void)
if (ip_status == IP_TRAINING)
return 0; /* can't do ARP w/o an address... */
if ((tcpip_status == TCPIP_ARP) && arp_count < 200)
{
tcpip_arp();
arp_count++;
}
if ((len = ptpd_netif_recvfrom(arp_socket,
&addr, buf, sizeof(buf), 0)) > 0) {
if ((len = process_arp(buf, len)) > 0)
......
......@@ -16,7 +16,6 @@
#include "pps_gen.h"
#include "hw/memlayout.h"
#include "hw/etherbone-config.h"
#include "tcpip_config.h"
#include "flash.h"
enum ip_status ip_status = IP_TRAINING;
......@@ -305,18 +304,6 @@ void setIP(unsigned char *IP)
memcpy(myIP, IP, 4);
// tcpip module, default IP
tcpip_ip_addr(IP);
// tcpip module, default gateway
memcpy(tmp, IP, 3);
tmp[3]=0x01;
tcpip_gateway_addr(tmp);
tcpip_set_hisIP(tmp);
// tcpip module, default subnet mask
tmp[0]=0xff;tmp[1]=0xff;tmp[2]=0xff;tmp[3]=0x00;
tcpip_subnet_addr(tmp);
bootp_retry = 0;
}
......
......@@ -19,7 +19,7 @@ obj-$(CONFIG_EMBEDDED_NODE) += \
shell/cmd_ptrack.o \
obj-$(CONFIG_IP) += shell/cmd_ip.o shell/cmd_tcpip.o
obj-$(CONFIG_IP) += shell/cmd_ip.o
obj-$(CONFIG_PPSI) += shell/cmd_verbose.o
obj-$(CONFIG_CMD_CONFIG) += shell/cmd_config.o
obj-$(CONFIG_CMD_SLEEP) += shell/cmd_sleep.o
......
......@@ -91,7 +91,7 @@ static void wrc_initialize(void)
net_rst();
ep_init(mac_addr);
tcpip_init(mac_addr);
/* Sleep for 1s to make sure WRS v4.2 always realizes that
* the link is down */
timer_delay_ms(200);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment