FreeBSD/sys/mips/rmi/dev/sec/rmisec.c
/*
 * Detach an interface that successfully probed.
 */
Detach an interface that successfully probed.
Detach an interface that successfully probed .
static int
xlr_sec_detach(device_t dev)
{
	int sesn;
	struct xlr_sec_softc *sc = device_get_softc(dev);
	struct xlr_sec_session *ses = NULL;
	symkey_desc_pt desc;
	for (sesn = 0; sesn < sc->sc_nsessions; sesn++) {
		ses = &sc->sc_sessions[sesn];
		desc = (symkey_desc_pt) ses->desc_ptr;
		free(desc->user.kern_src, M_DEVBUF);
		free(desc->user.kern_dest, M_DEVBUF);
		free(desc->next_src_buf, M_DEVBUF);
		free(desc->next_dest_buf, M_DEVBUF);
		free(ses->desc_ptr, M_DEVBUF);
	}
	return (0);
}
static int xlr_sec_detach ( device_t dev ) { int sesn ; struct xlr_sec_softc * sc = device_get_softc ( dev ) ; struct xlr_sec_session * ses = NULL ; symkey_desc_pt desc ; for ( sesn = 0 ; sesn < sc -> sc_nsessions ; sesn ++ ) { ses = & sc -> sc_sessions [ sesn ] ; desc = ( symkey_desc_pt ) ses -> desc_ptr ; free ( desc -> user . kern_src , M_DEVBUF ) ; free ( desc -> user . kern_dest , M_DEVBUF ) ; free ( desc -> next_src_buf , M_DEVBUF ) ; free ( desc -> next_dest_buf , M_DEVBUF ) ; free ( ses -> desc_ptr , M_DEVBUF ) ; } return ( 0 ) ; }
Detach an interface that successfully probed.
Detach an interface that successfully probed .