Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[pandora-kernel.git] / net / core / netpoll.c
index 06be243..18d9cbd 100644 (file)
@@ -539,7 +539,7 @@ int __netpoll_rx(struct sk_buff *skb)
 {
        int proto, len, ulen;
        int hits = 0;
-       struct iphdr *iph;
+       const struct iphdr *iph;
        struct udphdr *uh;
        struct netpoll_info *npinfo = skb->dev->npinfo;
        struct netpoll *np, *tmp;
@@ -698,32 +698,8 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
 
        if (*cur != 0) {
                /* MAC address */
-               if ((delim = strchr(cur, ':')) == NULL)
-                       goto parse_failed;
-               *delim = 0;
-               np->remote_mac[0] = simple_strtol(cur, NULL, 16);
-               cur = delim + 1;
-               if ((delim = strchr(cur, ':')) == NULL)
-                       goto parse_failed;
-               *delim = 0;
-               np->remote_mac[1] = simple_strtol(cur, NULL, 16);
-               cur = delim + 1;
-               if ((delim = strchr(cur, ':')) == NULL)
-                       goto parse_failed;
-               *delim = 0;
-               np->remote_mac[2] = simple_strtol(cur, NULL, 16);
-               cur = delim + 1;
-               if ((delim = strchr(cur, ':')) == NULL)
+               if (!mac_pton(cur, np->remote_mac))
                        goto parse_failed;
-               *delim = 0;
-               np->remote_mac[3] = simple_strtol(cur, NULL, 16);
-               cur = delim + 1;
-               if ((delim = strchr(cur, ':')) == NULL)
-                       goto parse_failed;
-               *delim = 0;
-               np->remote_mac[4] = simple_strtol(cur, NULL, 16);
-               cur = delim + 1;
-               np->remote_mac[5] = simple_strtol(cur, NULL, 16);
        }
 
        netpoll_print_options(np);
@@ -816,6 +792,13 @@ int netpoll_setup(struct netpoll *np)
                return -ENODEV;
        }
 
+       if (ndev->master) {
+               printk(KERN_ERR "%s: %s is a slave device, aborting.\n",
+                      np->name, np->dev_name);
+               err = -EBUSY;
+               goto put;
+       }
+
        if (!netif_running(ndev)) {
                unsigned long atmost, atleast;