Commit 2ec857c8 authored by Alessandro Rubini's avatar Alessandro Rubini

wrpc: allow a build without included "ptpdump"

This is needed for the wrpc-sw release, as Etherbone won't fit with
a full ppsi in the default RAM size for SPEC cards.

ptpdump support will soon become optional in ppsi, through Kconfig,
and a bigger RAM size will become the default for SPEC images as well.
But currently we need this hack.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 1668b65c
......@@ -57,9 +57,12 @@ static int wrpc_net_recv(struct pp_instance *ppi, void *pkt, int len,
t->raw_ahead = wr_ts.raw_ahead;
}
/* wrpc-sw may pass this in USER_CFLAGS, to remove footprint */
#ifndef CONFIG_NO_PTPDUMP
/* The header is separate, so dump payload only */
if (got > 0 && pp_diag_allow(ppi, frames, 2))
dump_payloadpkt("recv: ", pkt, got, t);
#endif
return got;
}
......@@ -87,9 +90,12 @@ static int wrpc_net_send(struct pp_instance *ppi, void *pkt, int len,
pp_diag(ppi, frames, 2, "%s: snt=%d, sec=%d, nsec=%d\n",
__func__, snt, t->seconds, t->nanoseconds);
}
/* wrpc-sw may pass this in USER_CFLAGS, to remove footprint */
#ifndef CONFIG_NO_PTPDUMP
/* The header is separate, so dump payload only */
if (snt >0 && pp_diag_allow(ppi, frames, 2))
dump_payloadpkt("send: ", pkt, len, t);
#endif
return snt;
}
......
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