Skip to content

Commit

Permalink
dp83640: drop PHY status frames in the driver.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Cochran authored and David S. Miller committed Jun 17, 2011
1 parent 2331038 commit ae6e86b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/phy/dp83640.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,8 +1044,8 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,

if (is_status_frame(skb, type)) {
decode_status_frame(dp83640, skb);
/* Let the stack drop this frame. */
return false;
kfree_skb(skb);
return true;
}

SKB_PTP_TYPE(skb) = type;
Expand Down

0 comments on commit ae6e86b

Please sign in to comment.