aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2011-06-14 19:55:20 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-16 23:48:12 -0400
commitae6e86b7fb15520ac64513ad643de63e0b077aa5 (patch)
tree6de775cb23016792e18428f0266b0e5b662f02a3 /drivers/net/phy
parent2331038a96ecdad76c50ab223fd48d656d8a1184 (diff)
dp83640: drop PHY status frames in the driver.
The dp83640 PHY provides time stamp and other information via special PHY status frames. Previously, the driver decoded the frames and then let the network stack drop them. This works fine when the PTP messages come over UDP. However, when receiving PTP messages via L2 packets, this creates a problem. The status frames use the official PTP destination MAC address, and so they are delivered to user space along with the "real" frames, causing confusion for applications. This commit fixes the issue by simply dropping the PHY status frames in the driver. Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/dp83640.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index ead323e56739..2cd8dc5847b4 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1044,8 +1044,8 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
1044 1044
1045 if (is_status_frame(skb, type)) { 1045 if (is_status_frame(skb, type)) {
1046 decode_status_frame(dp83640, skb); 1046 decode_status_frame(dp83640, skb);
1047 /* Let the stack drop this frame. */ 1047 kfree_skb(skb);
1048 return false; 1048 return true;
1049 } 1049 }
1050 1050
1051 SKB_PTP_TYPE(skb) = type; 1051 SKB_PTP_TYPE(skb) = type;