Commit eb20ca4b authored by li hongming's avatar li hongming

Solve re-connect sync bug when CUTE-WR-DP acting as slave.

parent 1770583a
......@@ -42,7 +42,7 @@ void spll_log_dac(int y)
static void daclog_init(void)
{
daclog_socket = ptpd_netif_create_socket(&__static_daclog_socket, NULL,
PTPD_SOCK_UDP, 1050);
PTPD_SOCK_UDP, 1050, 0);
daclog_addr.sport = daclog_addr.dport = htons(1050);
}
......
......@@ -35,7 +35,7 @@ static void arp_init(void)
saddr.ethertype = htons(0x0806); /* ARP */
for(port = 0; port<wr_num_ports; ++port)
arp_socket[port] = ptpd_netif_create_socket(&__static_arp_socket, &saddr,
arp_socket[port] = ptpd_netif_create_socket(&__static_arp_socket[port], &saddr,
PTPD_SOCK_RAW_ETHERNET, 0, port);
}
......
......@@ -89,7 +89,7 @@ static void ipv4_init(void)
/* Bootp: use UDP engine activated by function arguments */
for (port=0; port < wr_num_ports; ++port) {
bootp_socket[port] = ptpd_netif_create_socket(&__static_bootp_socket[0], NULL,
bootp_socket[port] = ptpd_netif_create_socket(&__static_bootp_socket[port], NULL,
PTPD_SOCK_UDP, 68 /* bootpc */, port);
}
......@@ -105,7 +105,7 @@ static void ipv4_init(void)
memset(&saddr, 0, sizeof(saddr));
saddr.ethertype = htons(0x0800);
for (port=0; port < wr_num_ports; ++port) {
icmp_socket[port] = ptpd_netif_create_socket(&__static_icmp_socket[0], &saddr,
icmp_socket[port] = ptpd_netif_create_socket(&__static_icmp_socket[port], &saddr,
PTPD_SOCK_RAW_ETHERNET, 0, port);
}
syslog_init();
......
......@@ -496,12 +496,12 @@ static int update_dp_rx_queues(void)
DEFINE_WRC_TASK(net_bh) = {
.name = "net-bh",
.enable = &link_status[0],
.enable = &(link_status[0]),
.job = update_rx_queues,
};
DEFINE_WRC_TASK(dp_net_bh) = {
.name = "dp-net-bh",
.enable = &link_status[1],
.enable = &(link_status[1]),
.job = update_dp_rx_queues,
};
\ No newline at end of file
ppsi @ 4e567b8e
Subproject commit 19a8c5ae448860b527e0da10d8b80d152dfaa6aa
Subproject commit 4e567b8e8497488f2a919b27d21209af0a613840
......@@ -174,12 +174,6 @@ static int wrc_check_link(void)
sfp_match(port);
wrc_ptp_start(port);
link_status[port] = LINK_WENT_UP;
/* special case */
if (port==0)
{
spll_init(SPLL_MODE_SLAVE, 0, 1);
shw_pps_gen_unmask_output(0);
}
rv = 1;
} else if (prev_state[port] && !state[port]) {
wrc_verbose("Port %d Link down.\n",port);
......
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