aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsr/hsr_main.c
diff options
context:
space:
mode:
authorArvid Brodin <arvid.brodin@alten.se>2014-07-04 17:35:47 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-08 14:35:30 -0400
commitabff7162765cd66ab109c97fd433ef1f39299120 (patch)
tree4d7f1547bf99ac7a0e9a68556b8d74550ba26d0d /net/hsr/hsr_main.c
parent81ba6afd6e6443d2bf4bf40f16df1f1f91c603f8 (diff)
net/hsr: Move to per-hsr device prune timer.
Signed-off-by: Arvid Brodin <arvid.brodin@alten.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_main.c')
-rw-r--r--net/hsr/hsr_main.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c
index bcda901437bc..5f9cd7fdbd93 100644
--- a/net/hsr/hsr_main.c
+++ b/net/hsr/hsr_main.c
@@ -175,22 +175,6 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event,
175} 175}
176 176
177 177
178static struct timer_list prune_timer;
179
180static void prune_nodes_all(unsigned long data)
181{
182 struct hsr_priv *hsr;
183
184 rcu_read_lock();
185 list_for_each_entry_rcu(hsr, &hsr_list, hsr_list)
186 hsr_prune_nodes(hsr);
187 rcu_read_unlock();
188
189 prune_timer.expires = jiffies + msecs_to_jiffies(PRUNE_PERIOD);
190 add_timer(&prune_timer);
191}
192
193
194static struct notifier_block hsr_nb = { 178static struct notifier_block hsr_nb = {
195 .notifier_call = hsr_netdev_notify, /* Slave event notifications */ 179 .notifier_call = hsr_netdev_notify, /* Slave event notifications */
196}; 180};
@@ -202,14 +186,7 @@ static int __init hsr_init(void)
202 186
203 BUILD_BUG_ON(sizeof(struct hsr_tag) != HSR_HLEN); 187 BUILD_BUG_ON(sizeof(struct hsr_tag) != HSR_HLEN);
204 188
205 init_timer(&prune_timer);
206 prune_timer.function = prune_nodes_all;
207 prune_timer.data = 0;
208 prune_timer.expires = jiffies + msecs_to_jiffies(PRUNE_PERIOD);
209 add_timer(&prune_timer);
210
211 register_netdevice_notifier(&hsr_nb); 189 register_netdevice_notifier(&hsr_nb);
212
213 res = hsr_netlink_init(); 190 res = hsr_netlink_init();
214 191
215 return res; 192 return res;
@@ -218,7 +195,6 @@ static int __init hsr_init(void)
218static void __exit hsr_exit(void) 195static void __exit hsr_exit(void)
219{ 196{
220 unregister_netdevice_notifier(&hsr_nb); 197 unregister_netdevice_notifier(&hsr_nb);
221 del_timer_sync(&prune_timer);
222 hsr_netlink_exit(); 198 hsr_netlink_exit();
223} 199}
224 200