Commit f68c1ad4 authored by Alessandro Rubini's avatar Alessandro Rubini

wrpc: new socket allocation used

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b20f86cd
......@@ -13,6 +13,8 @@
/* This function should init the minic and get the mac address */
static int wrpc_open_ch(struct pp_instance *ppi)
{
/* we know we create one socket only in wrpc */
static struct wrpc_socket __static_ptp_socket;
struct wrpc_socket *sock;
mac_addr_t mac;
struct wr_sockaddr addr;
......@@ -20,7 +22,8 @@ static int wrpc_open_ch(struct pp_instance *ppi)
addr.ethertype = ETH_P_1588;
memcpy(addr.mac, PP_MCAST_MACADDRESS, sizeof(mac_addr_t));
sock = ptpd_netif_create_socket(PTPD_SOCK_RAW_ETHERNET, 0, &addr);
sock = ptpd_netif_create_socket(&__static_ptp_socket,
PTPD_SOCK_RAW_ETHERNET, 0, &addr);
if (!sock)
return -1;
......
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