/* Delete WAN logical channel. o verify user address space o copy configuration data to kernel address space  */
static int wanrouter_device_del_if(struct wan_device *wandev, char __user *u_name)
/* Delete WAN logical channel. o verify user address space o copy configuration data to kernel address space  */
static int wanrouter_device_del_if(struct wan_device *wandev, char __user *u_name)
{
	char name[WAN_IFNAME_SZ + 1];
	int err = 0;
	if (wandev->state == WAN_UNCONFIGURED)
		return -ENODEV;
	memset(name, 0, sizeof(name));
	if (copy_from_user(name, u_name, WAN_IFNAME_SZ))
		return -EFAULT;
	err = wanrouter_delete_interface(wandev, name);
	if (err)
		return err;
	if (!wandev->ndev && wandev->shutdown)
		err = wandev->shutdown(wandev);
	return err;
}