|
@@ -567,9 +567,6 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
|
|
{
|
|
{
|
|
wanif_conf_t *cnf;
|
|
wanif_conf_t *cnf;
|
|
struct net_device *dev = NULL;
|
|
struct net_device *dev = NULL;
|
|
-#ifdef CONFIG_WANPIPE_MULTPPP
|
|
|
|
- struct ppp_device *pppdev=NULL;
|
|
|
|
-#endif
|
|
|
|
int err;
|
|
int err;
|
|
|
|
|
|
if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
|
|
if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
|
|
@@ -588,25 +585,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
if (cnf->config_id == WANCONFIG_MPPP) {
|
|
if (cnf->config_id == WANCONFIG_MPPP) {
|
|
-#ifdef CONFIG_WANPIPE_MULTPPP
|
|
|
|
- pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL);
|
|
|
|
- err = -ENOBUFS;
|
|
|
|
- if (pppdev == NULL)
|
|
|
|
- goto out;
|
|
|
|
- pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
|
|
|
|
- if (pppdev->dev == NULL) {
|
|
|
|
- kfree(pppdev);
|
|
|
|
- err = -ENOBUFS;
|
|
|
|
- goto out;
|
|
|
|
- }
|
|
|
|
- err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
|
|
|
|
- dev = pppdev->dev;
|
|
|
|
-#else
|
|
|
|
printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
|
|
printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
|
|
wandev->name);
|
|
wandev->name);
|
|
err = -EPROTONOSUPPORT;
|
|
err = -EPROTONOSUPPORT;
|
|
goto out;
|
|
goto out;
|
|
-#endif
|
|
|
|
} else {
|
|
} else {
|
|
dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
|
|
dev = kzalloc(sizeof(struct net_device), GFP_KERNEL);
|
|
err = -ENOBUFS;
|
|
err = -ENOBUFS;
|
|
@@ -661,17 +643,9 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
|
|
kfree(dev->priv);
|
|
kfree(dev->priv);
|
|
dev->priv = NULL;
|
|
dev->priv = NULL;
|
|
|
|
|
|
-#ifdef CONFIG_WANPIPE_MULTPPP
|
|
|
|
- if (cnf->config_id == WANCONFIG_MPPP)
|
|
|
|
- kfree(pppdev);
|
|
|
|
- else
|
|
|
|
- kfree(dev);
|
|
|
|
-#else
|
|
|
|
/* Sync PPP is disabled */
|
|
/* Sync PPP is disabled */
|
|
if (cnf->config_id != WANCONFIG_MPPP)
|
|
if (cnf->config_id != WANCONFIG_MPPP)
|
|
kfree(dev);
|
|
kfree(dev);
|
|
-#endif
|
|
|
|
-
|
|
|
|
out:
|
|
out:
|
|
kfree(cnf);
|
|
kfree(cnf);
|
|
return err;
|
|
return err;
|