Jiri Bohac
2013-05-15 15:29:12 UTC
Fix the check for supported timestamping modes. The device needs
to support all the required modes, not just any subset of them.
Signed-off-by: Jiri Bohac <***@suse.cz>
diff --git a/ptp4l.c b/ptp4l.c
index 3792375..ecaf9ed 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
/* check whether timestamping mode is supported. */
for (i = 0; i < cfg_settings.nports; i++) {
if (iface[i].ts_info.valid &&
- !(iface[0].ts_info.so_timestamping & required_modes)) {
+ ((iface[0].ts_info.so_timestamping & required_modes) != required_modes)) {
fprintf(stderr, "interface '%s' does not support "
"requested timestamping mode.\n",
iface[i].name);
to support all the required modes, not just any subset of them.
Signed-off-by: Jiri Bohac <***@suse.cz>
diff --git a/ptp4l.c b/ptp4l.c
index 3792375..ecaf9ed 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
/* check whether timestamping mode is supported. */
for (i = 0; i < cfg_settings.nports; i++) {
if (iface[i].ts_info.valid &&
- !(iface[0].ts_info.so_timestamping & required_modes)) {
+ ((iface[0].ts_info.so_timestamping & required_modes) != required_modes)) {
fprintf(stderr, "interface '%s' does not support "
"requested timestamping mode.\n",
iface[i].name);
--
Jiri Bohac <***@suse.cz>
SUSE Labs, SUSE CZ
Jiri Bohac <***@suse.cz>
SUSE Labs, SUSE CZ