1 Index: linux-2.4.35.4/include/linux/atmdev.h
2 ===================================================================
3 --- linux-2.4.35.4.orig/include/linux/atmdev.h 2007-12-15 05:19:38.898637744 +0100
4 +++ linux-2.4.35.4/include/linux/atmdev.h 2007-12-15 05:20:02.816000717 +0100
6 struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
7 int number,atm_dev_flags_t *flags); /* number == -1: pick first available */
8 struct atm_dev *atm_dev_lookup(int number);
9 +void atm_dev_set_link_status(struct atm_dev *dev, int status);
10 void atm_dev_deregister(struct atm_dev *dev);
11 void shutdown_atm_dev(struct atm_dev *dev);
12 void vcc_insert_socket(struct sock *sk);
13 Index: linux-2.4.35.4/net/atm/resources.c
14 ===================================================================
15 --- linux-2.4.35.4.orig/net/atm/resources.c 2007-12-15 05:19:38.910638429 +0100
16 +++ linux-2.4.35.4/net/atm/resources.c 2007-12-15 05:20:02.824001175 +0100
18 #include <linux/sonet.h>
19 #include <linux/kernel.h> /* for barrier */
20 #include <linux/module.h>
21 +#include <linux/kmod.h>
22 #include <linux/bitops.h>
23 #include <net/sock.h> /* for struct sock */
24 #include <asm/segment.h> /* for get_fs_long and put_fs_long */
29 +#ifdef CONFIG_HOTPLUG
30 +static void atm_run_sbin_hotplug(struct atm_dev *dev, char *action)
32 + char *argv[3], *envp[5], ifname[12 + IFNAMSIZ], atmname[255], action_str[32];
35 + sprintf(ifname, "INTERFACE=atm%d", dev->number);
36 + sprintf(atmname, "ATMDRIVER=%s", dev->type);
37 + sprintf(action_str, "ACTION=%s", action);
40 + argv[i++] = hotplug_path;
45 + /* minimal command environment */
46 + envp [i++] = "HOME=/";
47 + envp [i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
48 + envp [i++] = ifname;
49 + envp [i++] = atmname;
50 + envp [i++] = action_str;
53 + return call_usermodehelper(argv [0], argv, envp);
57 +void atm_dev_set_link_status(struct atm_dev *dev, int status)
59 +#ifdef CONFIG_HOTPLUG
61 + atm_run_sbin_hotplug(dev, "up");
63 + atm_run_sbin_hotplug(dev, "down");
67 struct atm_dev *atm_dev_register(const char *type, const struct atmdev_ops *ops,
68 int number, atm_dev_flags_t *flags)
75 +#ifdef CONFIG_HOTPLUG
76 + atm_run_sbin_hotplug(dev, "register");
83 void atm_dev_deregister(struct atm_dev *dev)
85 unsigned long warning_time;
87 +#ifdef CONFIG_HOTPLUG
88 + atm_run_sbin_hotplug(dev, "unregister");
92 if (dev->ops->proc_read)
97 +EXPORT_SYMBOL(atm_dev_set_link_status);
98 EXPORT_SYMBOL(atm_dev_register);
99 EXPORT_SYMBOL(atm_dev_deregister);
100 EXPORT_SYMBOL(atm_dev_lookup);