kernels/linux-2.4.0/drivers/net/wan/sdlamain.c
/*============================================================================
 * Execute adapter firmware command.
 * o verify request structure
 * o copy request structure to kernel data space
 * o call protocol-specific 'exec' function
 */
Execute adapter firmware command.
o verify request structure
o copy request structure to kernel data space
o call protocol-specific 'exec' function
Execute adapter firmware command . o verify request structure o copy request structure to kernel data space o call protocol - specific ' exec ' function
static int ioctl_exec (sdla_t* card, sdla_exec_t* u_exec)
{
	sdla_exec_t exec;
	if (card->exec == NULL)
		return -ENODEV;
	if(copy_from_user((void*)&exec, (void*)u_exec, sizeof(sdla_exec_t)))
		return -EFAULT;
	if ((exec.magic != WANPIPE_MAGIC) || (exec.cmd == NULL))
		return -EINVAL;
	return card->exec(card, exec.cmd, exec.data);
}
static int ioctl_exec ( sdla_t * card , sdla_exec_t * u_exec ) { sdla_exec_t exec ; if ( card -> exec == NULL ) return - ENODEV ; if ( copy_from_user ( ( void * ) & exec , ( void * ) u_exec , sizeof ( sdla_exec_t ) ) ) return - EFAULT ; if ( ( exec . magic != WANPIPE_MAGIC ) || ( exec . cmd == NULL ) ) return - EINVAL ; return card -> exec ( card , exec . cmd , exec . data ) ; }
Execute adapter firmware command.
Execute adapter firmware command .