As of 510777deca1d message layer no longer returns -ETIME.  Callers of
msg_post_recv() are expected to check for missing time stamps themselves.
This patch updates the two forgotten call sites.

Fixes: 510777deca1d ("msg: Move the check for missing HW time stamps into 
caller.")

Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 nsm.c        | 9 +++++----
 pmc_common.c | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/nsm.c b/nsm.c
index 0fb73fb..cefea5d 100644
--- a/nsm.c
+++ b/nsm.c
@@ -337,16 +337,17 @@ static struct ptp_message *nsm_recv(struct nsm *nsm, int 
fd)
                case -EBADMSG:
                        pr_err("bad message");
                        break;
-               case -ETIME:
-                       pr_err("received %s without timestamp",
-                              msg_type_string(msg_type(msg)));
-                       break;
                case -EPROTO:
                        pr_debug("ignoring message");
                        break;
                }
                goto failed;
        }
+       if (msg_sots_missing(msg)) {
+               pr_err("received %s without timestamp",
+                      msg_type_string(msg_type(msg)));
+               goto failed;
+       }
 
        return msg;
 failed:
diff --git a/pmc_common.c b/pmc_common.c
index d1eafe7..fcb9c8e 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -326,16 +326,17 @@ struct ptp_message *pmc_recv(struct pmc *pmc)
                case -EBADMSG:
                        pr_err("bad message");
                        break;
-               case -ETIME:
-                       pr_err("received %s without timestamp",
-                                       msg_type_string(msg_type(msg)));
-                       break;
                case -EPROTO:
                        pr_debug("ignoring message");
                        break;
                }
                goto failed;
        }
+       if (msg_sots_missing(msg)) {
+               pr_err("received %s without timestamp",
+                      msg_type_string(msg_type(msg)));
+               goto failed;
+       }
 
        return msg;
 failed:
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to