/* after register_netdev() - because else printk smashes the kernel */ switch (crc_force) { case 3: ax->crcmode  = CRC_MODE_SMACK; printk(KERN_INFO "mkiss: %s: crc mode smack forced.\n", ax->dev->name); break; case 2: ax->crcmode  = CRC_MODE_FLEX; printk(KERN_INFO "mkiss: %s: crc mode flexnet forced.\n", ax->dev->name); break; case 1: ax->crcmode  = CRC_MODE_NONE; printk(KERN_INFO "mkiss: %s: crc mode disabled.\n", ax->dev->name); break; case 0: /* fall through */ default: crc_force = 0; printk(KERN_INFO "mkiss: %s: crc mode is auto.\n", ax->dev->name); ax->crcmode  = CRC_MODE_SMACK_TEST; } ax->crcauto = (crc_force ? 0 : 1);  
static int mkiss_open(struct tty_struct *tty){	struct net_device *dev;	struct mkiss *ax;	int err;	if (!capable(CAP_NET_ADMIN))		return -EPERM;	dev = alloc_netdev(sizeof(struct mkiss), "ax%d", ax_setup);	if (!dev) {		err = -ENOMEM;		goto out;	}	ax = netdev_priv(dev);	ax->dev = dev;	spin_lock_init(&ax->buflock);	atomic_set(&ax->refcnt, 1);	init_MUTEX_LOCKED(&ax->dead_sem);	ax->tty = tty;	tty->disc_data = ax;	if (tty->driver->flush_buffer)		tty->driver->flush_buffer(tty);	/* Restore default settings */	dev->type = ARPHRD_AX25;	/* Perform the low-level AX25 initialization. */	if ((err = ax_open(ax->dev))) {		goto out_free_netdev;	}	if (register_netdev(dev))		goto out_free_buffers;	netif_start_queue(dev);	/* Done.  We have linked the TTY line to a channel. */	return 0;out_free_buffers:	kfree(ax->rbuff);	kfree(ax->xbuff);out_free_netdev:	free_netdev(dev);out:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/5793f4be23f0171b4999ca68a39a9157b44139f3/mkiss.c/clean/drivers/net/hamradio/mkiss.c