Commit 5d1931fc authored by Steven Whitehouse's avatar Steven Whitehouse Committed by David S. Miller

[DECNET]: Update to support timeouts.

parent 69dda393
This diff is collapsed.
...@@ -181,30 +181,74 @@ static struct dn_dev_sysctl_table { ...@@ -181,30 +181,74 @@ static struct dn_dev_sysctl_table {
} dn_dev_sysctl = { } dn_dev_sysctl = {
NULL, NULL,
{ {
{NET_DECNET_CONF_DEV_FORWARDING, "forwarding", {
(void *)DN_DEV_PARMS_OFFSET(forwarding), .ctl_name = NET_DECNET_CONF_DEV_FORWARDING,
sizeof(int), 0644, NULL, .procname = "forwarding",
dn_forwarding_proc, dn_forwarding_sysctl, .data = (void *)DN_DEV_PARMS_OFFSET(forwarding),
NULL, NULL, NULL}, .maxlen = sizeof(int),
{NET_DECNET_CONF_DEV_PRIORITY, "priority", .mode = 0644,
(void *)DN_DEV_PARMS_OFFSET(priority), .proc_handler = dn_forwarding_proc,
sizeof(int), 0644, NULL, .strategy = dn_forwarding_sysctl,
proc_dointvec_minmax, sysctl_intvec, },
NULL, &min_priority, &max_priority}, {
{NET_DECNET_CONF_DEV_T2, "t2", (void *)DN_DEV_PARMS_OFFSET(t2), .ctl_name = NET_DECNET_CONF_DEV_PRIORITY,
sizeof(int), 0644, NULL, .procname = "priority",
proc_dointvec_minmax, sysctl_intvec, .data = (void *)DN_DEV_PARMS_OFFSET(priority),
NULL, &min_t2, &max_t2}, .maxlen = sizeof(int),
{NET_DECNET_CONF_DEV_T3, "t3", (void *)DN_DEV_PARMS_OFFSET(t3), .mode = 0644,
sizeof(int), 0644, NULL, .proc_handler = proc_dointvec_minmax,
proc_dointvec_minmax, sysctl_intvec, .strategy = sysctl_intvec,
NULL, &min_t3, &max_t3}, .extra1 = &min_priority,
.extra2 = &max_priority
},
{
.ctl_name = NET_DECNET_CONF_DEV_T2,
.procname = "t2",
.data = (void *)DN_DEV_PARMS_OFFSET(t2),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.strategy = sysctl_intvec,
.extra1 = &min_t2,
.extra2 = &max_t2
},
{
.ctl_name = NET_DECNET_CONF_DEV_T3,
.procname = "t3",
.data = (void *)DN_DEV_PARMS_OFFSET(t3),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.strategy = sysctl_intvec,
.extra1 = &min_t3,
.extra2 = &max_t3
},
{0} {0}
}, },
{{0, "", NULL, 0, 0555, dn_dev_sysctl.dn_dev_vars}, {0}}, {{
{{NET_DECNET_CONF, "conf", NULL, 0, 0555, dn_dev_sysctl.dn_dev_dev}, {0}}, .ctl_name = 0,
{{NET_DECNET, "decnet", NULL, 0, 0555, dn_dev_sysctl.dn_dev_conf_dir}, {0}}, .procname = "",
{{CTL_NET, "net", NULL, 0, 0555, dn_dev_sysctl.dn_dev_proto_dir}, {0}} .mode = 0555,
.child = dn_dev_sysctl.dn_dev_vars
}, {0}},
{{
.ctl_name = NET_DECNET_CONF,
.procname = "conf",
.mode = 0555,
.child = dn_dev_sysctl.dn_dev_dev
}, {0}},
{{
.ctl_name = NET_DECNET,
.procname = "decnet",
.mode = 0555,
.child = dn_dev_sysctl.dn_dev_conf_dir
}, {0}},
{{
.ctl_name = CTL_NET,
.procname = "net",
.mode = 0555,
.child = dn_dev_sysctl.dn_dev_proto_dir
}, {0}}
}; };
static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms) static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms)
...@@ -1211,8 +1255,10 @@ void dn_dev_devices_off(void) ...@@ -1211,8 +1255,10 @@ void dn_dev_devices_off(void)
{ {
struct net_device *dev; struct net_device *dev;
rtnl_lock();
for(dev = dev_base; dev; dev = dev->next) for(dev = dev_base; dev; dev = dev->next)
dn_dev_down(dev); dn_dev_down(dev);
rtnl_unlock();
} }
...@@ -1220,10 +1266,12 @@ void dn_dev_devices_on(void) ...@@ -1220,10 +1266,12 @@ void dn_dev_devices_on(void)
{ {
struct net_device *dev; struct net_device *dev;
rtnl_lock();
for(dev = dev_base; dev; dev = dev->next) { for(dev = dev_base; dev; dev = dev->next) {
if (dev->flags & IFF_UP) if (dev->flags & IFF_UP)
dn_dev_up(dev); dn_dev_up(dev);
} }
rtnl_unlock();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment