diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2008-07-01 14:18:49 -0400 |
---|---|---|
committer | Krzysztof Hałasa <khc@pm.waw.pl> | 2008-07-23 17:00:36 -0400 |
commit | a24e202e3ffdbd1da45ceab8e60824720c6ab7fd (patch) | |
tree | 12b11c1996c98bd5ad76cf48d09835d86adbe2d1 /net/wanrouter/wanmain.c | |
parent | efa415840d462caf30002d259db20338b546a94b (diff) |
Remove dead code from wanmain.c, CONFIG_WANPIPE_MULTPPP doesn't exist
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'net/wanrouter/wanmain.c')
-rw-r--r-- | net/wanrouter/wanmain.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index b210a88d0960..de4cc975b462 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -567,9 +567,6 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
567 | { | 567 | { |
568 | wanif_conf_t *cnf; | 568 | wanif_conf_t *cnf; |
569 | struct net_device *dev = NULL; | 569 | struct net_device *dev = NULL; |
570 | #ifdef CONFIG_WANPIPE_MULTPPP | ||
571 | struct ppp_device *pppdev=NULL; | ||
572 | #endif | ||
573 | int err; | 570 | int err; |
574 | 571 | ||
575 | if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL)) | 572 | if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL)) |
@@ -588,25 +585,10 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
588 | goto out; | 585 | goto out; |
589 | 586 | ||
590 | if (cnf->config_id == WANCONFIG_MPPP) { | 587 | 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", | 588 | printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n", |
606 | wandev->name); | 589 | wandev->name); |
607 | err = -EPROTONOSUPPORT; | 590 | err = -EPROTONOSUPPORT; |
608 | goto out; | 591 | goto out; |
609 | #endif | ||
610 | } else { | 592 | } else { |
611 | dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); | 593 | dev = kzalloc(sizeof(struct net_device), GFP_KERNEL); |
612 | err = -ENOBUFS; | 594 | err = -ENOBUFS; |
@@ -661,17 +643,9 @@ static int wanrouter_device_new_if(struct wan_device *wandev, | |||
661 | kfree(dev->priv); | 643 | kfree(dev->priv); |
662 | dev->priv = NULL; | 644 | dev->priv = NULL; |
663 | 645 | ||
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 */ | 646 | /* Sync PPP is disabled */ |
671 | if (cnf->config_id != WANCONFIG_MPPP) | 647 | if (cnf->config_id != WANCONFIG_MPPP) |
672 | kfree(dev); | 648 | kfree(dev); |
673 | #endif | ||
674 | |||
675 | out: | 649 | out: |
676 | kfree(cnf); | 650 | kfree(cnf); |
677 | return err; | 651 | return err; |