Commit 600e9942 authored by Aurelio Colosimo's avatar Aurelio Colosimo Committed by Alessandro Rubini

wrc_ptp_ppsi.c: fix alignment of incoming packets buffer

Due to previous implementation of net functions, packet buffer address was
badly aligned.
Signed-off-by: Aurelio Colosimo's avatarAurelio Colosimo <aurelio@aureliocolosimo.it>
parent cead1712
......@@ -165,15 +165,13 @@ int wrc_ptp_update()
struct pp_instance *ppi = &ppi_static;
if (ptp_enabled) {
static unsigned char _packet[500];
/* FIXME Alignment */
unsigned char *packet = _packet + 2;
static unsigned char packet[500];
/*
* We got a packet. If it's not ours, continue consuming
* the pending timeout
*/
i = spec_recv_packet(ppi, packet, sizeof(_packet),
i = spec_recv_packet(ppi, packet, sizeof(packet),
&ppi->last_rcv_time);
if ((!i) && (timer_get_tics() - start_tics < delay_ms))
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