diff options
Diffstat (limited to 'net/wanrouter/wanmain.c')
-rw-r--r-- | net/wanrouter/wanmain.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index b210a88d0960..7f07152bc109 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/vmalloc.h> /* vmalloc, vfree */ | 57 | #include <linux/vmalloc.h> /* vmalloc, vfree */ |
58 | #include <asm/uaccess.h> /* copy_to/from_user */ | 58 | #include <asm/uaccess.h> /* copy_to/from_user */ |
59 | #include <linux/init.h> /* __initfunc et al. */ | 59 | #include <linux/init.h> /* __initfunc et al. */ |
60 | #include <net/syncppp.h> | ||
61 | 60 | ||
62 | #define KMEM_SAFETYZONE 8 | 61 | #define KMEM_SAFETYZONE 8 |
63 | 62 | ||
@@ -567,9 +566,6 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
567 | { | 566 | { |
568 | wanif_conf_t *cnf; | 567 | wanif_conf_t *cnf; |
569 | struct net_device *dev = NULL; | 568 | struct net_device *dev = NULL; |
570 | #ifdef CONFIG_WANPIPE_MULTPPP | ||
571 | struct ppp_device *pppdev=NULL; | ||
572 | #endif | ||
573 | int err; | 569 | int err; |
574 | 570 | ||
575 | if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL)) | 571 | if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL)) |
@@ -588,25 +584,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
588 | goto out; | 584 | goto out; |
589 | 585 | ||
590 | if (cnf->config_id == WANCONFIG_MPPP) { | 586 | if (cnf->config_id == WANCONFIG_MPPP) { |
591 | #ifdef CONFIG_WANPIPE_MULTPPP | ||
592 | pppdev = kzalloc(sizeof(struct ppp_device), GFP_KERNEL); | ||
593 | err = -ENOBUFS; | ||
594 | if (pppdev == NULL) | ||
595 | goto out; | ||
596 | pppdev->dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); | ||
597 | if (pppdev->dev == NULL) { | ||
598 | kfree(pppdev); | ||
599 | err = -ENOBUFS; | ||
600 | goto out; | ||
601 | } | ||
602 | err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf); | ||
603 | dev = pppdev->dev; | ||
604 | #else | ||
605 | printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n", | 587 | printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n", |
606 | wandev->name); | 588 | wandev->name); |
607 | err = -EPROTONOSUPPORT; | 589 | err = -EPROTONOSUPPORT; |
608 | goto out; | 590 | goto out; |
609 | #endif | ||
610 | } else { | 591 | } else { |
611 | dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); | 592 | dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); |
612 | err = -ENOBUFS; | 593 | err = -ENOBUFS; |
@@ -661,17 +642,9 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
661 | kfree(dev->priv); | 642 | kfree(dev->priv); |
662 | dev->priv = NULL; | 643 | dev->priv = NULL; |
663 | 644 | ||
664 | #ifdef CONFIG_WANPIPE_MULTPPP | ||
665 | if (cnf->config_id == WANCONFIG_MPPP) | ||
666 | kfree(pppdev); | ||
667 | else | ||
668 | kfree(dev); | ||
669 | #else | ||
670 | /* Sync PPP is disabled */ | 645 | /* Sync PPP is disabled */ |
671 | if (cnf->config_id != WANCONFIG_MPPP) | 646 | if (cnf->config_id != WANCONFIG_MPPP) |
672 | kfree(dev); | 647 | kfree(dev); |
673 | #endif | ||
674 | |||
675 | out: | 648 | out: |
676 | kfree(cnf); | 649 | kfree(cnf); |
677 | return err; | 650 | return err; |