aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 909a03d6c0e9..6628e457ddc0 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -396,28 +396,22 @@ static struct attribute_group wireless_group = {
396#endif /* CONFIG_SYSFS */ 396#endif /* CONFIG_SYSFS */
397 397
398#ifdef CONFIG_HOTPLUG 398#ifdef CONFIG_HOTPLUG
399static int netdev_uevent(struct device *d, char **envp, 399static int netdev_uevent(struct device *d, struct kobj_uevent_env *env)
400 int num_envp, char *buf, int size)
401{ 400{
402 struct net_device *dev = to_net_dev(d); 401 struct net_device *dev = to_net_dev(d);
403 int retval, len = 0, i = 0; 402 int retval;
404 403
405 /* pass interface to uevent. */ 404 /* pass interface to uevent. */
406 retval = add_uevent_var(envp, num_envp, &i, 405 retval = add_uevent_var(env, "INTERFACE=%s", dev->name);
407 buf, size, &len,
408 "INTERFACE=%s", dev->name);
409 if (retval) 406 if (retval)
410 goto exit; 407 goto exit;
411 408
412 /* pass ifindex to uevent. 409 /* pass ifindex to uevent.
413 * ifindex is useful as it won't change (interface name may change) 410 * ifindex is useful as it won't change (interface name may change)
414 * and is what RtNetlink uses natively. */ 411 * and is what RtNetlink uses natively. */
415 retval = add_uevent_var(envp, num_envp, &i, 412 retval = add_uevent_var(env, "IFINDEX=%d", dev->ifindex);
416 buf, size, &len,
417 "IFINDEX=%d", dev->ifindex);
418 413
419exit: 414exit:
420 envp[i] = NULL;
421 return retval; 415 return retval;
422} 416}
423#endif 417#endif