Commit d5314df9 authored by Alessandro Rubini's avatar Alessandro Rubini

bmc: cleanup copy_d0()

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b25a249b
...@@ -74,21 +74,16 @@ void s1(struct pp_instance *ppi, MsgHeader *hdr, MsgAnnounce *ann) ...@@ -74,21 +74,16 @@ void s1(struct pp_instance *ppi, MsgHeader *hdr, MsgAnnounce *ann)
/* Copy local data set into header and ann message. 9.3.4 table 12. */ /* Copy local data set into header and ann message. 9.3.4 table 12. */
void copy_d0( struct pp_instance *ppi, MsgHeader *hdr, MsgAnnounce *ann) static void copy_d0( struct pp_instance *ppi, MsgHeader *hdr, MsgAnnounce *ann)
{ {
ann->grandmasterPriority1 = DSDEF(ppi)->priority1; struct DSDefault *defds = DSDEF(ppi);
memcpy(&ann->grandmasterIdentity, &DSDEF(ppi)->clockIdentity,
PP_CLOCK_IDENTITY_LENGTH); ann->grandmasterIdentity = defds->clockIdentity;
ann->grandmasterClockQuality.clockClass = ann->grandmasterClockQuality = defds->clockQuality;
DSDEF(ppi)->clockQuality.clockClass; ann->grandmasterPriority1 = defds->priority1;
ann->grandmasterClockQuality.clockAccuracy = ann->grandmasterPriority2 = defds->priority2;
DSDEF(ppi)->clockQuality.clockAccuracy;
ann->grandmasterClockQuality.offsetScaledLogVariance =
DSDEF(ppi)->clockQuality.offsetScaledLogVariance;
ann->grandmasterPriority2 = DSDEF(ppi)->priority2;
ann->stepsRemoved = 0; ann->stepsRemoved = 0;
memcpy(&hdr->sourcePortIdentity.clockIdentity, hdr->sourcePortIdentity.clockIdentity = defds->clockIdentity;
&DSDEF(ppi)->clockIdentity, PP_CLOCK_IDENTITY_LENGTH);
} }
......
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