Skip to content

Commit 8e8c1bf

Browse files
committed
Merge branch 'enetc-trivial-ptp-one-step-tx-timestamping-cleanups'
Vladimir Oltean says: ==================== enetc: trivial PTP one-step TX timestamping cleanups These are two cleanup patches for some inconsistencies I noticed in the driver's TX ring cleanup function. ==================== Link: https://lore.kernel.org/r/20211020174220.1093032-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 50af596 + 5206614 commit 8e8c1bf

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

  • drivers/net/ethernet/freescale/enetc

‎drivers/net/ethernet/freescale/enetc/enetc.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -813,10 +813,7 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget)
813813
bool is_eof = tx_swbd->is_eof;
814814

815815
if (unlikely(tx_swbd->check_wb)) {
816-
struct enetc_ndev_priv *priv = netdev_priv(ndev);
817-
union enetc_tx_bd *txbd;
818-
819-
txbd = ENETC_TXBD(*tx_ring, i);
816+
union enetc_tx_bd *txbd = ENETC_TXBD(*tx_ring, i);
820817

821818
if (txbd->flags & ENETC_TXBD_FLAGS_W &&
822819
tx_swbd->do_twostep_tstamp) {
@@ -834,8 +831,7 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget)
834831
if (xdp_frame) {
835832
xdp_return_frame(xdp_frame);
836833
} else if (skb) {
837-
if (unlikely(tx_swbd->skb->cb[0] &
838-
ENETC_F_TX_ONESTEP_SYNC_TSTAMP)) {
834+
if (unlikely(skb->cb[0] & ENETC_F_TX_ONESTEP_SYNC_TSTAMP)) {
839835
/* Start work to release lock for next one-step
840836
* timestamping packet. And send one skb in
841837
* tx_skbs queue if has.

0 commit comments

Comments
 (0)