diff options
author | Xie Xiaobo <X.Xie@freescale.com> | 2013-04-19 09:01:11 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-19 19:53:12 (GMT) |
commit | 17b8bf81e383ee5df50e691713b6e470268f8cdf (patch) | |
tree | 3049449e944873f95bb172655ee0b134bb1798f0 /drivers/net | |
parent | a7749c2bd398e838571ca433a6da48862f135fd3 (diff) | |
download | linux-fsl-qoriq-17b8bf81e383ee5df50e691713b6e470268f8cdf.tar.xz |
gianfar: remove the redundant backup/recover operation
Because introduce TXPAL space into skb_buffer, the timestamp will be
placed into TXPAL, So the old backup/recover operation was redundant.
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Change-Id: Ie10571bf26fd73ca3cdca346c1783579d80f4faf
Reviewed-on: http://git.am.freescale.net:8181/1599
Reviewed-by: Manoil Claudiu-B08782 <claudiu.manoil@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 8b86ee9..5be404e 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -2595,14 +2595,6 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS; if (fcb == NULL) fcb = gfar_add_fcb(skb); - /* - * the timestamp overwrites the ethertype and the following - * 2 bytes -> storing 4 bytes at the end of the control buffer - * structure - will be recovered in the function - * gfar_clean_tx_ring - */ - memcpy(skb->cb, (skb->data + GMAC_FCB_LEN + - ETH_ALEN + ETH_ALEN), 4); fcb->ptp = 1; lstatus |= BD_LFLAG(TXBD_TOE); /* @@ -2989,18 +2981,13 @@ static void gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue) } /* remove tx fcb */ skb_pull(skb, GMAC_FCB_LEN); - /* - * the timestamp overwrote the ethertype and the - * following 2 bytes, 4 byters were stored in the - * end of the control buffer in function - * gfar_start_xmit to be recovered here - */ - memcpy((skb->data + ETH_ALEN + ETH_ALEN), skb->cb, 4); /* pass timestamp back */ if (unlikely(priv->hwts_tx_en)) skb_tstamp_tx(skb, &shhwtstamps); - if (likely(priv->hwts_tx_en_ioctl)) + if (likely(priv->hwts_tx_en_ioctl)) { + skb_pull(skb, GMAC_TXPAL_LEN); gfar_ptp_store_txstamp(dev, skb, &tx_ts); + } bdp->lstatus &= BD_LFLAG(TXBD_WRAP); bdp = next; } |