summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorStefan Sørensen <stefan.sorensen@spectralink.com>2014-06-25 14:40:16 +0200
committerDavid S. Miller <davem@davemloft.net>2014-07-09 17:00:34 -0700
commita12f78c582b5a7a549fbee1a58d5778e651764ad (patch)
tree98d8c80ce14117d6079417e5d9aba8757982c75d /drivers/net/phy
parentb51ecea852b712618796d9eab8428a7d5f1f106f (diff)
downloadblackbird-op-linux-a12f78c582b5a7a549fbee1a58d5778e651764ad.tar.gz
blackbird-op-linux-a12f78c582b5a7a549fbee1a58d5778e651764ad.zip
dp83640: Always decode received status frames
Currently status frames are only handled when packet timestamping is enabled, but status frames are also needed for pin event timestamping. Fix by moving packet timestamping check to after status frame decode. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/dp83640.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 6a999e6814a0..9408157a246c 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1323,15 +1323,15 @@ static bool dp83640_rxtstamp(struct phy_device *phydev,
{
struct dp83640_private *dp83640 = phydev->priv;
- if (!dp83640->hwts_rx_en)
- return false;
-
if (is_status_frame(skb, type)) {
decode_status_frame(dp83640, skb);
kfree_skb(skb);
return true;
}
+ if (!dp83640->hwts_rx_en)
+ return false;
+
SKB_PTP_TYPE(skb) = type;
skb_queue_tail(&dp83640->rx_queue, skb);
schedule_work(&dp83640->ts_work);
OpenPOWER on IntegriCloud