summaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-30 06:07:24 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-02 02:39:55 +0200
commit10b3ad8c21bb4b135768c30dd4c51a1c744da699 (patch)
tree02acb0d328818c9216c93b6b46d62717e09cdc61 /net/packet
parentnet: stmmac: fix warning from Sparse for socfpga (diff)
downloadlinux-10b3ad8c21bb4b135768c30dd4c51a1c744da699.tar.xz
linux-10b3ad8c21bb4b135768c30dd4c51a1c744da699.zip
net: Do txq_trans_update() in netdev_start_xmit()
That way we don't have to audit every call site to make sure it is doing this properly. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index b7a7f5a721bd..fe305a05a8fc 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -258,11 +258,8 @@ static int packet_direct_xmit(struct sk_buff *skb)
local_bh_disable();
HARD_TX_LOCK(dev, txq, smp_processor_id());
- if (!netif_xmit_frozen_or_drv_stopped(txq)) {
- ret = netdev_start_xmit(skb, dev);
- if (ret == NETDEV_TX_OK)
- txq_trans_update(txq);
- }
+ if (!netif_xmit_frozen_or_drv_stopped(txq))
+ ret = netdev_start_xmit(skb, dev, txq);
HARD_TX_UNLOCK(dev, txq);
local_bh_enable();