usb_autopm_put_interface_async(dev->intf);
- if (skb)
- defer_bh(dev, skb, &dev->txq, tx_done);
+ defer_bh(dev, skb, &dev->txq, tx_done);
}
static void lan78xx_queue_skb(struct sk_buff_head *list,
netdev_tx_t lan78xx_start_xmit(struct sk_buff *skb, struct net_device *net)
{
struct lan78xx_net *dev = netdev_priv(net);
+ struct sk_buff *skb2 = NULL;
- if (skb)
+ if (skb) {
skb_tx_timestamp(skb);
+ skb2 = lan78xx_tx_prep(dev, skb, GFP_ATOMIC);
+ }
- skb = lan78xx_tx_prep(dev, skb, GFP_ATOMIC);
- if (skb) {
- skb_queue_tail(&dev->txq_pend, skb);
+ if (skb2) {
+ skb_queue_tail(&dev->txq_pend, skb2);
if (skb_queue_len(&dev->txq_pend) > 10)
netif_stop_queue(net);
netdev_dbg(dev->net, "skb state %d\n", entry->state);
return;
}
- if (!dev->done.prev)
- BUG_ON(!dev->done.prev);
- if (!dev->done.next)
- BUG_ON(!dev->done.next);
}
if (netif_device_present(dev->net) && netif_running(dev->net)) {
return 0;
- usb_set_intfdata(intf, NULL);
out3:
lan78xx_unbind(dev, intf);
out2: