Commit 0ad2eb51 authored by Alessandro Rubini's avatar Alessandro Rubini

pdelay: removed redundant field in ppi

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 6cbba4d7
......@@ -174,7 +174,6 @@ struct pp_instance {
UInteger16 sent_seq[__PP_NR_MESSAGES_TYPES]; /* last sent this type */
MsgHeader received_ptp_header;
MsgHeader pdelay_req_hdr;
char *iface_name; /* for direct actions on hardware */
char *port_name; /* for diagnostics, mainly */
......
......@@ -74,10 +74,9 @@ static int wr_listening(struct pp_instance *ppi, unsigned char *pkt, int plen)
static int wr_handle_preq(struct pp_instance *ppi)
{
msg_copy_header(&ppi->pdelay_req_hdr, &ppi->received_ptp_header);
ppi->pdelay_req_hdr.correctionfield.msb = 0;
ppi->pdelay_req_hdr.correctionfield.lsb =
phase_to_cf_units(ppi->last_rcv_time.phase);
ppi->received_ptp_header.correctionfield.msb = 0;
ppi->received_ptp_header.correctionfield.lsb =
phase_to_cf_units(ppi->last_rcv_time.phase);
msg_issue_pdelay_resp(ppi, &ppi->last_rcv_time);
msg_issue_pdelay_resp_followup(ppi, &ppi->last_snt_time);
......
......@@ -233,7 +233,6 @@ int st_com_peer_handle_preq(struct pp_instance *ppi, unsigned char *buf,
if (len < PP_PDELAY_REQ_LENGTH)
return -1;
msg_copy_header(&ppi->pdelay_req_hdr, &ppi->received_ptp_header);
msg_issue_pdelay_resp(ppi, &ppi->last_rcv_time);
msg_issue_pdelay_resp_followup(ppi, &ppi->last_snt_time);
......
......@@ -517,7 +517,7 @@ int msg_issue_pdelay_resp_followup(struct pp_instance *ppi, TimeInternal * time)
Timestamp prec_orig_tstamp;
from_TimeInternal(time, &prec_orig_tstamp);
msg_pack_pdelay_resp_follow_up(ppi, &ppi->pdelay_req_hdr,
msg_pack_pdelay_resp_follow_up(ppi, &ppi->received_ptp_header,
&prec_orig_tstamp);
return __send_and_log(ppi, PP_PDELAY_RESP_FOLLOW_UP_LENGTH,
......@@ -570,7 +570,7 @@ int msg_issue_pdelay_resp(struct pp_instance *ppi, TimeInternal * time)
Timestamp rcv_tstamp;
from_TimeInternal(time, &rcv_tstamp);
msg_pack_pdelay_resp(ppi, &ppi->pdelay_req_hdr, &rcv_tstamp);
msg_pack_pdelay_resp(ppi, &ppi->received_ptp_header, &rcv_tstamp);
return __send_and_log(ppi, PP_PDELAY_RESP_LENGTH, PPM_PDELAY_RESP,
PP_NP_EVT);
......
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