if (sp->duplex == 0) sp_start_tx_timer(sp); 
sp_xmit_on_air((unsigned long)sp); 
static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len){	unsigned char *msg, *p = icp;	int actual, count;	if (len > sp->mtu) {	/* sp->mtu = AX25_MTU = max. PACLEN = 256 */		msg = "oversized transmit packet!";		goto out_drop;	}	if (len > sp->mtu) {	/* sp->mtu = AX25_MTU = max. PACLEN = 256 */		msg = "oversized transmit packet!";		goto out_drop;	}	if (p[0] > 5) {		msg = "invalid KISS command";		goto out_drop;	}	if ((p[0] != 0) && (len > 2)) {		msg = "KISS control packet too long";		goto out_drop;	}	if ((p[0] == 0) && (len < 15)) {		msg = "bad AX.25 packet to transmit";		goto out_drop;	}	count = encode_sixpack(p, sp->xbuff, len, sp->tx_delay);	set_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags);	switch (p[0]) {	case 1:	sp->tx_delay = p[1];		return;	case 2:	sp->persistence = p[1];		return;	case 3:	sp->slottime = p[1];		return;	case 4:	/* ignored */		return;	case 5:	sp->duplex = p[1];		return;	}	if (p[0] != 0)		return;	/*	 * In case of fullduplex or DAMA operation, we don't take care about the	 * state of the DCD or of any timers, as the determination of the	 * correct time to send is the job of the AX.25 layer. We send	 * immediately after data has arrived.	 */	if (sp->duplex == 1) {		sp->led_state = 0x70;		sp->tty->driver->write(sp->tty, &sp->led_state, 1);		sp->tx_enable = 1;		actual = sp->tty->driver->write(sp->tty, sp->xbuff, count);		sp->xleft = count - actual;		sp->xhead = sp->xbuff + actual;		sp->led_state = 0x60;		sp->tty->driver->write(sp->tty, &sp->led_state, 1);	} else {		sp->xleft = count;		sp->xhead = sp->xbuff;		sp->status2 = count;		if (sp->duplex == 0)			sp_start_tx_timer(sp);	}	return;out_drop:	sp->stats.tx_dropped++;	netif_start_queue(sp->dev);	if (net_ratelimit())		printk(KERN_DEBUG "%s: %s - dropped.\n", sp->dev->name, msg);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c0438174e8272d23fe43a5d3f23d777f5b412e87/6pack.c/buggy/drivers/net/hamradio/6pack.c