From ebe6a24bd75b104c4ac8e2766b49398200ce1064 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Thu, 25 Oct 2012 21:02:34 +0200 Subject: [PATCH] Remove useless option selecting layer 2 time stamping. Now that the code automatically falls back to transport-specific time stamping, this option is no longer needed. Signed-off-by: Richard Cochran Acked-by: Jacob Keller Tested-by: Jiri Benc --- config.c | 4 ---- config.h | 1 - default.cfg | 1 - gPTP.cfg | 1 - ptp4l.c | 1 - sk.c | 2 +- sk.h | 6 ------ 7 files changed, 1 insertion(+), 15 deletions(-) diff --git a/config.c b/config.c index ef02880..6444108 100644 --- a/config.c +++ b/config.c @@ -209,10 +209,6 @@ static void scan_global_line(const char *s, struct config *cfg) if (val > 0) *cfg->tx_timestamp_retries = val; - } else if (1 == sscanf(s, " rx_timestamp_l2only %u", &val)) { - - *cfg->rx_timestamp_l2only = val ? 1 : 0; - } else if (1 == sscanf(s, " pi_proportional_const %lf", &df)) { if (df > 0.0 && df < 1.0) diff --git a/config.h b/config.h index 8840b41..7cffc32 100644 --- a/config.h +++ b/config.h @@ -60,7 +60,6 @@ struct config { struct port_defaults pod; int *assume_two_step; int *tx_timestamp_retries; - int *rx_timestamp_l2only; enum servo_type clock_servo; diff --git a/default.cfg b/default.cfg index 9c3bc32..189ef5a 100644 --- a/default.cfg +++ b/default.cfg @@ -28,7 +28,6 @@ logging_level 6 path_trace_enabled 0 follow_up_info 0 tx_timestamp_retries 2 -rx_timestamp_l2only 0 use_syslog 1 verbose 0 # diff --git a/gPTP.cfg b/gPTP.cfg index 07cc2c2..84ac1c0 100644 --- a/gPTP.cfg +++ b/gPTP.cfg @@ -27,7 +27,6 @@ logging_level 6 path_trace_enabled 1 follow_up_info 1 tx_timestamp_retries 2 -rx_timestamp_l2only 1 use_syslog 1 verbose 0 # diff --git a/ptp4l.c b/ptp4l.c index da82774..bc2bc24 100644 --- a/ptp4l.c +++ b/ptp4l.c @@ -68,7 +68,6 @@ static struct config cfg_settings = { .assume_two_step = &assume_two_step, .tx_timestamp_retries = &sk_tx_retries, - .rx_timestamp_l2only = &sk_prefer_layer2, .clock_servo = CLOCK_SERVO_PI, diff --git a/sk.c b/sk.c index 8c9b9fa..2fa9ac0 100644 --- a/sk.c +++ b/sk.c @@ -32,7 +32,7 @@ /* globals */ -int sk_tx_retries = 2, sk_prefer_layer2 = 0; +int sk_tx_retries = 2; /* private methods */ diff --git a/sk.h b/sk.h index b6ce88c..671e839 100644 --- a/sk.h +++ b/sk.h @@ -76,10 +76,4 @@ int sk_timestamping_init(int fd, char *device, enum timestamp_type type, */ extern int sk_tx_retries; -/** - * Request the hardware receive filter that is limited to layer 2 time - * stamping. - */ -extern int sk_prefer_layer2; - #endif