1 diff -urN linux.old/include/linux/atmdev.h linux.dev/include/linux/atmdev.h
2 --- linux.old/include/linux/atmdev.h 2005-11-17 12:51:55.883585000 +0100
3 +++ linux.dev/include/linux/atmdev.h 2005-11-17 13:49:22.012671000 +0100
5 struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
6 int number,atm_dev_flags_t *flags); /* number == -1: pick first available */
7 struct atm_dev *atm_dev_lookup(int number);
8 +void atm_dev_set_link_status(struct atm_dev *dev, int status);
9 void atm_dev_deregister(struct atm_dev *dev);
10 void shutdown_atm_dev(struct atm_dev *dev);
11 void vcc_insert_socket(struct sock *sk);
12 diff -urN linux.old/net/atm/resources.c linux.dev/net/atm/resources.c
13 --- linux.old/net/atm/resources.c 2003-11-28 19:26:21.000000000 +0100
14 +++ linux.dev/net/atm/resources.c 2005-11-17 14:27:26.514267750 +0100
16 #include <linux/sonet.h>
17 #include <linux/kernel.h> /* for barrier */
18 #include <linux/module.h>
19 +#include <linux/kmod.h>
20 #include <linux/bitops.h>
21 #include <net/sock.h> /* for struct sock */
22 #include <asm/segment.h> /* for get_fs_long and put_fs_long */
27 +#ifdef CONFIG_HOTPLUG
28 +static void atm_run_sbin_hotplug(struct atm_dev *dev, char *action)
30 + char *argv[3], *envp[5], ifname[12 + IFNAMSIZ], atmname[255], action_str[32];
33 + sprintf(ifname, "INTERFACE=atm%d", dev->number);
34 + sprintf(atmname, "ATMDRIVER=%s", dev->type);
35 + sprintf(action_str, "ACTION=%s", action);
38 + argv[i++] = hotplug_path;
43 + /* minimal command environment */
44 + envp [i++] = "HOME=/";
45 + envp [i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
46 + envp [i++] = ifname;
47 + envp [i++] = atmname;
48 + envp [i++] = action_str;
51 + return call_usermodehelper(argv [0], argv, envp);
55 +void atm_dev_set_link_status(struct atm_dev *dev, int status)
57 +#ifdef CONFIG_HOTPLUG
59 + atm_run_sbin_hotplug(dev, "up");
61 + atm_run_sbin_hotplug(dev, "down");
65 struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
66 int number, atm_dev_flags_t *flags)
73 +#ifdef CONFIG_HOTPLUG
74 + atm_run_sbin_hotplug(dev, "register");
81 void atm_dev_deregister(struct atm_dev *dev)
83 unsigned long warning_time;
85 +#ifdef CONFIG_HOTPLUG
86 + atm_run_sbin_hotplug(dev, "unregister");
90 if (dev->ops->proc_read)
95 +EXPORT_SYMBOL(atm_dev_set_link_status);
96 EXPORT_SYMBOL(atm_dev_register);
97 EXPORT_SYMBOL(atm_dev_deregister);
98 EXPORT_SYMBOL(atm_dev_lookup);