Commit b5fb56a3 authored by Alessandro Rubini's avatar Alessandro Rubini

time-wrpc: fix endianness in ethtype

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <>
parent 08bc1684
......@@ -31,7 +31,7 @@ static int wrpc_open_ch(struct pp_instance *ppi)
if (ppi->mech == PP_P2P_MECH)
addr.ethertype = ETH_P_1588;
addr.ethertype = htons(ETH_P_1588);
memcpy(addr.mac, macaddr, sizeof(mac_addr_t));
sock = ptpd_netif_create_socket(&__static_ptp_socket, &addr,
......@@ -96,7 +96,7 @@ static int wrpc_net_send(struct pp_instance *ppi, void *pkt, int len,
sock = ppi->ch[PP_NP_EVT].custom;
addr.ethertype = ETH_P_1588;
addr.ethertype = htons(ETH_P_1588);
memcpy(&addr.mac, macaddr[is_pdelay], sizeof(mac_addr_t));
snt = ptpd_netif_sendto(sock, &addr, pkt, len, &wr_ts);
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