slave.c (cf536ea3c7eefb26082836eb7f930b293dd38345) | slave.c (5c5416f5d4c75fe6aba56f6c2c45a070b5e7cc78) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/dsa/slave.c - Slave device handling 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#include <linux/list.h> 8#include <linux/etherdevice.h> --- 541 unchanged lines hidden (view full) --- 550 return NETDEV_TX_OK; 551#endif 552} 553 554static void dsa_skb_tx_timestamp(struct dsa_slave_priv *p, 555 struct sk_buff *skb) 556{ 557 struct dsa_switch *ds = p->dp->ds; | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/dsa/slave.c - Slave device handling 4 * Copyright (c) 2008-2009 Marvell Semiconductor 5 */ 6 7#include <linux/list.h> 8#include <linux/etherdevice.h> --- 541 unchanged lines hidden (view full) --- 550 return NETDEV_TX_OK; 551#endif 552} 553 554static void dsa_skb_tx_timestamp(struct dsa_slave_priv *p, 555 struct sk_buff *skb) 556{ 557 struct dsa_switch *ds = p->dp->ds; |
558 struct sk_buff *clone; | |
559 560 if (!(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) 561 return; 562 563 if (!ds->ops->port_txtstamp) 564 return; 565 | 558 559 if (!(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)) 560 return; 561 562 if (!ds->ops->port_txtstamp) 563 return; 564 |
566 clone = skb_clone_sk(skb); 567 if (!clone) 568 return; 569 570 if (ds->ops->port_txtstamp(ds, p->dp->index, clone)) { 571 DSA_SKB_CB(skb)->clone = clone; 572 return; 573 } 574 575 kfree_skb(clone); | 565 ds->ops->port_txtstamp(ds, p->dp->index, skb); |
576} 577 578netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev) 579{ 580 /* SKB for netpoll still need to be mangled with the protocol-specific 581 * tag to be successfully transmitted 582 */ 583 if (unlikely(netpoll_tx_running(dev))) --- 1914 unchanged lines hidden --- | 566} 567 568netdev_tx_t dsa_enqueue_skb(struct sk_buff *skb, struct net_device *dev) 569{ 570 /* SKB for netpoll still need to be mangled with the protocol-specific 571 * tag to be successfully transmitted 572 */ 573 if (unlikely(netpoll_tx_running(dev))) --- 1914 unchanged lines hidden --- |