aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/dlci.c4
-rw-r--r--drivers/net/wan/sbni.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c
index 61041d5186ac..bc12810157e0 100644
--- a/drivers/net/wan/dlci.c
+++ b/drivers/net/wan/dlci.c
@@ -361,7 +361,7 @@ static int dlci_add(struct dlci_add *dlci)
361 361
362 362
363 /* validate slave device */ 363 /* validate slave device */
364 slave = dev_get_by_name(dlci->devname); 364 slave = dev_get_by_name(&init_net, dlci->devname);
365 if (!slave) 365 if (!slave)
366 return -ENODEV; 366 return -ENODEV;
367 367
@@ -427,7 +427,7 @@ static int dlci_del(struct dlci_add *dlci)
427 int err; 427 int err;
428 428
429 /* validate slave device */ 429 /* validate slave device */
430 master = __dev_get_by_name(dlci->devname); 430 master = __dev_get_by_name(&init_net, dlci->devname);
431 if (!master) 431 if (!master)
432 return(-ENODEV); 432 return(-ENODEV);
433 433
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 1cc18e787a65..8d7e01e8f56f 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -54,6 +54,7 @@
54#include <linux/init.h> 54#include <linux/init.h>
55#include <linux/delay.h> 55#include <linux/delay.h>
56 56
57#include <net/net_namespace.h>
57#include <net/arp.h> 58#include <net/arp.h>
58 59
59#include <asm/io.h> 60#include <asm/io.h>
@@ -1361,7 +1362,7 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )
1361 1362
1362 if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name )) 1363 if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))
1363 return -EFAULT; 1364 return -EFAULT;
1364 slave_dev = dev_get_by_name( slave_name ); 1365 slave_dev = dev_get_by_name(&init_net, slave_name );
1365 if( !slave_dev || !(slave_dev->flags & IFF_UP) ) { 1366 if( !slave_dev || !(slave_dev->flags & IFF_UP) ) {
1366 printk( KERN_ERR "%s: trying to enslave non-active " 1367 printk( KERN_ERR "%s: trying to enslave non-active "
1367 "device %s\n", dev->name, slave_name ); 1368 "device %s\n", dev->name, slave_name );