while (dev->tx_buff.len > 0) { /* wait until tx idle */
spin_unlock_irqrestore(&dev->tx_lock, flags);
set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(MSECS_TO_JIFFIES(10));
+ schedule_timeout(msecs_to_jiffies(10));
spin_lock_irqsave(&dev->tx_lock, flags);
}
}
dev->tx_buff.len = 0;
}
- if (dev->tx_buff.len > 0) {
- spin_unlock_irqrestore(&dev->tx_lock, flags);
- return;
- }
+ if (dev->tx_buff.len > 0)
+ goto done; /* more data to send later */
}
if (unlikely(dev->raw_tx != 0)) {
IRDA_DEBUG(3, "%s(), raw-tx done\n", __FUNCTION__);
dev->raw_tx = 0;
- return;
+ goto done; /* no post-frame handling in raw mode */
}
/* we have finished now sending this skb.
netif_wake_queue(dev->netdev);
}
+done:
spin_unlock_irqrestore(&dev->tx_lock, flags);
}