diff options
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r-- | drivers/net/phy/dp83640.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 2954052706e8..e22e602beef3 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c | |||
@@ -791,7 +791,7 @@ static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts) | |||
791 | 791 | ||
792 | switch (type & PTP_CLASS_PMASK) { | 792 | switch (type & PTP_CLASS_PMASK) { |
793 | case PTP_CLASS_IPV4: | 793 | case PTP_CLASS_IPV4: |
794 | offset += ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN; | 794 | offset += ETH_HLEN + IPV4_HLEN(data + offset) + UDP_HLEN; |
795 | break; | 795 | break; |
796 | case PTP_CLASS_IPV6: | 796 | case PTP_CLASS_IPV6: |
797 | offset += ETH_HLEN + IP6_HLEN + UDP_HLEN; | 797 | offset += ETH_HLEN + IP6_HLEN + UDP_HLEN; |
@@ -934,7 +934,7 @@ static int is_sync(struct sk_buff *skb, int type) | |||
934 | 934 | ||
935 | switch (type & PTP_CLASS_PMASK) { | 935 | switch (type & PTP_CLASS_PMASK) { |
936 | case PTP_CLASS_IPV4: | 936 | case PTP_CLASS_IPV4: |
937 | offset += ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN; | 937 | offset += ETH_HLEN + IPV4_HLEN(data + offset) + UDP_HLEN; |
938 | break; | 938 | break; |
939 | case PTP_CLASS_IPV6: | 939 | case PTP_CLASS_IPV6: |
940 | offset += ETH_HLEN + IP6_HLEN + UDP_HLEN; | 940 | offset += ETH_HLEN + IP6_HLEN + UDP_HLEN; |