Fix occurrences of "the the "
[powerpc.git] / net / core / rtnetlink.c
index bc95fab..8c971a2 100644 (file)
 #include <net/pkt_sched.h>
 #include <net/fib_rules.h>
 #include <net/rtnetlink.h>
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-#include <linux/wireless.h>
-#include <net/iw_handler.h>
-#endif /* CONFIG_NET_WIRELESS_RTNETLINK */
 
 struct rtnl_link
 {
@@ -101,7 +97,7 @@ int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len)
        return 0;
 }
 
-struct rtnl_link *rtnl_msg_handlers[NPROTO];
+static struct rtnl_link *rtnl_msg_handlers[NPROTO];
 
 static inline int rtm_msgindex(int msgtype)
 {
@@ -399,7 +395,7 @@ static void set_operstate(struct net_device *dev, unsigned char transition)
                    operstate == IF_OPER_UNKNOWN)
                        operstate = IF_OPER_DORMANT;
                break;
-       };
+       }
 
        if (dev->operstate != operstate) {
                write_lock_bh(&dev_base_lock);
@@ -543,13 +539,16 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
        int s_idx = cb->args[0];
        struct net_device *dev;
 
-       for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) {
+       idx = 0;
+       for_each_netdev(dev) {
                if (idx < s_idx)
-                       continue;
+                       goto cont;
                if (rtnl_fill_ifinfo(skb, dev, NULL, 0, RTM_NEWLINK,
                                     NETLINK_CB(cb->skb).pid,
                                     cb->nlh->nlmsg_seq, 0, NLM_F_MULTI) <= 0)
                        break;
+cont:
+               idx++;
        }
        cb->args[0] = idx;
 
@@ -684,17 +683,6 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
                modified = 1;
        }
 
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-       if (tb[IFLA_WIRELESS]) {
-               /* Call Wireless Extensions.
-                * Various stuff checked in there... */
-               err = wireless_rtnetlink_set(dev, nla_data(tb[IFLA_WIRELESS]),
-                                            nla_len(tb[IFLA_WIRELESS]));
-               if (err < 0)
-                       goto errout_dev;
-       }
-#endif /* CONFIG_NET_WIRELESS_RTNETLINK */
-
        if (tb[IFLA_BROADCAST]) {
                nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
                send_addr_notify = 1;
@@ -758,22 +746,6 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
        } else
                return -EINVAL;
 
-
-#ifdef CONFIG_NET_WIRELESS_RTNETLINK
-       if (tb[IFLA_WIRELESS]) {
-               /* Call Wireless Extensions. We need to know the size before
-                * we can alloc. Various stuff checked in there... */
-               err = wireless_rtnetlink_get(dev, nla_data(tb[IFLA_WIRELESS]),
-                                            nla_len(tb[IFLA_WIRELESS]),
-                                            &iw_buf, &iw_buf_len);
-               if (err < 0)
-                       goto errout;
-
-               /* Payload is at an offset in buffer */
-               iw = iw_buf + IW_EV_POINT_OFF;
-       }
-#endif /* CONFIG_NET_WIRELESS_RTNETLINK */
-
        nskb = nlmsg_new(if_nlmsg_size(iw_buf_len), GFP_KERNEL);
        if (nskb == NULL) {
                err = -ENOBUFS;
@@ -796,7 +768,7 @@ errout:
        return err;
 }
 
-int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
+static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
 {
        int idx;
        int s_idx = cb->family;
@@ -820,8 +792,6 @@ int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
        return skb->len;
 }
 
-EXPORT_SYMBOL_GPL(rtnl_dump_all);
-
 void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
 {
        struct sk_buff *skb;