diff options
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/af_ieee802154.c | 4 | ||||
-rw-r--r-- | net/ieee802154/raw.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c index d504c349cb0c..cd949d5e451b 100644 --- a/net/ieee802154/af_ieee802154.c +++ b/net/ieee802154/af_ieee802154.c | |||
@@ -147,9 +147,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg, | |||
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 | 149 | ||
150 | if ((dev->type == ARPHRD_IEEE802154 || | 150 | if (dev->type == ARPHRD_IEEE802154 && dev->netdev_ops->ndo_do_ioctl) |
151 | dev->type == ARPHRD_IEEE802154_PHY) && | ||
152 | dev->netdev_ops->ndo_do_ioctl) | ||
153 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); | 151 | ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd); |
154 | 152 | ||
155 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) | 153 | if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq))) |
diff --git a/net/ieee802154/raw.c b/net/ieee802154/raw.c index 60dee69a1d04..4681501aae93 100644 --- a/net/ieee802154/raw.c +++ b/net/ieee802154/raw.c | |||
@@ -74,8 +74,7 @@ static int raw_bind(struct sock *sk, struct sockaddr *uaddr, int len) | |||
74 | goto out; | 74 | goto out; |
75 | } | 75 | } |
76 | 76 | ||
77 | if (dev->type != ARPHRD_IEEE802154_PHY && | 77 | if (dev->type != ARPHRD_IEEE802154) { |
78 | dev->type != ARPHRD_IEEE802154) { | ||
79 | err = -ENODEV; | 78 | err = -ENODEV; |
80 | goto out_put; | 79 | goto out_put; |
81 | } | 80 | } |