aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/eql.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/eql.c')
-rw-r--r--drivers/net/eql.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/eql.c b/drivers/net/eql.c
index 102218c4a907..f1cc66dcbdfd 100644
--- a/drivers/net/eql.c
+++ b/drivers/net/eql.c
@@ -116,6 +116,7 @@
116#include <linux/init.h> 116#include <linux/init.h>
117#include <linux/timer.h> 117#include <linux/timer.h>
118#include <linux/netdevice.h> 118#include <linux/netdevice.h>
119#include <net/net_namespace.h>
119 120
120#include <linux/if.h> 121#include <linux/if.h>
121#include <linux/if_arp.h> 122#include <linux/if_arp.h>
@@ -412,7 +413,7 @@ static int eql_enslave(struct net_device *master_dev, slaving_request_t __user *
412 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t))) 413 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t)))
413 return -EFAULT; 414 return -EFAULT;
414 415
415 slave_dev = dev_get_by_name(srq.slave_name); 416 slave_dev = dev_get_by_name(&init_net, srq.slave_name);
416 if (slave_dev) { 417 if (slave_dev) {
417 if ((master_dev->flags & IFF_UP) == IFF_UP) { 418 if ((master_dev->flags & IFF_UP) == IFF_UP) {
418 /* slave is not a master & not already a slave: */ 419 /* slave is not a master & not already a slave: */
@@ -460,7 +461,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __use
460 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t))) 461 if (copy_from_user(&srq, srqp, sizeof (slaving_request_t)))
461 return -EFAULT; 462 return -EFAULT;
462 463
463 slave_dev = dev_get_by_name(srq.slave_name); 464 slave_dev = dev_get_by_name(&init_net, srq.slave_name);
464 ret = -EINVAL; 465 ret = -EINVAL;
465 if (slave_dev) { 466 if (slave_dev) {
466 spin_lock_bh(&eql->queue.lock); 467 spin_lock_bh(&eql->queue.lock);
@@ -493,7 +494,7 @@ static int eql_g_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
493 if (copy_from_user(&sc, scp, sizeof (slave_config_t))) 494 if (copy_from_user(&sc, scp, sizeof (slave_config_t)))
494 return -EFAULT; 495 return -EFAULT;
495 496
496 slave_dev = dev_get_by_name(sc.slave_name); 497 slave_dev = dev_get_by_name(&init_net, sc.slave_name);
497 if (!slave_dev) 498 if (!slave_dev)
498 return -ENODEV; 499 return -ENODEV;
499 500
@@ -528,7 +529,7 @@ static int eql_s_slave_cfg(struct net_device *dev, slave_config_t __user *scp)
528 if (copy_from_user(&sc, scp, sizeof (slave_config_t))) 529 if (copy_from_user(&sc, scp, sizeof (slave_config_t)))
529 return -EFAULT; 530 return -EFAULT;
530 531
531 slave_dev = dev_get_by_name(sc.slave_name); 532 slave_dev = dev_get_by_name(&init_net, sc.slave_name);
532 if (!slave_dev) 533 if (!slave_dev)
533 return -ENODEV; 534 return -ENODEV;
534 535