dp83640: use proper function to free transmit time stamping packets
authorRichard Cochran <richardcochran@gmail.com>
Fri, 21 Oct 2011 00:49:16 +0000 (00:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2011 23:14:50 +0000 (19:14 -0400)
The previous commit enforces a new rule for handling the cloned packets
for transmit time stamping. These packets must not be freed using any other
function than skb_complete_tx_timestamp. This commit fixes the one and only
driver using this API.

The driver first appeared in v3.0.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83640.c

index c588a162050f3b29a9cc274bb3567429bdc74ce1..13e571325a9cd9286145cacbf7a70a91f6ccc7ec 100644 (file)
@@ -1192,7 +1192,7 @@ static void dp83640_txtstamp(struct phy_device *phydev,
 
        case HWTSTAMP_TX_ONESTEP_SYNC:
                if (is_sync(skb, type)) {
-                       kfree_skb(skb);
+                       skb_complete_tx_timestamp(skb, NULL);
                        return;
                }
                /* fall through */
@@ -1203,7 +1203,7 @@ static void dp83640_txtstamp(struct phy_device *phydev,
 
        case HWTSTAMP_TX_OFF:
        default:
-               kfree_skb(skb);
+               skb_complete_tx_timestamp(skb, NULL);
                break;
        }
 }