aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irnetlink.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c
index 1e429c929739..cd9ff176ecde 100644
--- a/net/irda/irnetlink.c
+++ b/net/irda/irnetlink.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/socket.h> 16#include <linux/socket.h>
17#include <linux/irda.h> 17#include <linux/irda.h>
18#include <net/net_namespace.h>
18#include <net/sock.h> 19#include <net/sock.h>
19#include <net/irda/irda.h> 20#include <net/irda/irda.h>
20#include <net/irda/irlap.h> 21#include <net/irda/irlap.h>
@@ -30,7 +31,7 @@ static struct genl_family irda_nl_family = {
30 .maxattr = IRDA_NL_CMD_MAX, 31 .maxattr = IRDA_NL_CMD_MAX,
31}; 32};
32 33
33static struct net_device * ifname_to_netdev(struct genl_info *info) 34static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *info)
34{ 35{
35 char * ifname; 36 char * ifname;
36 37
@@ -41,7 +42,7 @@ static struct net_device * ifname_to_netdev(struct genl_info *info)
41 42
42 IRDA_DEBUG(5, "%s(): Looking for %s\n", __FUNCTION__, ifname); 43 IRDA_DEBUG(5, "%s(): Looking for %s\n", __FUNCTION__, ifname);
43 44
44 return dev_get_by_name(ifname); 45 return dev_get_by_name(net, ifname);
45} 46}
46 47
47static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info) 48static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info)
@@ -57,7 +58,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info)
57 58
58 IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __FUNCTION__, mode); 59 IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __FUNCTION__, mode);
59 60
60 dev = ifname_to_netdev(info); 61 dev = ifname_to_netdev(&init_net, info);
61 if (!dev) 62 if (!dev)
62 return -ENODEV; 63 return -ENODEV;
63 64
@@ -82,7 +83,7 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info)
82 void *hdr; 83 void *hdr;
83 int ret = -ENOBUFS; 84 int ret = -ENOBUFS;
84 85
85 dev = ifname_to_netdev(info); 86 dev = ifname_to_netdev(&init_net, info);
86 if (!dev) 87 if (!dev)
87 return -ENODEV; 88 return -ENODEV;
88 89