Revert "sunrpc: move the close processing after do recvfrom method"
[safe/jmp/linux-2.6] / net / ieee802154 / af_ieee802154.c
index d504c34..bad1c49 100644 (file)
@@ -147,9 +147,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,
        dev_load(sock_net(sk), ifr.ifr_name);
        dev = dev_get_by_name(sock_net(sk), ifr.ifr_name);
 
-       if ((dev->type == ARPHRD_IEEE802154 ||
-            dev->type == ARPHRD_IEEE802154_PHY) &&
-           dev->netdev_ops->ndo_do_ioctl)
+       if (dev->type == ARPHRD_IEEE802154 && dev->netdev_ops->ndo_do_ioctl)
                ret = dev->netdev_ops->ndo_do_ioctl(dev, &ifr, cmd);
 
        if (!ret && copy_to_user(arg, &ifr, sizeof(struct ifreq)))
@@ -236,14 +234,14 @@ static const struct proto_ops ieee802154_dgram_ops = {
  * set the state.
  */
 static int ieee802154_create(struct net *net, struct socket *sock,
-               int protocol)
+                            int protocol, int kern)
 {
        struct sock *sk;
        int rc;
        struct proto *proto;
        const struct proto_ops *ops;
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return -EAFNOSUPPORT;
 
        switch (sock->type) {
@@ -287,7 +285,7 @@ out:
        return rc;
 }
 
-static struct net_proto_family ieee802154_family_ops = {
+static const struct net_proto_family ieee802154_family_ops = {
        .family         = PF_IEEE802154,
        .create         = ieee802154_create,
        .owner          = THIS_MODULE,