Fix regression in one-step configuration.
We activate on-step mode based on the "time_stamping" and "twoStepFlag" configuration options. If twoStepFlag is false and HW time stamping is enabled, we upgrade the time stamping mode variable to one-step. The code that tests the options and sets the one-step mode moved from ptp4l.c into clock.c in commit 9b27664c ("clock: simplify the create method."). However, that commit inadvertently moved the test after the place where the time stamping mode is latched in a local variable. As a result, one-step mode is not activated when configured. This patch fixes the issue by keeping the local time stamping mode variable up to date during the one-step test. Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
parent
5e5c98b3da
commit
86ed2432f0
1
clock.c
1
clock.c
@ -898,6 +898,7 @@ struct clock *clock_create(enum clock_type type, struct config *config,
|
|||||||
"with hardware time stamping");
|
"with hardware time stamping");
|
||||||
return NULL;
|
return NULL;
|
||||||
case TS_HARDWARE:
|
case TS_HARDWARE:
|
||||||
|
timestamping = TS_ONESTEP;
|
||||||
if (config_set_int(config, "time_stamping", TS_ONESTEP))
|
if (config_set_int(config, "time_stamping", TS_ONESTEP))
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user