diff options
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r-- | drivers/isdn/mISDN/core.c | 8 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_audio.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_cmx.c | 8 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_core.c | 4 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_hwec.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_pipeline.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_tones.c | 92 | ||||
-rw-r--r-- | drivers/isdn/mISDN/l1oip_codec.c | 1 | ||||
-rw-r--r-- | drivers/isdn/mISDN/l1oip_core.c | 22 | ||||
-rw-r--r-- | drivers/isdn/mISDN/layer1.c | 3 | ||||
-rw-r--r-- | drivers/isdn/mISDN/layer2.c | 16 | ||||
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/stack.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/tei.c | 4 | ||||
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 9 |
15 files changed, 92 insertions, 85 deletions
diff --git a/drivers/isdn/mISDN/core.c b/drivers/isdn/mISDN/core.c index 33068177b7c9..751665c448d0 100644 --- a/drivers/isdn/mISDN/core.c +++ b/drivers/isdn/mISDN/core.c | |||
@@ -26,12 +26,12 @@ MODULE_LICENSE("GPL"); | |||
26 | module_param(debug, uint, S_IRUGO | S_IWUSR); | 26 | module_param(debug, uint, S_IRUGO | S_IWUSR); |
27 | 27 | ||
28 | static LIST_HEAD(devices); | 28 | static LIST_HEAD(devices); |
29 | DEFINE_RWLOCK(device_lock); | 29 | static DEFINE_RWLOCK(device_lock); |
30 | static u64 device_ids; | 30 | static u64 device_ids; |
31 | #define MAX_DEVICE_ID 63 | 31 | #define MAX_DEVICE_ID 63 |
32 | 32 | ||
33 | static LIST_HEAD(Bprotocols); | 33 | static LIST_HEAD(Bprotocols); |
34 | DEFINE_RWLOCK(bp_lock); | 34 | static DEFINE_RWLOCK(bp_lock); |
35 | 35 | ||
36 | struct mISDNdevice | 36 | struct mISDNdevice |
37 | *get_mdevice(u_int id) | 37 | *get_mdevice(u_int id) |
@@ -192,7 +192,7 @@ mISDN_unregister_Bprotocol(struct Bprotocol *bp) | |||
192 | } | 192 | } |
193 | EXPORT_SYMBOL(mISDN_unregister_Bprotocol); | 193 | EXPORT_SYMBOL(mISDN_unregister_Bprotocol); |
194 | 194 | ||
195 | int | 195 | static int |
196 | mISDNInit(void) | 196 | mISDNInit(void) |
197 | { | 197 | { |
198 | int err; | 198 | int err; |
@@ -224,7 +224,7 @@ error: | |||
224 | return err; | 224 | return err; |
225 | } | 225 | } |
226 | 226 | ||
227 | void mISDN_cleanup(void) | 227 | static void mISDN_cleanup(void) |
228 | { | 228 | { |
229 | misdn_sock_cleanup(); | 229 | misdn_sock_cleanup(); |
230 | mISDN_timer_cleanup(); | 230 | mISDN_timer_cleanup(); |
diff --git a/drivers/isdn/mISDN/dsp_audio.c b/drivers/isdn/mISDN/dsp_audio.c index 1c2dd5694773..de3795e3f432 100644 --- a/drivers/isdn/mISDN/dsp_audio.c +++ b/drivers/isdn/mISDN/dsp_audio.c | |||
@@ -30,7 +30,7 @@ EXPORT_SYMBOL(dsp_audio_s16_to_law); | |||
30 | /* alaw -> ulaw */ | 30 | /* alaw -> ulaw */ |
31 | u8 dsp_audio_alaw_to_ulaw[256]; | 31 | u8 dsp_audio_alaw_to_ulaw[256]; |
32 | /* ulaw -> alaw */ | 32 | /* ulaw -> alaw */ |
33 | u8 dsp_audio_ulaw_to_alaw[256]; | 33 | static u8 dsp_audio_ulaw_to_alaw[256]; |
34 | u8 dsp_silence; | 34 | u8 dsp_silence; |
35 | 35 | ||
36 | 36 | ||
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c index c2f51cc50760..c884511e2d49 100644 --- a/drivers/isdn/mISDN/dsp_cmx.c +++ b/drivers/isdn/mISDN/dsp_cmx.c | |||
@@ -1540,11 +1540,13 @@ send_packet: | |||
1540 | schedule_work(&dsp->workq); | 1540 | schedule_work(&dsp->workq); |
1541 | } | 1541 | } |
1542 | 1542 | ||
1543 | u32 samplecount; | 1543 | static u32 samplecount; |
1544 | struct timer_list dsp_spl_tl; | 1544 | struct timer_list dsp_spl_tl; |
1545 | u32 dsp_spl_jiffies; /* calculate the next time to fire */ | 1545 | u32 dsp_spl_jiffies; /* calculate the next time to fire */ |
1546 | u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */ | 1546 | #ifdef UNUSED |
1547 | struct timeval dsp_start_tv; /* time at start of calculation */ | 1547 | static u32 dsp_start_jiffies; /* jiffies at the time, the calculation begins */ |
1548 | #endif /* UNUSED */ | ||
1549 | static struct timeval dsp_start_tv; /* time at start of calculation */ | ||
1548 | 1550 | ||
1549 | void | 1551 | void |
1550 | dsp_cmx_send(void *arg) | 1552 | dsp_cmx_send(void *arg) |
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index 2f10ed82c0db..1dc21d803410 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c | |||
@@ -161,7 +161,7 @@ | |||
161 | #include "core.h" | 161 | #include "core.h" |
162 | #include "dsp.h" | 162 | #include "dsp.h" |
163 | 163 | ||
164 | const char *mISDN_dsp_revision = "2.0"; | 164 | static const char *mISDN_dsp_revision = "2.0"; |
165 | 165 | ||
166 | static int debug; | 166 | static int debug; |
167 | static int options; | 167 | static int options; |
@@ -631,7 +631,6 @@ dsp_function(struct mISDNchannel *ch, struct sk_buff *skb) | |||
631 | int ret = 0; | 631 | int ret = 0; |
632 | u8 *digits; | 632 | u8 *digits; |
633 | int cont; | 633 | int cont; |
634 | struct sk_buff *nskb; | ||
635 | u_long flags; | 634 | u_long flags; |
636 | 635 | ||
637 | hh = mISDN_HEAD_P(skb); | 636 | hh = mISDN_HEAD_P(skb); |
@@ -690,6 +689,7 @@ dsp_function(struct mISDNchannel *ch, struct sk_buff *skb) | |||
690 | digits = dsp_dtmf_goertzel_decode(dsp, skb->data, | 689 | digits = dsp_dtmf_goertzel_decode(dsp, skb->data, |
691 | skb->len, (dsp_options&DSP_OPT_ULAW)?1:0); | 690 | skb->len, (dsp_options&DSP_OPT_ULAW)?1:0); |
692 | while (*digits) { | 691 | while (*digits) { |
692 | struct sk_buff *nskb; | ||
693 | if (dsp_debug & DEBUG_DSP_DTMF) | 693 | if (dsp_debug & DEBUG_DSP_DTMF) |
694 | printk(KERN_DEBUG "%s: digit" | 694 | printk(KERN_DEBUG "%s: digit" |
695 | "(%c) to layer %s\n", | 695 | "(%c) to layer %s\n", |
diff --git a/drivers/isdn/mISDN/dsp_hwec.c b/drivers/isdn/mISDN/dsp_hwec.c index eb892d9dd5c6..806a997fe7cc 100644 --- a/drivers/isdn/mISDN/dsp_hwec.c +++ b/drivers/isdn/mISDN/dsp_hwec.c | |||
@@ -43,7 +43,7 @@ static struct mISDN_dsp_element dsp_hwec_p = { | |||
43 | .free = NULL, | 43 | .free = NULL, |
44 | .process_tx = NULL, | 44 | .process_tx = NULL, |
45 | .process_rx = NULL, | 45 | .process_rx = NULL, |
46 | .num_args = sizeof(args) / sizeof(struct mISDN_dsp_element_arg), | 46 | .num_args = ARRAY_SIZE(args), |
47 | .args = args, | 47 | .args = args, |
48 | }; | 48 | }; |
49 | struct mISDN_dsp_element *dsp_hwec = &dsp_hwec_p; | 49 | struct mISDN_dsp_element *dsp_hwec = &dsp_hwec_p; |
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c index 850260ab57d0..5ee6651b45b9 100644 --- a/drivers/isdn/mISDN/dsp_pipeline.c +++ b/drivers/isdn/mISDN/dsp_pipeline.c | |||
@@ -249,7 +249,7 @@ int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) | |||
249 | name = strsep(&tok, "("); | 249 | name = strsep(&tok, "("); |
250 | args = strsep(&tok, ")"); | 250 | args = strsep(&tok, ")"); |
251 | if (args && !*args) | 251 | if (args && !*args) |
252 | args = 0; | 252 | args = NULL; |
253 | 253 | ||
254 | list_for_each_entry_safe(entry, n, &dsp_elements, list) | 254 | list_for_each_entry_safe(entry, n, &dsp_elements, list) |
255 | if (!strcmp(entry->elem->name, name)) { | 255 | if (!strcmp(entry->elem->name, name)) { |
diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c index 23dd0dd21524..7a9af66f4b19 100644 --- a/drivers/isdn/mISDN/dsp_tones.c +++ b/drivers/isdn/mISDN/dsp_tones.c | |||
@@ -231,120 +231,120 @@ dsp_audio_generate_ulaw_samples(void) | |||
231 | * tone sequence definition * | 231 | * tone sequence definition * |
232 | ****************************/ | 232 | ****************************/ |
233 | 233 | ||
234 | struct pattern { | 234 | static struct pattern { |
235 | int tone; | 235 | int tone; |
236 | u8 *data[10]; | 236 | u8 *data[10]; |
237 | u32 *siz[10]; | 237 | u32 *siz[10]; |
238 | u32 seq[10]; | 238 | u32 seq[10]; |
239 | } pattern[] = { | 239 | } pattern[] = { |
240 | {TONE_GERMAN_DIALTONE, | 240 | {TONE_GERMAN_DIALTONE, |
241 | {DATA_GA, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 241 | {DATA_GA, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
242 | {SIZE_GA, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 242 | {SIZE_GA, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
243 | {1900, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, | 243 | {1900, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, |
244 | 244 | ||
245 | {TONE_GERMAN_OLDDIALTONE, | 245 | {TONE_GERMAN_OLDDIALTONE, |
246 | {DATA_GO, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 246 | {DATA_GO, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
247 | {SIZE_GO, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 247 | {SIZE_GO, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
248 | {1998, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, | 248 | {1998, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, |
249 | 249 | ||
250 | {TONE_AMERICAN_DIALTONE, | 250 | {TONE_AMERICAN_DIALTONE, |
251 | {DATA_DT, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 251 | {DATA_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
252 | {SIZE_DT, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 252 | {SIZE_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
253 | {8000, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, | 253 | {8000, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, |
254 | 254 | ||
255 | {TONE_GERMAN_DIALPBX, | 255 | {TONE_GERMAN_DIALPBX, |
256 | {DATA_GA, DATA_S, DATA_GA, DATA_S, DATA_GA, DATA_S, 0, 0, 0, 0}, | 256 | {DATA_GA, DATA_S, DATA_GA, DATA_S, DATA_GA, DATA_S, NULL, NULL, NULL, NULL}, |
257 | {SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, 0, 0, 0, 0}, | 257 | {SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL}, |
258 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, | 258 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, |
259 | 259 | ||
260 | {TONE_GERMAN_OLDDIALPBX, | 260 | {TONE_GERMAN_OLDDIALPBX, |
261 | {DATA_GO, DATA_S, DATA_GO, DATA_S, DATA_GO, DATA_S, 0, 0, 0, 0}, | 261 | {DATA_GO, DATA_S, DATA_GO, DATA_S, DATA_GO, DATA_S, NULL, NULL, NULL, NULL}, |
262 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, 0, 0, 0, 0}, | 262 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL}, |
263 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, | 263 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, |
264 | 264 | ||
265 | {TONE_AMERICAN_DIALPBX, | 265 | {TONE_AMERICAN_DIALPBX, |
266 | {DATA_DT, DATA_S, DATA_DT, DATA_S, DATA_DT, DATA_S, 0, 0, 0, 0}, | 266 | {DATA_DT, DATA_S, DATA_DT, DATA_S, DATA_DT, DATA_S, NULL, NULL, NULL, NULL}, |
267 | {SIZE_DT, SIZE_S, SIZE_DT, SIZE_S, SIZE_DT, SIZE_S, 0, 0, 0, 0}, | 267 | {SIZE_DT, SIZE_S, SIZE_DT, SIZE_S, SIZE_DT, SIZE_S, NULL, NULL, NULL, NULL}, |
268 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, | 268 | {2000, 2000, 2000, 2000, 2000, 12000, 0, 0, 0, 0} }, |
269 | 269 | ||
270 | {TONE_GERMAN_RINGING, | 270 | {TONE_GERMAN_RINGING, |
271 | {DATA_GA, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 271 | {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
272 | {SIZE_GA, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 272 | {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
273 | {8000, 32000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 273 | {8000, 32000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
274 | 274 | ||
275 | {TONE_GERMAN_OLDRINGING, | 275 | {TONE_GERMAN_OLDRINGING, |
276 | {DATA_GO, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 276 | {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
277 | {SIZE_GO, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 277 | {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
278 | {8000, 40000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 278 | {8000, 40000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
279 | 279 | ||
280 | {TONE_AMERICAN_RINGING, | 280 | {TONE_AMERICAN_RINGING, |
281 | {DATA_RI, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 281 | {DATA_RI, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
282 | {SIZE_RI, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 282 | {SIZE_RI, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
283 | {8000, 32000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 283 | {8000, 32000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
284 | 284 | ||
285 | {TONE_GERMAN_RINGPBX, | 285 | {TONE_GERMAN_RINGPBX, |
286 | {DATA_GA, DATA_S, DATA_GA, DATA_S, 0, 0, 0, 0, 0, 0}, | 286 | {DATA_GA, DATA_S, DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
287 | {SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, 0, 0, 0, 0, 0, 0}, | 287 | {SIZE_GA, SIZE_S, SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
288 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, | 288 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, |
289 | 289 | ||
290 | {TONE_GERMAN_OLDRINGPBX, | 290 | {TONE_GERMAN_OLDRINGPBX, |
291 | {DATA_GO, DATA_S, DATA_GO, DATA_S, 0, 0, 0, 0, 0, 0}, | 291 | {DATA_GO, DATA_S, DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
292 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, 0, 0, 0, 0, 0, 0}, | 292 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
293 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, | 293 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, |
294 | 294 | ||
295 | {TONE_AMERICAN_RINGPBX, | 295 | {TONE_AMERICAN_RINGPBX, |
296 | {DATA_RI, DATA_S, DATA_RI, DATA_S, 0, 0, 0, 0, 0, 0}, | 296 | {DATA_RI, DATA_S, DATA_RI, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
297 | {SIZE_RI, SIZE_S, SIZE_RI, SIZE_S, 0, 0, 0, 0, 0, 0}, | 297 | {SIZE_RI, SIZE_S, SIZE_RI, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
298 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, | 298 | {4000, 4000, 4000, 28000, 0, 0, 0, 0, 0, 0} }, |
299 | 299 | ||
300 | {TONE_GERMAN_BUSY, | 300 | {TONE_GERMAN_BUSY, |
301 | {DATA_GA, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 301 | {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
302 | {SIZE_GA, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 302 | {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
303 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 303 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
304 | 304 | ||
305 | {TONE_GERMAN_OLDBUSY, | 305 | {TONE_GERMAN_OLDBUSY, |
306 | {DATA_GO, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 306 | {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
307 | {SIZE_GO, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 307 | {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
308 | {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 308 | {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
309 | 309 | ||
310 | {TONE_AMERICAN_BUSY, | 310 | {TONE_AMERICAN_BUSY, |
311 | {DATA_BU, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 311 | {DATA_BU, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
312 | {SIZE_BU, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 312 | {SIZE_BU, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
313 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 313 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
314 | 314 | ||
315 | {TONE_GERMAN_HANGUP, | 315 | {TONE_GERMAN_HANGUP, |
316 | {DATA_GA, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 316 | {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
317 | {SIZE_GA, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 317 | {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
318 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 318 | {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
319 | 319 | ||
320 | {TONE_GERMAN_OLDHANGUP, | 320 | {TONE_GERMAN_OLDHANGUP, |
321 | {DATA_GO, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 321 | {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
322 | {SIZE_GO, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 322 | {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
323 | {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 323 | {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
324 | 324 | ||
325 | {TONE_AMERICAN_HANGUP, | 325 | {TONE_AMERICAN_HANGUP, |
326 | {DATA_DT, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 326 | {DATA_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
327 | {SIZE_DT, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 327 | {SIZE_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
328 | {8000, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, | 328 | {8000, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, |
329 | 329 | ||
330 | {TONE_SPECIAL_INFO, | 330 | {TONE_SPECIAL_INFO, |
331 | {DATA_S1, DATA_S2, DATA_S3, DATA_S, 0, 0, 0, 0, 0, 0}, | 331 | {DATA_S1, DATA_S2, DATA_S3, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
332 | {SIZE_S1, SIZE_S2, SIZE_S3, SIZE_S, 0, 0, 0, 0, 0, 0}, | 332 | {SIZE_S1, SIZE_S2, SIZE_S3, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
333 | {2666, 2666, 2666, 8002, 0, 0, 0, 0, 0, 0} }, | 333 | {2666, 2666, 2666, 8002, 0, 0, 0, 0, 0, 0} }, |
334 | 334 | ||
335 | {TONE_GERMAN_GASSENBESETZT, | 335 | {TONE_GERMAN_GASSENBESETZT, |
336 | {DATA_GA, DATA_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 336 | {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
337 | {SIZE_GA, SIZE_S, 0, 0, 0, 0, 0, 0, 0, 0}, | 337 | {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
338 | {2000, 2000, 0, 0, 0, 0, 0, 0, 0, 0} }, | 338 | {2000, 2000, 0, 0, 0, 0, 0, 0, 0, 0} }, |
339 | 339 | ||
340 | {TONE_GERMAN_AUFSCHALTTON, | 340 | {TONE_GERMAN_AUFSCHALTTON, |
341 | {DATA_GO, DATA_S, DATA_GO, DATA_S, 0, 0, 0, 0, 0, 0}, | 341 | {DATA_GO, DATA_S, DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
342 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, 0, 0, 0, 0, 0, 0}, | 342 | {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, |
343 | {1000, 5000, 1000, 17000, 0, 0, 0, 0, 0, 0} }, | 343 | {1000, 5000, 1000, 17000, 0, 0, 0, 0, 0, 0} }, |
344 | 344 | ||
345 | {0, | 345 | {0, |
346 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 346 | {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
347 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, | 347 | {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
348 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, | 348 | {0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, |
349 | }; | 349 | }; |
350 | 350 | ||
@@ -467,7 +467,7 @@ dsp_tone_timeout(void *arg) | |||
467 | 467 | ||
468 | /* set next tone */ | 468 | /* set next tone */ |
469 | if (pat->data[index] == DATA_S) | 469 | if (pat->data[index] == DATA_S) |
470 | dsp_tone_hw_message(dsp, 0, 0); | 470 | dsp_tone_hw_message(dsp, NULL, 0); |
471 | else | 471 | else |
472 | dsp_tone_hw_message(dsp, pat->data[index], *(pat->siz[index])); | 472 | dsp_tone_hw_message(dsp, pat->data[index], *(pat->siz[index])); |
473 | /* set timer */ | 473 | /* set timer */ |
diff --git a/drivers/isdn/mISDN/l1oip_codec.c b/drivers/isdn/mISDN/l1oip_codec.c index a2dc4570ef43..2ec4b28d9edc 100644 --- a/drivers/isdn/mISDN/l1oip_codec.c +++ b/drivers/isdn/mISDN/l1oip_codec.c | |||
@@ -49,6 +49,7 @@ NOTE: The bytes are handled as they are law-encoded. | |||
49 | #include <linux/vmalloc.h> | 49 | #include <linux/vmalloc.h> |
50 | #include <linux/mISDNif.h> | 50 | #include <linux/mISDNif.h> |
51 | #include "core.h" | 51 | #include "core.h" |
52 | #include "l1oip.h" | ||
52 | 53 | ||
53 | /* definitions of codec. don't use calculations, code may run slower. */ | 54 | /* definitions of codec. don't use calculations, code may run slower. */ |
54 | 55 | ||
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c index e42150a57780..0884dd6892f8 100644 --- a/drivers/isdn/mISDN/l1oip_core.c +++ b/drivers/isdn/mISDN/l1oip_core.c | |||
@@ -469,7 +469,7 @@ l1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase, | |||
469 | static void | 469 | static void |
470 | l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) | 470 | l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) |
471 | { | 471 | { |
472 | u32 id; | 472 | u32 packet_id; |
473 | u8 channel; | 473 | u8 channel; |
474 | u8 remotecodec; | 474 | u8 remotecodec; |
475 | u16 timebase; | 475 | u16 timebase; |
@@ -508,7 +508,7 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) | |||
508 | } | 508 | } |
509 | 509 | ||
510 | /* get id flag */ | 510 | /* get id flag */ |
511 | id = (*buf>>4)&1; | 511 | packet_id = (*buf>>4)&1; |
512 | 512 | ||
513 | /* check coding */ | 513 | /* check coding */ |
514 | remotecodec = (*buf) & 0x0f; | 514 | remotecodec = (*buf) & 0x0f; |
@@ -520,11 +520,11 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) | |||
520 | buf++; | 520 | buf++; |
521 | len--; | 521 | len--; |
522 | 522 | ||
523 | /* check id */ | 523 | /* check packet_id */ |
524 | if (id) { | 524 | if (packet_id) { |
525 | if (!hc->id) { | 525 | if (!hc->id) { |
526 | printk(KERN_WARNING "%s: packet error - packet has id " | 526 | printk(KERN_WARNING "%s: packet error - packet has id " |
527 | "0x%x, but we have not\n", __func__, id); | 527 | "0x%x, but we have not\n", __func__, packet_id); |
528 | return; | 528 | return; |
529 | } | 529 | } |
530 | if (len < 4) { | 530 | if (len < 4) { |
@@ -532,16 +532,16 @@ l1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len) | |||
532 | "short for ID value\n", __func__); | 532 | "short for ID value\n", __func__); |
533 | return; | 533 | return; |
534 | } | 534 | } |
535 | id = (*buf++) << 24; | 535 | packet_id = (*buf++) << 24; |
536 | id += (*buf++) << 16; | 536 | packet_id += (*buf++) << 16; |
537 | id += (*buf++) << 8; | 537 | packet_id += (*buf++) << 8; |
538 | id += (*buf++); | 538 | packet_id += (*buf++); |
539 | len -= 4; | 539 | len -= 4; |
540 | 540 | ||
541 | if (id != hc->id) { | 541 | if (packet_id != hc->id) { |
542 | printk(KERN_WARNING "%s: packet error - ID mismatch, " | 542 | printk(KERN_WARNING "%s: packet error - ID mismatch, " |
543 | "got 0x%x, we 0x%x\n", | 543 | "got 0x%x, we 0x%x\n", |
544 | __func__, id, hc->id); | 544 | __func__, packet_id, hc->id); |
545 | return; | 545 | return; |
546 | } | 546 | } |
547 | } else { | 547 | } else { |
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c index fced1a2755f8..b73e952d12cf 100644 --- a/drivers/isdn/mISDN/layer1.c +++ b/drivers/isdn/mISDN/layer1.c | |||
@@ -18,10 +18,11 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/mISDNhw.h> | 20 | #include <linux/mISDNhw.h> |
21 | #include "core.h" | ||
21 | #include "layer1.h" | 22 | #include "layer1.h" |
22 | #include "fsm.h" | 23 | #include "fsm.h" |
23 | 24 | ||
24 | static int *debug; | 25 | static u_int *debug; |
25 | 26 | ||
26 | struct layer1 { | 27 | struct layer1 { |
27 | u_long Flags; | 28 | u_long Flags; |
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c index a7915a156c04..d6e2863f224a 100644 --- a/drivers/isdn/mISDN/layer2.c +++ b/drivers/isdn/mISDN/layer2.c | |||
@@ -15,10 +15,12 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/mISDNif.h> | ||
19 | #include "core.h" | ||
18 | #include "fsm.h" | 20 | #include "fsm.h" |
19 | #include "layer2.h" | 21 | #include "layer2.h" |
20 | 22 | ||
21 | static int *debug; | 23 | static u_int *debug; |
22 | 24 | ||
23 | static | 25 | static |
24 | struct Fsm l2fsm = {NULL, 0, 0, NULL, NULL}; | 26 | struct Fsm l2fsm = {NULL, 0, 0, NULL, NULL}; |
@@ -465,7 +467,7 @@ IsRNR(u_char *data, struct layer2 *l2) | |||
465 | data[0] == RNR : (data[0] & 0xf) == RNR; | 467 | data[0] == RNR : (data[0] & 0xf) == RNR; |
466 | } | 468 | } |
467 | 469 | ||
468 | int | 470 | static int |
469 | iframe_error(struct layer2 *l2, struct sk_buff *skb) | 471 | iframe_error(struct layer2 *l2, struct sk_buff *skb) |
470 | { | 472 | { |
471 | u_int i; | 473 | u_int i; |
@@ -483,7 +485,7 @@ iframe_error(struct layer2 *l2, struct sk_buff *skb) | |||
483 | return 0; | 485 | return 0; |
484 | } | 486 | } |
485 | 487 | ||
486 | int | 488 | static int |
487 | super_error(struct layer2 *l2, struct sk_buff *skb) | 489 | super_error(struct layer2 *l2, struct sk_buff *skb) |
488 | { | 490 | { |
489 | if (skb->len != l2addrsize(l2) + | 491 | if (skb->len != l2addrsize(l2) + |
@@ -492,7 +494,7 @@ super_error(struct layer2 *l2, struct sk_buff *skb) | |||
492 | return 0; | 494 | return 0; |
493 | } | 495 | } |
494 | 496 | ||
495 | int | 497 | static int |
496 | unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp) | 498 | unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp) |
497 | { | 499 | { |
498 | int rsp = (*skb->data & 0x2) >> 1; | 500 | int rsp = (*skb->data & 0x2) >> 1; |
@@ -505,7 +507,7 @@ unnum_error(struct layer2 *l2, struct sk_buff *skb, int wantrsp) | |||
505 | return 0; | 507 | return 0; |
506 | } | 508 | } |
507 | 509 | ||
508 | int | 510 | static int |
509 | UI_error(struct layer2 *l2, struct sk_buff *skb) | 511 | UI_error(struct layer2 *l2, struct sk_buff *skb) |
510 | { | 512 | { |
511 | int rsp = *skb->data & 0x2; | 513 | int rsp = *skb->data & 0x2; |
@@ -518,7 +520,7 @@ UI_error(struct layer2 *l2, struct sk_buff *skb) | |||
518 | return 0; | 520 | return 0; |
519 | } | 521 | } |
520 | 522 | ||
521 | int | 523 | static int |
522 | FRMR_error(struct layer2 *l2, struct sk_buff *skb) | 524 | FRMR_error(struct layer2 *l2, struct sk_buff *skb) |
523 | { | 525 | { |
524 | u_int headers = l2addrsize(l2) + 1; | 526 | u_int headers = l2addrsize(l2) + 1; |
@@ -1065,7 +1067,7 @@ l2_st6_dm_release(struct FsmInst *fi, int event, void *arg) | |||
1065 | } | 1067 | } |
1066 | } | 1068 | } |
1067 | 1069 | ||
1068 | void | 1070 | static void |
1069 | enquiry_cr(struct layer2 *l2, u_char typ, u_char cr, u_char pf) | 1071 | enquiry_cr(struct layer2 *l2, u_char typ, u_char cr, u_char pf) |
1070 | { | 1072 | { |
1071 | struct sk_buff *skb; | 1073 | struct sk_buff *skb; |
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index e5a20f9542d1..37a2de18cfd0 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/mISDNif.h> | 18 | #include <linux/mISDNif.h> |
19 | #include "core.h" | 19 | #include "core.h" |
20 | 20 | ||
21 | static int *debug; | 21 | static u_int *debug; |
22 | 22 | ||
23 | static struct proto mISDN_proto = { | 23 | static struct proto mISDN_proto = { |
24 | .name = "misdn", | 24 | .name = "misdn", |
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index 54cfddcc4784..d55b14ae4e99 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c | |||
@@ -36,7 +36,7 @@ _queue_message(struct mISDNstack *st, struct sk_buff *skb) | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | int | 39 | static int |
40 | mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb) | 40 | mISDN_queue_message(struct mISDNchannel *ch, struct sk_buff *skb) |
41 | { | 41 | { |
42 | _queue_message(ch->st, skb); | 42 | _queue_message(ch->st, skb); |
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c index 6fbae42127bf..5c43d19e7c11 100644 --- a/drivers/isdn/mISDN/tei.c +++ b/drivers/isdn/mISDN/tei.c | |||
@@ -393,7 +393,7 @@ dl_unit_data(struct manager *mgr, struct sk_buff *skb) | |||
393 | return 0; | 393 | return 0; |
394 | } | 394 | } |
395 | 395 | ||
396 | unsigned int | 396 | static unsigned int |
397 | random_ri(void) | 397 | random_ri(void) |
398 | { | 398 | { |
399 | u16 x; | 399 | u16 x; |
@@ -1287,7 +1287,7 @@ create_teimanager(struct mISDNdevice *dev) | |||
1287 | if (!mgr) | 1287 | if (!mgr) |
1288 | return -ENOMEM; | 1288 | return -ENOMEM; |
1289 | INIT_LIST_HEAD(&mgr->layer2); | 1289 | INIT_LIST_HEAD(&mgr->layer2); |
1290 | mgr->lock = __RW_LOCK_UNLOCKED(mgr->lock); | 1290 | rwlock_init(&mgr->lock); |
1291 | skb_queue_head_init(&mgr->sendq); | 1291 | skb_queue_head_init(&mgr->sendq); |
1292 | mgr->nextid = 1; | 1292 | mgr->nextid = 1; |
1293 | mgr->lastid = MISDN_ID_NONE; | 1293 | mgr->lastid = MISDN_ID_NONE; |
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 875fabe16e36..f2b32186d4a1 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -23,8 +23,9 @@ | |||
23 | #include <linux/miscdevice.h> | 23 | #include <linux/miscdevice.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/mISDNif.h> | 25 | #include <linux/mISDNif.h> |
26 | #include "core.h" | ||
26 | 27 | ||
27 | static int *debug; | 28 | static u_int *debug; |
28 | 29 | ||
29 | 30 | ||
30 | struct mISDNtimerdev { | 31 | struct mISDNtimerdev { |
@@ -85,7 +86,7 @@ mISDN_close(struct inode *ino, struct file *filep) | |||
85 | } | 86 | } |
86 | 87 | ||
87 | static ssize_t | 88 | static ssize_t |
88 | mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off) | 89 | mISDN_read(struct file *filep, char __user *buf, size_t count, loff_t *off) |
89 | { | 90 | { |
90 | struct mISDNtimerdev *dev = filep->private_data; | 91 | struct mISDNtimerdev *dev = filep->private_data; |
91 | struct mISDNtimer *timer; | 92 | struct mISDNtimer *timer; |
@@ -115,7 +116,7 @@ mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off) | |||
115 | timer = (struct mISDNtimer *)dev->expired.next; | 116 | timer = (struct mISDNtimer *)dev->expired.next; |
116 | list_del(&timer->list); | 117 | list_del(&timer->list); |
117 | spin_unlock_irqrestore(&dev->lock, flags); | 118 | spin_unlock_irqrestore(&dev->lock, flags); |
118 | if (put_user(timer->id, (int *)buf)) | 119 | if (put_user(timer->id, (int __user *)buf)) |
119 | ret = -EFAULT; | 120 | ret = -EFAULT; |
120 | else | 121 | else |
121 | ret = sizeof(int); | 122 | ret = sizeof(int); |
@@ -274,7 +275,7 @@ static struct miscdevice mISDNtimer = { | |||
274 | }; | 275 | }; |
275 | 276 | ||
276 | int | 277 | int |
277 | mISDN_inittimer(int *deb) | 278 | mISDN_inittimer(u_int *deb) |
278 | { | 279 | { |
279 | int err; | 280 | int err; |
280 | 281 | ||