FreeBSD/sys/dev/wl/if_wl.c
/*
 * wlhwrst:
 *
 *	This routine resets the WaveLAN board that corresponds to the 
 *	board number passed in.
 *
 * input	: board number to do a hardware reset
 * output	: board is reset
 *
 */
This routine resets the WaveLAN board that corresponds to the
board number passed in.

input        : board number to do a hardware reset
output       : board is reset
This routine resets the WaveLAN board that corresponds to the board number passed in . input : board number to do a hardware reset output : board is reset
static int
wlhwrst(struct wl_softc *sc)
{
#ifdef WLDEBUG
    if (sc->ifp->if_flags & IFF_DEBUG)
	if_printf(sc->ifp, "entered wlhwrst()\n");
#endif
    sc->hacr = HACR_RESET;
    CMD(sc);			
    sc->hacr = HACR_DEFAULT;
    CMD(sc);
#ifdef	WLDEBUG
    if (sc->ifp->if_flags & IFF_DEBUG)
	wlmmcstat(sc);	
#endif	
    wlbldcu(sc);		
    if (wldiag(sc) == 0)
	return(0);
    if (wlconfig(sc) == 0)
	    return(0);
    wlrustrt(sc);		
    sc->hacr = (HACR_DEFAULT | HACR_INTRON);
    CMD(sc);
    return(1);
}
static int wlhwrst ( struct wl_softc * sc ) { #ifdef WLDEBUG if ( sc -> ifp -> if_flags & IFF_DEBUG ) if_printf ( sc -> ifp , " \n " ) ; #endif sc -> hacr = HACR_RESET ; CMD ( sc ) ; sc -> hacr = HACR_DEFAULT ; CMD ( sc ) ; #ifdef WLDEBUG if ( sc -> ifp -> if_flags & IFF_DEBUG ) wlmmcstat ( sc ) ; #endif wlbldcu ( sc ) ; if ( wldiag ( sc ) == 0 ) return ( 0 ) ; if ( wlconfig ( sc ) == 0 ) return ( 0 ) ; wlrustrt ( sc ) ; sc -> hacr = ( HACR_DEFAULT | HACR_INTRON ) ; CMD ( sc ) ; return ( 1 ) ; }
wlhwrst:
      This routine resets the WaveLAN board that corresponds to the
      board number passed in.
wlhwrst : This routine resets the WaveLAN board that corresponds to the board number passed in .
/* reset the board */ /* clear reset command and set PIO#1 in autoincrement mode */ /* Display MMC registers */ /* WLDEBUG */ /* set up command unit structures */ /* 
     * insert code for loopback test here
     */ /* start receive unit */ /* enable interrupts */