Commit 30f148e8 authored by Tristan Gingold's avatar Tristan Gingold

wrpc-socket.c: replace ptpd_netif_get_hw_addr with a direct call

parent 4dc46ae2
......@@ -29,7 +29,7 @@ static DECLARE_WRPC_SOCKET(ptp_socket, 512);
static int wrpc_open_ch(struct pp_instance *ppi)
{
struct wrpc_socket *sock;
mac_addr_t mac;
const unsigned char *mac;
struct wr_sockaddr addr;
char *macaddr = PP_MCAST_MACADDRESS;
......@@ -43,10 +43,10 @@ static int wrpc_open_ch(struct pp_instance *ppi)
if (!sock)
return -1;
ptpd_netif_get_hw_addr(sock, &mac);
memcpy(ppi->ch[PP_NP_EVT].addr, &mac, sizeof(mac_addr_t));
mac = wrc_endpoint_dev.mac_addr;
memcpy(ppi->ch[PP_NP_EVT].addr, mac, sizeof(mac_addr_t));
ppi->ch[PP_NP_EVT].custom = sock;
memcpy(ppi->ch[PP_NP_GEN].addr, &mac, sizeof(mac_addr_t));
memcpy(ppi->ch[PP_NP_GEN].addr, mac, sizeof(mac_addr_t));
ppi->ch[PP_NP_GEN].custom = sock;
return 0;
......
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