aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r--net/packet/af_packet.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 93896d2092f6..87d20f48ff06 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -240,11 +240,9 @@ static void __fanout_link(struct sock *sk, struct packet_sock *po);
240static int packet_direct_xmit(struct sk_buff *skb) 240static int packet_direct_xmit(struct sk_buff *skb)
241{ 241{
242 struct net_device *dev = skb->dev; 242 struct net_device *dev = skb->dev;
243 const struct net_device_ops *ops = dev->netdev_ops;
244 netdev_features_t features; 243 netdev_features_t features;
245 struct netdev_queue *txq; 244 struct netdev_queue *txq;
246 int ret = NETDEV_TX_BUSY; 245 int ret = NETDEV_TX_BUSY;
247 u16 queue_map;
248 246
249 if (unlikely(!netif_running(dev) || 247 if (unlikely(!netif_running(dev) ||
250 !netif_carrier_ok(dev))) 248 !netif_carrier_ok(dev)))
@@ -255,17 +253,13 @@ static int packet_direct_xmit(struct sk_buff *skb)
255 __skb_linearize(skb)) 253 __skb_linearize(skb))
256 goto drop; 254 goto drop;
257 255
258 queue_map = skb_get_queue_mapping(skb); 256 txq = skb_get_tx_queue(dev, skb);
259 txq = netdev_get_tx_queue(dev, queue_map);
260 257
261 local_bh_disable(); 258 local_bh_disable();
262 259
263 HARD_TX_LOCK(dev, txq, smp_processor_id()); 260 HARD_TX_LOCK(dev, txq, smp_processor_id());
264 if (!netif_xmit_frozen_or_drv_stopped(txq)) { 261 if (!netif_xmit_frozen_or_drv_stopped(txq))
265 ret = ops->ndo_start_xmit(skb, dev); 262 ret = netdev_start_xmit(skb, dev, txq, false);
266 if (ret == NETDEV_TX_OK)
267 txq_trans_update(txq);
268 }
269 HARD_TX_UNLOCK(dev, txq); 263 HARD_TX_UNLOCK(dev, txq);
270 264
271 local_bh_enable(); 265 local_bh_enable();