net: replace remaining __FUNCTION__ occurrences
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / net / ipv6 / ndisc.c
index 8db5f4a419aac0ec3148bf636893fd7cf2181dd5..e0d023360a88706fde57c9179847e8c03886b13b 100644 (file)
@@ -270,7 +270,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
                        if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
                                ND_PRINTK2(KERN_WARNING
                                           "%s(): duplicated ND6 option found: type=%d\n",
-                                          __FUNCTION__,
+                                          __func__,
                                           nd_opt->nd_opt_type);
                        } else {
                                ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
@@ -301,7 +301,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
                                 */
                                ND_PRINTK2(KERN_NOTICE
                                           "%s(): ignored unsupported option; type=%d, len=%d\n",
-                                          __FUNCTION__,
+                                          __func__,
                                           nd_opt->nd_opt_type, nd_opt->nd_opt_len);
                        }
                }
@@ -462,7 +462,7 @@ static void __ndisc_send(struct net_device *dev,
        icmpv6_flow_init(ndisc_socket->sk, &fl, type,
                         saddr, daddr, dev->ifindex);
 
-       dst = ndisc_dst_alloc(dev, neigh, daddr, ip6_output);
+       dst = icmp6_dst_alloc(dev, neigh, daddr);
        if (!dst)
                return;
 
@@ -484,7 +484,7 @@ static void __ndisc_send(struct net_device *dev,
        if (!skb) {
                ND_PRINTK0(KERN_ERR
                           "ICMPv6 ND: %s() failed to allocate an skb.\n",
-                          __FUNCTION__);
+                          __func__);
                dst_release(dst);
                return;
        }
@@ -647,7 +647,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
                        ND_PRINTK1(KERN_DEBUG
                                   "%s(): trying to ucast probe in NUD_INVALID: "
                                   NIP6_FMT "\n",
-                                  __FUNCTION__,
+                                  __func__,
                                   NIP6(*target));
                }
                ndisc_send_ns(dev, neigh, target, target, saddr);
@@ -1149,7 +1149,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                if (rt == NULL) {
                        ND_PRINTK0(KERN_ERR
                                   "ICMPv6 RA: %s() failed to add default route.\n",
-                                  __FUNCTION__);
+                                  __func__);
                        in6_dev_put(in6_dev);
                        return;
                }
@@ -1158,7 +1158,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                if (neigh == NULL) {
                        ND_PRINTK0(KERN_ERR
                                   "ICMPv6 RA: %s() got default router without neighbour.\n",
-                                  __FUNCTION__);
+                                  __func__);
                        dst_release(&rt->u.dst);
                        in6_dev_put(in6_dev);
                        return;
@@ -1427,7 +1427,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
        icmpv6_flow_init(ndisc_socket->sk, &fl, NDISC_REDIRECT,
                         &saddr_buf, &ipv6_hdr(skb)->saddr, dev->ifindex);
 
-       dst = ip6_route_output(NULL, &fl);
+       dst = ip6_route_output(&init_net, NULL, &fl);
        if (dst == NULL)
                return;
 
@@ -1471,7 +1471,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
        if (buff == NULL) {
                ND_PRINTK0(KERN_ERR
                           "ICMPv6 Redirect: %s() failed to allocate an skb.\n",
-                          __FUNCTION__);
+                          __func__);
                dst_release(dst);
                return;
        }
@@ -1598,6 +1598,7 @@ int ndisc_rcv(struct sk_buff *skb)
 static int ndisc_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
        struct net_device *dev = ptr;
+       struct net *net = dev->nd_net;
 
        if (dev->nd_net != &init_net)
                return NOTIFY_DONE;
@@ -1605,11 +1606,11 @@ static int ndisc_netdev_event(struct notifier_block *this, unsigned long event,
        switch (event) {
        case NETDEV_CHANGEADDR:
                neigh_changeaddr(&nd_tbl, dev);
-               fib6_run_gc(~0UL);
+               fib6_run_gc(~0UL, net);
                break;
        case NETDEV_DOWN:
                neigh_ifdown(&nd_tbl, dev);
-               fib6_run_gc(~0UL);
+               fib6_run_gc(~0UL, net);
                break;
        default:
                break;