kernels/linux-2.4.0/drivers/net/wan/sdla_fr.c
/*============================================================================
 * Close network interface.
 * o if this is the last open, then disable communications and interrupts.
 * o reset flags.
 */
Close network interface.
o if this is the last open, then disable communications and interrupts.
o reset flags.
Close network interface . o if this is the last open then disable communications and interrupts . o reset flags .
static int if_close (struct net_device* dev)
{
	fr_channel_t* chan = dev->priv;
	sdla_t* card = chan->card;
	if (test_and_set_bit(1, (void*)&card->wandev.critical))
		return -EAGAIN;
	netif_stop_queue(dev);
	wanpipe_close(card);
	if (card->wandev.station == WANOPT_NODE) {
		fr_delete_dlci (card,chan->dlci);
	}
        clear_bit(1, (void*)&card->wandev.critical);
	return 0;
}
static int if_close ( struct net_device * dev ) { fr_channel_t * chan = dev -> priv ; sdla_t * card = chan -> card ; if ( test_and_set_bit ( 1 , ( void * ) & card -> wandev . critical ) ) return - EAGAIN ; netif_stop_queue ( dev ) ; wanpipe_close ( card ) ; if ( card -> wandev . station == WANOPT_NODE ) { fr_delete_dlci ( card , chan -> dlci ) ; } clear_bit ( 1 , ( void * ) & card -> wandev . critical ) ; return 0 ; }
Close network interface.
Close network interface .