Commit d62a38d1 authored by Karsten Keil's avatar Karsten Keil Committed by David S. Miller

[ISDN]: Change I4L to use alloc_netdev().

Signed-off-by: default avatarKarsten Keil <kkeil@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3607c446
...@@ -77,7 +77,7 @@ static __inline__ int isdn_net_device_started(isdn_net_dev *n) ...@@ -77,7 +77,7 @@ static __inline__ int isdn_net_device_started(isdn_net_dev *n)
if (lp->master) if (lp->master)
dev = lp->master; dev = lp->master;
else else
dev = &n->dev; dev = n->dev;
return netif_running(dev); return netif_running(dev);
} }
...@@ -90,7 +90,7 @@ static __inline__ void isdn_net_device_wake_queue(isdn_net_local *lp) ...@@ -90,7 +90,7 @@ static __inline__ void isdn_net_device_wake_queue(isdn_net_local *lp)
if (lp->master) if (lp->master)
netif_wake_queue(lp->master); netif_wake_queue(lp->master);
else else
netif_wake_queue(&lp->netdev->dev); netif_wake_queue(lp->netdev->dev);
} }
/* /*
...@@ -102,7 +102,7 @@ static __inline__ void isdn_net_device_stop_queue(isdn_net_local *lp) ...@@ -102,7 +102,7 @@ static __inline__ void isdn_net_device_stop_queue(isdn_net_local *lp)
if (lp->master) if (lp->master)
netif_stop_queue(lp->master); netif_stop_queue(lp->master);
else else
netif_stop_queue(&lp->netdev->dev); netif_stop_queue(lp->netdev->dev);
} }
/* /*
...@@ -287,7 +287,7 @@ isdn_net_unbind_channel(isdn_net_local * lp) ...@@ -287,7 +287,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
BEWARE! This chunk of code cannot be called from hardware BEWARE! This chunk of code cannot be called from hardware
interrupt handler. I hope it is true. --ANK interrupt handler. I hope it is true. --ANK
*/ */
qdisc_reset(lp->netdev->dev.qdisc); qdisc_reset(lp->netdev->dev->qdisc);
} }
lp->dialstate = 0; lp->dialstate = 0;
dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL; dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
...@@ -345,27 +345,27 @@ isdn_net_autohup(void) ...@@ -345,27 +345,27 @@ isdn_net_autohup(void)
l->chargetime += l->chargeint; l->chargetime += l->chargeint;
if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ)) if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ))
if (l->outgoing || l->hupflags & ISDN_INHUP) if (l->outgoing || l->hupflags & ISDN_INHUP)
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} else if (l->outgoing) { } else if (l->outgoing) {
if (l->hupflags & ISDN_CHARGEHUP) { if (l->hupflags & ISDN_CHARGEHUP) {
if (l->hupflags & ISDN_WAITCHARGE) { if (l->hupflags & ISDN_WAITCHARGE) {
printk(KERN_DEBUG "isdn_net: Hupflags of %s are %X\n", printk(KERN_DEBUG "isdn_net: Hupflags of %s are %X\n",
l->name, l->hupflags); l->name, l->hupflags);
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} else if (time_after(jiffies, l->chargetime + l->chargeint)) { } else if (time_after(jiffies, l->chargetime + l->chargeint)) {
printk(KERN_DEBUG printk(KERN_DEBUG
"isdn_net: %s: chtime = %lu, chint = %d\n", "isdn_net: %s: chtime = %lu, chint = %d\n",
l->name, l->chargetime, l->chargeint); l->name, l->chargetime, l->chargeint);
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} }
} else } else
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} else if (l->hupflags & ISDN_INHUP) } else if (l->hupflags & ISDN_INHUP)
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} }
if(dev->global_flags & ISDN_GLOBAL_STOPPED || (ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF)) { if(dev->global_flags & ISDN_GLOBAL_STOPPED || (ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF)) {
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
} }
...@@ -579,7 +579,7 @@ isdn_net_dial(void) ...@@ -579,7 +579,7 @@ isdn_net_dial(void)
if (!lp->dial) { if (!lp->dial) {
printk(KERN_WARNING "%s: phone number deleted?\n", printk(KERN_WARNING "%s: phone number deleted?\n",
lp->name); lp->name);
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
anymore = 1; anymore = 1;
...@@ -616,8 +616,8 @@ isdn_net_dial(void) ...@@ -616,8 +616,8 @@ isdn_net_dial(void)
s = "dial suppressed: isdn system stopped"; s = "dial suppressed: isdn system stopped";
else else
s = "dial suppressed: dialmode `off'"; s = "dial suppressed: dialmode `off'";
isdn_net_unreachable(&p->dev, NULL, s); isdn_net_unreachable(p->dev, NULL, s);
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
cmd.driver = lp->isdn_device; cmd.driver = lp->isdn_device;
...@@ -633,7 +633,7 @@ isdn_net_dial(void) ...@@ -633,7 +633,7 @@ isdn_net_dial(void)
if (!lp->dial) { if (!lp->dial) {
printk(KERN_WARNING "%s: phone number deleted?\n", printk(KERN_WARNING "%s: phone number deleted?\n",
lp->name); lp->name);
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
if (!strncmp(lp->dial->num, "LEASED", strlen("LEASED"))) { if (!strncmp(lp->dial->num, "LEASED", strlen("LEASED"))) {
...@@ -644,8 +644,8 @@ isdn_net_dial(void) ...@@ -644,8 +644,8 @@ isdn_net_dial(void)
if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) { if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) {
lp->dialwait_timer = jiffies + lp->dialwait; lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0; lp->dialstarted = 0;
isdn_net_unreachable(&p->dev, NULL, "dial: timed out"); isdn_net_unreachable(p->dev, NULL, "dial: timed out");
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
...@@ -674,9 +674,9 @@ isdn_net_dial(void) ...@@ -674,9 +674,9 @@ isdn_net_dial(void)
if (lp->dialtimeout == 0) { if (lp->dialtimeout == 0) {
lp->dialwait_timer = jiffies + lp->dialwait; lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0; lp->dialstarted = 0;
isdn_net_unreachable(&p->dev, NULL, "dial: tried all numbers dialmax times"); isdn_net_unreachable(p->dev, NULL, "dial: tried all numbers dialmax times");
} }
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
break; break;
} }
} }
...@@ -758,7 +758,7 @@ isdn_net_dial(void) ...@@ -758,7 +758,7 @@ isdn_net_dial(void)
cmd.arg = lp->isdn_channel + (lp->l3_proto << 8); cmd.arg = lp->isdn_channel + (lp->l3_proto << 8);
isdn_command(&cmd); isdn_command(&cmd);
if (lp->dtimer++ > ISDN_TIMER_DTIMEOUT15) if (lp->dtimer++ > ISDN_TIMER_DTIMEOUT15)
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
else { else {
anymore = 1; anymore = 1;
lp->dialstate++; lp->dialstate++;
...@@ -781,7 +781,7 @@ isdn_net_dial(void) ...@@ -781,7 +781,7 @@ isdn_net_dial(void)
printk(KERN_DEBUG "dialtimer4: %d\n", lp->dtimer); printk(KERN_DEBUG "dialtimer4: %d\n", lp->dtimer);
#endif #endif
if (lp->dtimer++ > ISDN_TIMER_DTIMEOUT10) if (lp->dtimer++ > ISDN_TIMER_DTIMEOUT10)
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
else else
anymore = 1; anymore = 1;
break; break;
...@@ -1618,7 +1618,7 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp) ...@@ -1618,7 +1618,7 @@ isdn_net_ciscohdlck_slarp_send_reply(isdn_net_local *lp)
__be32 addr = 0; /* local ipv4 address */ __be32 addr = 0; /* local ipv4 address */
__be32 mask = 0; /* local netmask */ __be32 mask = 0; /* local netmask */
if ((in_dev = lp->netdev->dev.ip_ptr) != NULL) { if ((in_dev = lp->netdev->dev->ip_ptr) != NULL) {
/* take primary(first) address of interface */ /* take primary(first) address of interface */
struct in_ifaddr *ifa = in_dev->ifa_list; struct in_ifaddr *ifa = in_dev->ifa_list;
if (ifa != NULL) { if (ifa != NULL) {
...@@ -1866,7 +1866,7 @@ isdn_net_rcv_skb(int idx, struct sk_buff *skb) ...@@ -1866,7 +1866,7 @@ isdn_net_rcv_skb(int idx, struct sk_buff *skb)
isdn_net_local *lp = p->local; isdn_net_local *lp = p->local;
if ((lp->flags & ISDN_NET_CONNECTED) && if ((lp->flags & ISDN_NET_CONNECTED) &&
(!lp->dialstate)) { (!lp->dialstate)) {
isdn_net_receive(&p->dev, skb); isdn_net_receive(p->dev, skb);
return 1; return 1;
} }
} }
...@@ -2506,6 +2506,42 @@ isdn_net_force_dial(char *name) ...@@ -2506,6 +2506,42 @@ isdn_net_force_dial(char *name)
return (isdn_net_force_dial_lp(p->local)); return (isdn_net_force_dial_lp(p->local));
} }
/*
* Helper for alloc_netdev()
*/
static void _isdn_setup(struct net_device *dev)
{
isdn_net_local *lp = dev->priv;
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
lp->p_encap = ISDN_NET_ENCAP_RAWIP;
lp->magic = ISDN_NET_MAGIC;
lp->last = lp;
lp->next = lp;
lp->isdn_device = -1;
lp->isdn_channel = -1;
lp->pre_device = -1;
lp->pre_channel = -1;
lp->exclusive = -1;
lp->ppp_slot = -1;
lp->pppbind = -1;
skb_queue_head_init(&lp->super_tx_queue);
lp->l2_proto = ISDN_PROTO_L2_X75I;
lp->l3_proto = ISDN_PROTO_L3_TRANS;
lp->triggercps = 6000;
lp->slavedelay = 10 * HZ;
lp->hupflags = ISDN_INHUP; /* Do hangup even on incoming calls */
lp->onhtime = 10; /* Default hangup-time for saving costs */
lp->dialmax = 1;
/* Hangup before Callback, manual dial */
lp->flags = ISDN_NET_CBHUP | ISDN_NET_DM_MANUAL;
lp->cbdelay = 25; /* Wait 5 secs before Callback */
lp->dialtimeout = -1; /* Infinite Dial-Timeout */
lp->dialwait = 5 * HZ; /* Wait 5 sec. after failed dial */
lp->dialstarted = 0; /* Jiffies of last dial-start */
lp->dialwait_timer = 0; /* Jiffies of earliest next dial-start */
}
/* /*
* Allocate a new network-interface and initialize its data structures. * Allocate a new network-interface and initialize its data structures.
*/ */
...@@ -2519,23 +2555,21 @@ isdn_net_new(char *name, struct net_device *master) ...@@ -2519,23 +2555,21 @@ isdn_net_new(char *name, struct net_device *master)
printk(KERN_WARNING "isdn_net: interface %s already exists\n", name); printk(KERN_WARNING "isdn_net: interface %s already exists\n", name);
return NULL; return NULL;
} }
if (name == NULL)
name = " ";
if (!(netdev = kzalloc(sizeof(isdn_net_dev), GFP_KERNEL))) { if (!(netdev = kzalloc(sizeof(isdn_net_dev), GFP_KERNEL))) {
printk(KERN_WARNING "isdn_net: Could not allocate net-device\n"); printk(KERN_WARNING "isdn_net: Could not allocate net-device\n");
return NULL; return NULL;
} }
if (!(netdev->local = kzalloc(sizeof(isdn_net_local), GFP_KERNEL))) { netdev->dev = alloc_netdev(sizeof(isdn_net_local), name, _isdn_setup);
printk(KERN_WARNING "isdn_net: Could not allocate device locals\n"); if (!netdev->dev) {
printk(KERN_WARNING "isdn_net: Could not allocate network device\n");
kfree(netdev); kfree(netdev);
return NULL; return NULL;
} }
if (name == NULL) netdev->local = netdev->dev->priv;
strcpy(netdev->local->name, " "); strcpy(netdev->local->name, netdev->dev->name);
else netdev->dev->init = isdn_net_init;
strcpy(netdev->local->name, name);
strcpy(netdev->dev.name, netdev->local->name);
netdev->dev.priv = netdev->local;
netdev->dev.init = isdn_net_init;
netdev->local->p_encap = ISDN_NET_ENCAP_RAWIP;
if (master) { if (master) {
/* Device shall be a slave */ /* Device shall be a slave */
struct net_device *p = (((isdn_net_local *) master->priv)->slave); struct net_device *p = (((isdn_net_local *) master->priv)->slave);
...@@ -2547,60 +2581,33 @@ isdn_net_new(char *name, struct net_device *master) ...@@ -2547,60 +2581,33 @@ isdn_net_new(char *name, struct net_device *master)
q = p; q = p;
p = (((isdn_net_local *) p->priv)->slave); p = (((isdn_net_local *) p->priv)->slave);
} }
((isdn_net_local *) q->priv)->slave = &(netdev->dev); ((isdn_net_local *) q->priv)->slave = netdev->dev;
} else { } else {
/* Device shall be a master */ /* Device shall be a master */
/* /*
* Watchdog timer (currently) for master only. * Watchdog timer (currently) for master only.
*/ */
netdev->dev.tx_timeout = isdn_net_tx_timeout; netdev->dev->tx_timeout = isdn_net_tx_timeout;
netdev->dev.watchdog_timeo = ISDN_NET_TX_TIMEOUT; netdev->dev->watchdog_timeo = ISDN_NET_TX_TIMEOUT;
if (register_netdev(&netdev->dev) != 0) { if (register_netdev(netdev->dev) != 0) {
printk(KERN_WARNING "isdn_net: Could not register net-device\n"); printk(KERN_WARNING "isdn_net: Could not register net-device\n");
kfree(netdev->local); free_netdev(netdev->dev);
kfree(netdev); kfree(netdev);
return NULL; return NULL;
} }
} }
netdev->local->magic = ISDN_NET_MAGIC;
netdev->queue = netdev->local; netdev->queue = netdev->local;
spin_lock_init(&netdev->queue_lock); spin_lock_init(&netdev->queue_lock);
netdev->local->last = netdev->local;
netdev->local->netdev = netdev; netdev->local->netdev = netdev;
netdev->local->next = netdev->local;
INIT_WORK(&netdev->local->tqueue, isdn_net_softint); INIT_WORK(&netdev->local->tqueue, isdn_net_softint);
spin_lock_init(&netdev->local->xmit_lock); spin_lock_init(&netdev->local->xmit_lock);
netdev->local->isdn_device = -1;
netdev->local->isdn_channel = -1;
netdev->local->pre_device = -1;
netdev->local->pre_channel = -1;
netdev->local->exclusive = -1;
netdev->local->ppp_slot = -1;
netdev->local->pppbind = -1;
skb_queue_head_init(&netdev->local->super_tx_queue);
netdev->local->l2_proto = ISDN_PROTO_L2_X75I;
netdev->local->l3_proto = ISDN_PROTO_L3_TRANS;
netdev->local->triggercps = 6000;
netdev->local->slavedelay = 10 * HZ;
netdev->local->hupflags = ISDN_INHUP; /* Do hangup even on incoming calls */
netdev->local->onhtime = 10; /* Default hangup-time for saving costs
of those who forget configuring this */
netdev->local->dialmax = 1;
netdev->local->flags = ISDN_NET_CBHUP | ISDN_NET_DM_MANUAL; /* Hangup before Callback, manual dial */
netdev->local->cbdelay = 25; /* Wait 5 secs before Callback */
netdev->local->dialtimeout = -1; /* Infinite Dial-Timeout */
netdev->local->dialwait = 5 * HZ; /* Wait 5 sec. after failed dial */
netdev->local->dialstarted = 0; /* Jiffies of last dial-start */
netdev->local->dialwait_timer = 0; /* Jiffies of earliest next dial-start */
/* Put into to netdev-chain */ /* Put into to netdev-chain */
netdev->next = (void *) dev->netdev; netdev->next = (void *) dev->netdev;
dev->netdev = netdev; dev->netdev = netdev;
return netdev->dev.name; return netdev->dev->name;
} }
char * char *
...@@ -2625,7 +2632,7 @@ isdn_net_newslave(char *parm) ...@@ -2625,7 +2632,7 @@ isdn_net_newslave(char *parm)
/* Master must not be started yet */ /* Master must not be started yet */
if (isdn_net_device_started(n)) if (isdn_net_device_started(n))
return NULL; return NULL;
return (isdn_net_new(newname, &(n->dev))); return (isdn_net_new(newname, n->dev));
} }
return NULL; return NULL;
} }
...@@ -2694,9 +2701,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) ...@@ -2694,9 +2701,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
lp->name); lp->name);
return -EINVAL; return -EINVAL;
#else #else
p->dev.type = ARPHRD_PPP; /* change ARP type */ p->dev->type = ARPHRD_PPP; /* change ARP type */
p->dev.addr_len = 0; p->dev->addr_len = 0;
p->dev.do_ioctl = isdn_ppp_dev_ioctl; p->dev->do_ioctl = isdn_ppp_dev_ioctl;
#endif #endif
break; break;
case ISDN_NET_ENCAP_X25IFACE: case ISDN_NET_ENCAP_X25IFACE:
...@@ -2705,12 +2712,12 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) ...@@ -2705,12 +2712,12 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
p->local->name); p->local->name);
return -EINVAL; return -EINVAL;
#else #else
p->dev.type = ARPHRD_X25; /* change ARP type */ p->dev->type = ARPHRD_X25; /* change ARP type */
p->dev.addr_len = 0; p->dev->addr_len = 0;
#endif #endif
break; break;
case ISDN_NET_ENCAP_CISCOHDLCK: case ISDN_NET_ENCAP_CISCOHDLCK:
p->dev.do_ioctl = isdn_ciscohdlck_dev_ioctl; p->dev->do_ioctl = isdn_ciscohdlck_dev_ioctl;
break; break;
default: default:
if( cfg->p_encap >= 0 && if( cfg->p_encap >= 0 &&
...@@ -2837,14 +2844,14 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) ...@@ -2837,14 +2844,14 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
} }
if (cfg->p_encap != lp->p_encap) { if (cfg->p_encap != lp->p_encap) {
if (cfg->p_encap == ISDN_NET_ENCAP_RAWIP) { if (cfg->p_encap == ISDN_NET_ENCAP_RAWIP) {
p->dev.header_ops = NULL; p->dev->header_ops = NULL;
p->dev.flags = IFF_NOARP|IFF_POINTOPOINT; p->dev->flags = IFF_NOARP|IFF_POINTOPOINT;
} else { } else {
p->dev.header_ops = &isdn_header_ops; p->dev->header_ops = &isdn_header_ops;
if (cfg->p_encap == ISDN_NET_ENCAP_ETHER) if (cfg->p_encap == ISDN_NET_ENCAP_ETHER)
p->dev.flags = IFF_BROADCAST | IFF_MULTICAST; p->dev->flags = IFF_BROADCAST | IFF_MULTICAST;
else else
p->dev.flags = IFF_NOARP|IFF_POINTOPOINT; p->dev->flags = IFF_NOARP|IFF_POINTOPOINT;
} }
} }
lp->p_encap = cfg->p_encap; lp->p_encap = cfg->p_encap;
...@@ -3064,7 +3071,7 @@ isdn_net_force_hangup(char *name) ...@@ -3064,7 +3071,7 @@ isdn_net_force_hangup(char *name)
isdn_net_hangup(q); isdn_net_hangup(q);
q = (((isdn_net_local *) q->priv)->slave); q = (((isdn_net_local *) q->priv)->slave);
} }
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
return 0; return 0;
} }
return -ENODEV; return -ENODEV;
...@@ -3092,11 +3099,11 @@ isdn_net_realrm(isdn_net_dev * p, isdn_net_dev * q) ...@@ -3092,11 +3099,11 @@ isdn_net_realrm(isdn_net_dev * p, isdn_net_dev * q)
isdn_unexclusive_channel(p->local->pre_device, p->local->pre_channel); isdn_unexclusive_channel(p->local->pre_device, p->local->pre_channel);
if (p->local->master) { if (p->local->master) {
/* It's a slave-device, so update master's slave-pointer if necessary */ /* It's a slave-device, so update master's slave-pointer if necessary */
if (((isdn_net_local *) (p->local->master->priv))->slave == &p->dev) if (((isdn_net_local *) (p->local->master->priv))->slave == p->dev)
((isdn_net_local *) (p->local->master->priv))->slave = p->local->slave; ((isdn_net_local *) (p->local->master->priv))->slave = p->local->slave;
} else { } else {
/* Unregister only if it's a master-device */ /* Unregister only if it's a master-device */
unregister_netdev(&p->dev); unregister_netdev(p->dev);
} }
/* Unlink device from chain */ /* Unlink device from chain */
spin_lock_irqsave(&dev->lock, flags); spin_lock_irqsave(&dev->lock, flags);
...@@ -3124,7 +3131,7 @@ isdn_net_realrm(isdn_net_dev * p, isdn_net_dev * q) ...@@ -3124,7 +3131,7 @@ isdn_net_realrm(isdn_net_dev * p, isdn_net_dev * q)
/* If no more net-devices remain, disable auto-hangup timer */ /* If no more net-devices remain, disable auto-hangup timer */
if (dev->netdev == NULL) if (dev->netdev == NULL)
isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, 0); isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, 0);
kfree(p->local); free_netdev(p->dev);
kfree(p); kfree(p);
return 0; return 0;
......
...@@ -360,7 +360,7 @@ isdn_ppp_release(int min, struct file *file) ...@@ -360,7 +360,7 @@ isdn_ppp_release(int min, struct file *file)
* isdn_ppp_free() sets is->lp to NULL and lp->ppp_slot to -1 * isdn_ppp_free() sets is->lp to NULL and lp->ppp_slot to -1
* removing the IPPP_CONNECT flag omits calling of isdn_ppp_wakeup_daemon() * removing the IPPP_CONNECT flag omits calling of isdn_ppp_wakeup_daemon()
*/ */
isdn_net_hangup(&p->dev); isdn_net_hangup(p->dev);
} }
for (i = 0; i < NUM_RCV_BUFFS; i++) { for (i = 0; i < NUM_RCV_BUFFS; i++) {
kfree(is->rq[i].buf); kfree(is->rq[i].buf);
...@@ -531,7 +531,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg) ...@@ -531,7 +531,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
if (lp) { if (lp) {
/* OK .. we are ready to send buffers */ /* OK .. we are ready to send buffers */
is->pppcfg = val; /* isdn_ppp_xmit test for SC_ENABLE_IP !!! */ is->pppcfg = val; /* isdn_ppp_xmit test for SC_ENABLE_IP !!! */
netif_wake_queue(&lp->netdev->dev); netif_wake_queue(lp->netdev->dev);
break; break;
} }
} }
...@@ -1023,7 +1023,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf ...@@ -1023,7 +1023,7 @@ void isdn_ppp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buf
static void static void
isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff *skb, int proto) isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff *skb, int proto)
{ {
struct net_device *dev = &net_dev->dev; struct net_device *dev = net_dev->dev;
struct ippp_struct *is, *mis; struct ippp_struct *is, *mis;
isdn_net_local *mlp = NULL; isdn_net_local *mlp = NULL;
int slot; int slot;
......
...@@ -382,7 +382,7 @@ typedef struct isdn_net_dev_s { ...@@ -382,7 +382,7 @@ typedef struct isdn_net_dev_s {
online */ online */
spinlock_t queue_lock; /* lock to protect queue */ spinlock_t queue_lock; /* lock to protect queue */
void *next; /* Pointer to next isdn-interface */ void *next; /* Pointer to next isdn-interface */
struct net_device dev; /* interface to upper levels */ struct net_device *dev; /* interface to upper levels */
#ifdef CONFIG_ISDN_PPP #ifdef CONFIG_ISDN_PPP
ippp_bundle * pb; /* pointer to the common bundle structure ippp_bundle * pb; /* pointer to the common bundle structure
* with the per-bundle data */ * with the per-bundle data */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment