aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/ax25.h1
-rw-r--r--net/ax25/ax25_dev.c2
-rw-r--r--net/ax25/ax25_ds_timer.c12
3 files changed, 6 insertions, 9 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 3f0236f1d23e..717e2192d521 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -324,6 +324,7 @@ extern void ax25_dama_on(ax25_cb *);
324extern void ax25_dama_off(ax25_cb *); 324extern void ax25_dama_off(ax25_cb *);
325 325
326/* ax25_ds_timer.c */ 326/* ax25_ds_timer.c */
327extern void ax25_ds_setup_timer(ax25_dev *);
327extern void ax25_ds_set_timer(ax25_dev *); 328extern void ax25_ds_set_timer(ax25_dev *);
328extern void ax25_ds_del_timer(ax25_dev *); 329extern void ax25_ds_del_timer(ax25_dev *);
329extern void ax25_ds_timer(ax25_cb *); 330extern void ax25_ds_timer(ax25_cb *);
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index 528c874d9828..a7a0e0c9698b 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -82,7 +82,7 @@ void ax25_dev_device_up(struct net_device *dev)
82 ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; 82 ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT;
83 83
84#if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER) 84#if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER)
85 init_timer(&ax25_dev->dama.slave_timer); 85 ax25_ds_setup_timer(ax25_dev);
86#endif 86#endif
87 87
88 spin_lock_bh(&ax25_dev_lock); 88 spin_lock_bh(&ax25_dev_lock);
diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c
index c4e3b025d21c..2ce79df00680 100644
--- a/net/ax25/ax25_ds_timer.c
+++ b/net/ax25/ax25_ds_timer.c
@@ -40,13 +40,10 @@ static void ax25_ds_timeout(unsigned long);
40 * 1/10th of a second. 40 * 1/10th of a second.
41 */ 41 */
42 42
43static void ax25_ds_add_timer(ax25_dev *ax25_dev) 43void ax25_ds_setup_timer(ax25_dev *ax25_dev)
44{ 44{
45 struct timer_list *t = &ax25_dev->dama.slave_timer; 45 setup_timer(&ax25_dev->dama.slave_timer, ax25_ds_timeout,
46 t->data = (unsigned long) ax25_dev; 46 (unsigned long)ax25_dev);
47 t->function = &ax25_ds_timeout;
48 t->expires = jiffies + HZ;
49 add_timer(t);
50} 47}
51 48
52void ax25_ds_del_timer(ax25_dev *ax25_dev) 49void ax25_ds_del_timer(ax25_dev *ax25_dev)
@@ -60,10 +57,9 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev)
60 if (ax25_dev == NULL) /* paranoia */ 57 if (ax25_dev == NULL) /* paranoia */
61 return; 58 return;
62 59
63 del_timer(&ax25_dev->dama.slave_timer);
64 ax25_dev->dama.slave_timeout = 60 ax25_dev->dama.slave_timeout =
65 msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10; 61 msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10;
66 ax25_ds_add_timer(ax25_dev); 62 mod_timer(&ax25_dev->dama.slave_timer, jiffies + HZ);
67} 63}
68 64
69/* 65/*