diff options
Diffstat (limited to 'net/irda/timer.c')
-rw-r--r-- | net/irda/timer.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/net/irda/timer.c b/net/irda/timer.c index 3871a2b911f9..d3a6ee8cc4a2 100644 --- a/net/irda/timer.c +++ b/net/irda/timer.c | |||
@@ -1,25 +1,25 @@ | |||
1 | /********************************************************************* | 1 | /********************************************************************* |
2 | * | 2 | * |
3 | * Filename: timer.c | 3 | * Filename: timer.c |
4 | * Version: | 4 | * Version: |
5 | * Description: | 5 | * Description: |
6 | * Status: Experimental. | 6 | * Status: Experimental. |
7 | * Author: Dag Brattli <dagb@cs.uit.no> | 7 | * Author: Dag Brattli <dagb@cs.uit.no> |
8 | * Created at: Sat Aug 16 00:59:29 1997 | 8 | * Created at: Sat Aug 16 00:59:29 1997 |
9 | * Modified at: Wed Dec 8 12:50:34 1999 | 9 | * Modified at: Wed Dec 8 12:50:34 1999 |
10 | * Modified by: Dag Brattli <dagb@cs.uit.no> | 10 | * Modified by: Dag Brattli <dagb@cs.uit.no> |
11 | * | 11 | * |
12 | * Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>, | 12 | * Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>, |
13 | * All Rights Reserved. | 13 | * All Rights Reserved. |
14 | * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com> | 14 | * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com> |
15 | * | 15 | * |
16 | * This program is free software; you can redistribute it and/or | 16 | * This program is free software; you can redistribute it and/or |
17 | * modify it under the terms of the GNU General Public License as | 17 | * modify it under the terms of the GNU General Public License as |
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsų admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsų admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
25 | ********************************************************************/ | 25 | ********************************************************************/ |
@@ -40,11 +40,11 @@ static void irlap_query_timer_expired(void* data); | |||
40 | static void irlap_final_timer_expired(void* data); | 40 | static void irlap_final_timer_expired(void* data); |
41 | static void irlap_wd_timer_expired(void* data); | 41 | static void irlap_wd_timer_expired(void* data); |
42 | static void irlap_backoff_timer_expired(void* data); | 42 | static void irlap_backoff_timer_expired(void* data); |
43 | static void irlap_media_busy_expired(void* data); | 43 | static void irlap_media_busy_expired(void* data); |
44 | 44 | ||
45 | void irlap_start_slot_timer(struct irlap_cb *self, int timeout) | 45 | void irlap_start_slot_timer(struct irlap_cb *self, int timeout) |
46 | { | 46 | { |
47 | irda_start_timer(&self->slot_timer, timeout, (void *) self, | 47 | irda_start_timer(&self->slot_timer, timeout, (void *) self, |
48 | irlap_slot_timer_expired); | 48 | irlap_slot_timer_expired); |
49 | } | 49 | } |
50 | 50 | ||
@@ -67,31 +67,31 @@ void irlap_start_query_timer(struct irlap_cb *self, int S, int s) | |||
67 | /* Set or re-set the timer. We reset the timer for each received | 67 | /* Set or re-set the timer. We reset the timer for each received |
68 | * discovery query, which allow us to automatically adjust to | 68 | * discovery query, which allow us to automatically adjust to |
69 | * the speed of the peer discovery (faster or slower). Jean II */ | 69 | * the speed of the peer discovery (faster or slower). Jean II */ |
70 | irda_start_timer( &self->query_timer, timeout, (void *) self, | 70 | irda_start_timer( &self->query_timer, timeout, (void *) self, |
71 | irlap_query_timer_expired); | 71 | irlap_query_timer_expired); |
72 | } | 72 | } |
73 | 73 | ||
74 | void irlap_start_final_timer(struct irlap_cb *self, int timeout) | 74 | void irlap_start_final_timer(struct irlap_cb *self, int timeout) |
75 | { | 75 | { |
76 | irda_start_timer(&self->final_timer, timeout, (void *) self, | 76 | irda_start_timer(&self->final_timer, timeout, (void *) self, |
77 | irlap_final_timer_expired); | 77 | irlap_final_timer_expired); |
78 | } | 78 | } |
79 | 79 | ||
80 | void irlap_start_wd_timer(struct irlap_cb *self, int timeout) | 80 | void irlap_start_wd_timer(struct irlap_cb *self, int timeout) |
81 | { | 81 | { |
82 | irda_start_timer(&self->wd_timer, timeout, (void *) self, | 82 | irda_start_timer(&self->wd_timer, timeout, (void *) self, |
83 | irlap_wd_timer_expired); | 83 | irlap_wd_timer_expired); |
84 | } | 84 | } |
85 | 85 | ||
86 | void irlap_start_backoff_timer(struct irlap_cb *self, int timeout) | 86 | void irlap_start_backoff_timer(struct irlap_cb *self, int timeout) |
87 | { | 87 | { |
88 | irda_start_timer(&self->backoff_timer, timeout, (void *) self, | 88 | irda_start_timer(&self->backoff_timer, timeout, (void *) self, |
89 | irlap_backoff_timer_expired); | 89 | irlap_backoff_timer_expired); |
90 | } | 90 | } |
91 | 91 | ||
92 | void irlap_start_mbusy_timer(struct irlap_cb *self, int timeout) | 92 | void irlap_start_mbusy_timer(struct irlap_cb *self, int timeout) |
93 | { | 93 | { |
94 | irda_start_timer(&self->media_busy_timer, timeout, | 94 | irda_start_timer(&self->media_busy_timer, timeout, |
95 | (void *) self, irlap_media_busy_expired); | 95 | (void *) self, irlap_media_busy_expired); |
96 | } | 96 | } |
97 | 97 | ||
@@ -109,25 +109,25 @@ void irlap_stop_mbusy_timer(struct irlap_cb *self) | |||
109 | irlap_do_event(self, MEDIA_BUSY_TIMER_EXPIRED, NULL, NULL); | 109 | irlap_do_event(self, MEDIA_BUSY_TIMER_EXPIRED, NULL, NULL); |
110 | } | 110 | } |
111 | 111 | ||
112 | void irlmp_start_watchdog_timer(struct lsap_cb *self, int timeout) | 112 | void irlmp_start_watchdog_timer(struct lsap_cb *self, int timeout) |
113 | { | 113 | { |
114 | irda_start_timer(&self->watchdog_timer, timeout, (void *) self, | 114 | irda_start_timer(&self->watchdog_timer, timeout, (void *) self, |
115 | irlmp_watchdog_timer_expired); | 115 | irlmp_watchdog_timer_expired); |
116 | } | 116 | } |
117 | 117 | ||
118 | void irlmp_start_discovery_timer(struct irlmp_cb *self, int timeout) | 118 | void irlmp_start_discovery_timer(struct irlmp_cb *self, int timeout) |
119 | { | 119 | { |
120 | irda_start_timer(&self->discovery_timer, timeout, (void *) self, | 120 | irda_start_timer(&self->discovery_timer, timeout, (void *) self, |
121 | irlmp_discovery_timer_expired); | 121 | irlmp_discovery_timer_expired); |
122 | } | 122 | } |
123 | 123 | ||
124 | void irlmp_start_idle_timer(struct lap_cb *self, int timeout) | 124 | void irlmp_start_idle_timer(struct lap_cb *self, int timeout) |
125 | { | 125 | { |
126 | irda_start_timer(&self->idle_timer, timeout, (void *) self, | 126 | irda_start_timer(&self->idle_timer, timeout, (void *) self, |
127 | irlmp_idle_timer_expired); | 127 | irlmp_idle_timer_expired); |
128 | } | 128 | } |
129 | 129 | ||
130 | void irlmp_stop_idle_timer(struct lap_cb *self) | 130 | void irlmp_stop_idle_timer(struct lap_cb *self) |
131 | { | 131 | { |
132 | /* If timer is activated, kill it! */ | 132 | /* If timer is activated, kill it! */ |
133 | del_timer(&self->idle_timer); | 133 | del_timer(&self->idle_timer); |
@@ -147,7 +147,7 @@ static void irlap_slot_timer_expired(void *data) | |||
147 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 147 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
148 | 148 | ||
149 | irlap_do_event(self, SLOT_TIMER_EXPIRED, NULL, NULL); | 149 | irlap_do_event(self, SLOT_TIMER_EXPIRED, NULL, NULL); |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | 152 | /* |
153 | * Function irlap_query_timer_expired (data) | 153 | * Function irlap_query_timer_expired (data) |
@@ -163,12 +163,12 @@ static void irlap_query_timer_expired(void *data) | |||
163 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 163 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
164 | 164 | ||
165 | irlap_do_event(self, QUERY_TIMER_EXPIRED, NULL, NULL); | 165 | irlap_do_event(self, QUERY_TIMER_EXPIRED, NULL, NULL); |
166 | } | 166 | } |
167 | 167 | ||
168 | /* | 168 | /* |
169 | * Function irda_final_timer_expired (data) | 169 | * Function irda_final_timer_expired (data) |
170 | * | 170 | * |
171 | * | 171 | * |
172 | * | 172 | * |
173 | */ | 173 | */ |
174 | static void irlap_final_timer_expired(void *data) | 174 | static void irlap_final_timer_expired(void *data) |
@@ -184,32 +184,32 @@ static void irlap_final_timer_expired(void *data) | |||
184 | /* | 184 | /* |
185 | * Function irda_wd_timer_expired (data) | 185 | * Function irda_wd_timer_expired (data) |
186 | * | 186 | * |
187 | * | 187 | * |
188 | * | 188 | * |
189 | */ | 189 | */ |
190 | static void irlap_wd_timer_expired(void *data) | 190 | static void irlap_wd_timer_expired(void *data) |
191 | { | 191 | { |
192 | struct irlap_cb *self = (struct irlap_cb *) data; | 192 | struct irlap_cb *self = (struct irlap_cb *) data; |
193 | 193 | ||
194 | IRDA_ASSERT(self != NULL, return;); | 194 | IRDA_ASSERT(self != NULL, return;); |
195 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 195 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
196 | 196 | ||
197 | irlap_do_event(self, WD_TIMER_EXPIRED, NULL, NULL); | 197 | irlap_do_event(self, WD_TIMER_EXPIRED, NULL, NULL); |
198 | } | 198 | } |
199 | 199 | ||
200 | /* | 200 | /* |
201 | * Function irda_backoff_timer_expired (data) | 201 | * Function irda_backoff_timer_expired (data) |
202 | * | 202 | * |
203 | * | 203 | * |
204 | * | 204 | * |
205 | */ | 205 | */ |
206 | static void irlap_backoff_timer_expired(void *data) | 206 | static void irlap_backoff_timer_expired(void *data) |
207 | { | 207 | { |
208 | struct irlap_cb *self = (struct irlap_cb *) data; | 208 | struct irlap_cb *self = (struct irlap_cb *) data; |
209 | 209 | ||
210 | IRDA_ASSERT(self != NULL, return;); | 210 | IRDA_ASSERT(self != NULL, return;); |
211 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); | 211 | IRDA_ASSERT(self->magic == LAP_MAGIC, return;); |
212 | 212 | ||
213 | irlap_do_event(self, BACKOFF_TIMER_EXPIRED, NULL, NULL); | 213 | irlap_do_event(self, BACKOFF_TIMER_EXPIRED, NULL, NULL); |
214 | } | 214 | } |
215 | 215 | ||
@@ -217,7 +217,7 @@ static void irlap_backoff_timer_expired(void *data) | |||
217 | /* | 217 | /* |
218 | * Function irtty_media_busy_expired (data) | 218 | * Function irtty_media_busy_expired (data) |
219 | * | 219 | * |
220 | * | 220 | * |
221 | */ | 221 | */ |
222 | void irlap_media_busy_expired(void* data) | 222 | void irlap_media_busy_expired(void* data) |
223 | { | 223 | { |