Commit 97d91967 authored by baujc's avatar baujc

Fix compilation issues when PPSi compiled without HA.

parent 2f0a7c00
......@@ -306,7 +306,7 @@ int main(int argc, char **argv)
if (ppi->portDS) {
switch (ppi->cfg.profile) {
case PPSI_PROFILE_WR :
if ( CONFIG_HAS_PROFILE_WR ) {
#if CONFIG_HAS_PROFILE_WR
ppi->protocol_extension=PPSI_EXT_WR;
/* Add WR extension portDS */
if ( !(ppi->portDS->ext_dsport =
......@@ -321,13 +321,13 @@ int main(int argc, char **argv)
/* Set WR extension hooks */
ppi->ext_hooks=&wr_ext_hooks;
enable_asymmetryCorrection(ppi,ppi->cfg.asymmetryCorrectionEnable);
} else {
#else
fprintf(stderr, "ppsi: Profile WR not supported");
exit(1);
}
#endif
break;
case PPSI_PROFILE_HA :
if ( CONFIG_HAS_PROFILE_HA ) {
#if CONFIG_HAS_PROFILE_HA
if ( !enable_l1Sync(ppi,TRUE) )
goto exit_out_of_memory;
/* Force mandatory attributes - Do not take care of the configuration */
......@@ -338,10 +338,10 @@ int main(int argc, char **argv)
L1E_DSPOR_BS(ppi)->optParamsEnabled=FALSE;
enable_asymmetryCorrection(ppi,TRUE);
}
else {
#else
fprintf(stderr, "ppsi: Profile HA not supported");
exit(1);
}
#endif
break;
case PPSI_PROFILE_PTP :
/* Do not take care of L1SYNC */
......@@ -349,9 +349,9 @@ int main(int argc, char **argv)
ppi->protocol_extension=PPSI_EXT_NONE;
break;
case PPSI_PROFILE_CUSTOM :
if ( CONFIG_HAS_PROFILE_CUSTOM ) {
#if CONFIG_HAS_PROFILE_CUSTOM
ppi->protocol_extension=PPSI_EXT_NONE; /* can be changed ...*/
if ( CONFIG_HAS_EXT_L1SYNC ) {
#if CONFIG_HAS_EXT_L1SYNC
if (ppi->cfg.l1SyncEnabled ) {
if ( !enable_l1Sync(ppi,TRUE) )
goto exit_out_of_memory;
......@@ -366,10 +366,11 @@ int main(int argc, char **argv)
}
}
enable_asymmetryCorrection(ppi,ppi->cfg.asymmetryCorrectionEnable);
} else {
#endif
#else
fprintf(stderr, "ppsi: Profile CUSTOM not supported");
exit(1);
}
#endif
break;
}
/* Parameters profile independent */
......
......@@ -11,6 +11,10 @@
#include <libwr/shmem.h>
#include "../proto-standard/common-fun.h"
/* Define threshold values for SNMP */
#define SNMP_MAX_OFFSET_PS 500
#define SNMP_MAX_DELTA_RTT_PS 1000
static const char *wrh_servo_state_name[] = {
[WRH_UNINITIALIZED] = "Uninitialized",
[WRH_SYNC_NSEC] = "SYNC_NSEC",
......
......@@ -9,20 +9,5 @@
#ifndef __L1SYNC_EXT_CONSTANTS_H__
#define __L1SYNC_EXT_CONSTANTS_H__
/* Define threshold values for SNMP */
#define SNMP_MAX_OFFSET_PS 500
#define SNMP_MAX_DELTA_RTT_PS 1000
/* L1SYNC Servo */
enum {
L1E_UNINITIALIZED = 0,
L1E_SYNC_NSEC,
L1E_SYNC_TAI,
L1E_SYNC_PHASE,
L1E_TRACK_PHASE,
L1E_WAIT_OFFSET_STABLE,
};
#endif /* __L1SYNC_EXT_CONSTANTS_H__ */
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