Commit 651c814f authored by Christian Eggers's avatar Christian Eggers Committed by Jakub Kicinski

net: phy: dp83640: use new PTP_MSGTYPE_SYNC define

Replace use of magic number with recently introduced define.
Signed-off-by: default avatarChristian Eggers <ceggers@arri.de>
Reviewed-by: Kurt Kanzenbach's avatarKurt Kanzenbach <kurt@linutronix.de>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 06254738
...@@ -972,15 +972,12 @@ static void decode_status_frame(struct dp83640_private *dp83640, ...@@ -972,15 +972,12 @@ static void decode_status_frame(struct dp83640_private *dp83640,
static int is_sync(struct sk_buff *skb, int type) static int is_sync(struct sk_buff *skb, int type)
{ {
struct ptp_header *hdr; struct ptp_header *hdr;
u8 msgtype;
hdr = ptp_parse_header(skb, type); hdr = ptp_parse_header(skb, type);
if (!hdr) if (!hdr)
return 0; return 0;
msgtype = ptp_get_msgtype(hdr, type); return ptp_get_msgtype(hdr, type) == PTP_MSGTYPE_SYNC;
return (msgtype & 0xf) == 0;
} }
static void dp83640_free_clocks(void) static void dp83640_free_clocks(void)
......
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