/* bcm_can_tx - send the (next) CAN frame to the appropriate CAN interface of the given bcm tx op  */
static void bcm_can_tx(struct bcm_op *op)
/* bcm_can_tx - send the (next) CAN frame to the appropriate CAN interface of the given bcm tx op  */
static void bcm_can_tx(struct bcm_op *op)
{
	struct sk_buff *skb;
	struct net_device *dev;
	struct can_frame *cf = &op->frames[op->currframe];
	if (!op->ifindex)
		return;
	dev = dev_get_by_index(&init_net, op->ifindex);
	if (!dev) {
		return;
	}
	skb = alloc_skb(CFSIZ, gfp_any());
	if (!skb)
		goto out;
	memcpy(skb_put(skb, CFSIZ), cf, CFSIZ);
	skb->dev = dev;
	skb->sk = op->sk;
	can_send(skb, 1);
	op->currframe++;
	op->frames_abs++;
	if (op->currframe >= op->nframes)
		op->currframe = 0;
 out:
	dev_put(dev);
}