diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-06 16:18:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-06 16:18:22 -0400 |
commit | 0d502d8267ebab9ae4b5b4c065d20196d6069f52 (patch) | |
tree | 303f53ec61b4e291a75c9f5617fcef4ed7e55606 /net | |
parent | 09384dfc76e526c3993c09c42e016372dc9dd22c (diff) | |
parent | a9dfac3353b03432e3d46a0dde6795588c46256d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee802154/af_ieee802154.c | 8 | ||||
-rw-r--r-- | net/ieee802154/dgram.c | 14 | ||||
-rw-r--r-- | net/ieee802154/raw.c | 14 |
3 files changed, 33 insertions, 3 deletions
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index 3bb6bdb1dac1..af661805b9fa 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c | |||
@@ -136,7 +136,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, | |||
136 | unsigned int cmd) | 136 | unsigned int cmd) |
137 | { | 137 | { |
138 | struct ifreq ifr; | 138 | struct ifreq ifr; |
139 | int ret = -EINVAL; | 139 | int ret = -ENOIOCTLCMD; |
140 | struct net_device *dev; | 140 | struct net_device *dev; |
141 | 141 | ||
142 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) | 142 | if (copy_from_user(&ifr, arg, sizeof(struct ifreq))) |
@@ -146,8 +146,10 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, | |||
146 | 146 | ||
147 | dev_load(sock_net(sk), ifr.ifr_name); | 147 | dev_load(sock_net(sk), ifr.ifr_name); |
148 | dev = dev_get_by_name(sock_net(sk), ifr.ifr_name); | 148 | dev = dev_get_by_name(sock_net(sk), ifr.ifr_name); |
149 | if (dev->type == ARPHRD_IEEE802154 || | 149 | |
150 | dev->type == ARPHRD_IEEE802154_PHY) | 150 | if ((dev->type == ARPHRD_IEEE802154 || |
151 | dev->type == ARPHRD_IEEE802154_PHY) && | ||
152 | dev->netdev_ops->ndo_do_ioctl) | ||
151 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); | 153 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); |
152 | 154 | ||
153 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) | 155 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) |
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 14d39840dd62..ba8b214dda8f 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c | |||
@@ -377,6 +377,18 @@ int ieee802154_dgram_deliver(struct net_device *dev, struct sk_buff *skb) | |||
377 | return ret; | 377 | return ret; |
378 | } | 378 | } |
379 | 379 | ||
380 | static int dgram_getsockopt(struct sock *sk, int level, int optname, | ||
381 | char __user *optval, int __user *optlen) | ||
382 | { | ||
383 | return -EOPNOTSUPP; | ||
384 | } | ||
385 | |||
386 | static int dgram_setsockopt(struct sock *sk, int level, int optname, | ||
387 | char __user *optval, int __user optlen) | ||
388 | { | ||
389 | return -EOPNOTSUPP; | ||
390 | } | ||
391 | |||
380 | struct proto ieee802154_dgram_prot = { | 392 | struct proto ieee802154_dgram_prot = { |
381 | .name = "IEEE-802.15.4-MAC", | 393 | .name = "IEEE-802.15.4-MAC", |
382 | .owner = THIS_MODULE, | 394 | .owner = THIS_MODULE, |
@@ -391,5 +403,7 @@ struct proto ieee802154_dgram_prot = { | |||
391 | .connect = dgram_connect, | 403 | .connect = dgram_connect, |
392 | .disconnect = dgram_disconnect, | 404 | .disconnect = dgram_disconnect, |
393 | .ioctl = dgram_ioctl, | 405 | .ioctl = dgram_ioctl, |
406 | .getsockopt = dgram_getsockopt, | ||
407 | .setsockopt = dgram_setsockopt, | ||
394 | }; | 408 | }; |
395 | 409 | ||
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index fca44d59f97e..9315977c4c61 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c | |||
@@ -238,6 +238,18 @@ void ieee802154_raw_deliver(struct net_device *dev, struct sk_buff *skb) | |||
238 | read_unlock(&raw_lock); | 238 | read_unlock(&raw_lock); |
239 | } | 239 | } |
240 | 240 | ||
241 | static int raw_getsockopt(struct sock *sk, int level, int optname, | ||
242 | char __user *optval, int __user *optlen) | ||
243 | { | ||
244 | return -EOPNOTSUPP; | ||
245 | } | ||
246 | |||
247 | static int raw_setsockopt(struct sock *sk, int level, int optname, | ||
248 | char __user *optval, int __user optlen) | ||
249 | { | ||
250 | return -EOPNOTSUPP; | ||
251 | } | ||
252 | |||
241 | struct proto ieee802154_raw_prot = { | 253 | struct proto ieee802154_raw_prot = { |
242 | .name = "IEEE-802.15.4-RAW", | 254 | .name = "IEEE-802.15.4-RAW", |
243 | .owner = THIS_MODULE, | 255 | .owner = THIS_MODULE, |
@@ -250,5 +262,7 @@ struct proto ieee802154_raw_prot = { | |||
250 | .unhash = raw_unhash, | 262 | .unhash = raw_unhash, |
251 | .connect = raw_connect, | 263 | .connect = raw_connect, |
252 | .disconnect = raw_disconnect, | 264 | .disconnect = raw_disconnect, |
265 | .getsockopt = raw_getsockopt, | ||
266 | .setsockopt = raw_setsockopt, | ||
253 | }; | 267 | }; |
254 | 268 | ||