diff options
Diffstat (limited to 'net/irda/ircomm/ircomm_core.c')
-rw-r--r-- | net/irda/ircomm/ircomm_core.c | 50 |
1 files changed, 11 insertions, 39 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index b77fe8c86238..3af219545f6d 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c | |||
@@ -91,8 +91,6 @@ static int __init ircomm_init(void) | |||
91 | 91 | ||
92 | static void __exit ircomm_cleanup(void) | 92 | static void __exit ircomm_cleanup(void) |
93 | { | 93 | { |
94 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
95 | |||
96 | hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); | 94 | hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); |
97 | 95 | ||
98 | #ifdef CONFIG_PROC_FS | 96 | #ifdef CONFIG_PROC_FS |
@@ -111,8 +109,8 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) | |||
111 | struct ircomm_cb *self = NULL; | 109 | struct ircomm_cb *self = NULL; |
112 | int ret; | 110 | int ret; |
113 | 111 | ||
114 | IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ , | 112 | pr_debug("%s(), service_type=0x%02x\n", __func__ , |
115 | service_type); | 113 | service_type); |
116 | 114 | ||
117 | IRDA_ASSERT(ircomm != NULL, return NULL;); | 115 | IRDA_ASSERT(ircomm != NULL, return NULL;); |
118 | 116 | ||
@@ -155,8 +153,6 @@ EXPORT_SYMBOL(ircomm_open); | |||
155 | */ | 153 | */ |
156 | static int __ircomm_close(struct ircomm_cb *self) | 154 | static int __ircomm_close(struct ircomm_cb *self) |
157 | { | 155 | { |
158 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
159 | |||
160 | /* Disconnect link if any */ | 156 | /* Disconnect link if any */ |
161 | ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); | 157 | ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); |
162 | 158 | ||
@@ -191,8 +187,6 @@ int ircomm_close(struct ircomm_cb *self) | |||
191 | IRDA_ASSERT(self != NULL, return -EIO;); | 187 | IRDA_ASSERT(self != NULL, return -EIO;); |
192 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); | 188 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); |
193 | 189 | ||
194 | IRDA_DEBUG(0, "%s()\n", __func__ ); | ||
195 | |||
196 | entry = hashbin_remove(ircomm, self->line, NULL); | 190 | entry = hashbin_remove(ircomm, self->line, NULL); |
197 | 191 | ||
198 | IRDA_ASSERT(entry == self, return -1;); | 192 | IRDA_ASSERT(entry == self, return -1;); |
@@ -216,8 +210,6 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel, | |||
216 | struct ircomm_info info; | 210 | struct ircomm_info info; |
217 | int ret; | 211 | int ret; |
218 | 212 | ||
219 | IRDA_DEBUG(2 , "%s()\n", __func__ ); | ||
220 | |||
221 | IRDA_ASSERT(self != NULL, return -1;); | 213 | IRDA_ASSERT(self != NULL, return -1;); |
222 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 214 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
223 | 215 | ||
@@ -243,8 +235,6 @@ EXPORT_SYMBOL(ircomm_connect_request); | |||
243 | void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, | 235 | void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, |
244 | struct ircomm_info *info) | 236 | struct ircomm_info *info) |
245 | { | 237 | { |
246 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
247 | |||
248 | /* | 238 | /* |
249 | * If there are any data hiding in the control channel, we must | 239 | * If there are any data hiding in the control channel, we must |
250 | * deliver it first. The side effect is that the control channel | 240 | * deliver it first. The side effect is that the control channel |
@@ -255,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, | |||
255 | info->qos, info->max_data_size, | 245 | info->qos, info->max_data_size, |
256 | info->max_header_size, skb); | 246 | info->max_header_size, skb); |
257 | else { | 247 | else { |
258 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 248 | pr_debug("%s(), missing handler\n", __func__); |
259 | } | 249 | } |
260 | } | 250 | } |
261 | 251 | ||
@@ -272,8 +262,6 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata) | |||
272 | IRDA_ASSERT(self != NULL, return -1;); | 262 | IRDA_ASSERT(self != NULL, return -1;); |
273 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 263 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
274 | 264 | ||
275 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
276 | |||
277 | ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); | 265 | ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); |
278 | 266 | ||
279 | return ret; | 267 | return ret; |
@@ -290,15 +278,13 @@ EXPORT_SYMBOL(ircomm_connect_response); | |||
290 | void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, | 278 | void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, |
291 | struct ircomm_info *info) | 279 | struct ircomm_info *info) |
292 | { | 280 | { |
293 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
294 | |||
295 | if (self->notify.connect_confirm ) | 281 | if (self->notify.connect_confirm ) |
296 | self->notify.connect_confirm(self->notify.instance, | 282 | self->notify.connect_confirm(self->notify.instance, |
297 | self, info->qos, | 283 | self, info->qos, |
298 | info->max_data_size, | 284 | info->max_data_size, |
299 | info->max_header_size, skb); | 285 | info->max_header_size, skb); |
300 | else { | 286 | else { |
301 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 287 | pr_debug("%s(), missing handler\n", __func__); |
302 | } | 288 | } |
303 | } | 289 | } |
304 | 290 | ||
@@ -312,8 +298,6 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb) | |||
312 | { | 298 | { |
313 | int ret; | 299 | int ret; |
314 | 300 | ||
315 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
316 | |||
317 | IRDA_ASSERT(self != NULL, return -EFAULT;); | 301 | IRDA_ASSERT(self != NULL, return -EFAULT;); |
318 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); | 302 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); |
319 | IRDA_ASSERT(skb != NULL, return -EFAULT;); | 303 | IRDA_ASSERT(skb != NULL, return -EFAULT;); |
@@ -333,14 +317,12 @@ EXPORT_SYMBOL(ircomm_data_request); | |||
333 | */ | 317 | */ |
334 | void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) | 318 | void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) |
335 | { | 319 | { |
336 | IRDA_DEBUG(4, "%s()\n", __func__ ); | ||
337 | |||
338 | IRDA_ASSERT(skb->len > 0, return;); | 320 | IRDA_ASSERT(skb->len > 0, return;); |
339 | 321 | ||
340 | if (self->notify.data_indication) | 322 | if (self->notify.data_indication) |
341 | self->notify.data_indication(self->notify.instance, self, skb); | 323 | self->notify.data_indication(self->notify.instance, self, skb); |
342 | else { | 324 | else { |
343 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 325 | pr_debug("%s(), missing handler\n", __func__); |
344 | } | 326 | } |
345 | } | 327 | } |
346 | 328 | ||
@@ -365,8 +347,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) | |||
365 | * fine | 347 | * fine |
366 | */ | 348 | */ |
367 | if (unlikely(skb->len < (clen + 1))) { | 349 | if (unlikely(skb->len < (clen + 1))) { |
368 | IRDA_DEBUG(2, "%s() throwing away illegal frame\n", | 350 | pr_debug("%s() throwing away illegal frame\n", |
369 | __func__ ); | 351 | __func__); |
370 | return; | 352 | return; |
371 | } | 353 | } |
372 | 354 | ||
@@ -384,8 +366,8 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb) | |||
384 | if (skb->len) | 366 | if (skb->len) |
385 | ircomm_data_indication(self, skb); | 367 | ircomm_data_indication(self, skb); |
386 | else { | 368 | else { |
387 | IRDA_DEBUG(4, "%s(), data was control info only!\n", | 369 | pr_debug("%s(), data was control info only!\n", |
388 | __func__ ); | 370 | __func__); |
389 | } | 371 | } |
390 | } | 372 | } |
391 | 373 | ||
@@ -399,8 +381,6 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb) | |||
399 | { | 381 | { |
400 | int ret; | 382 | int ret; |
401 | 383 | ||
402 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
403 | |||
404 | IRDA_ASSERT(self != NULL, return -EFAULT;); | 384 | IRDA_ASSERT(self != NULL, return -EFAULT;); |
405 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); | 385 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); |
406 | IRDA_ASSERT(skb != NULL, return -EFAULT;); | 386 | IRDA_ASSERT(skb != NULL, return -EFAULT;); |
@@ -421,8 +401,6 @@ EXPORT_SYMBOL(ircomm_control_request); | |||
421 | static void ircomm_control_indication(struct ircomm_cb *self, | 401 | static void ircomm_control_indication(struct ircomm_cb *self, |
422 | struct sk_buff *skb, int clen) | 402 | struct sk_buff *skb, int clen) |
423 | { | 403 | { |
424 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
425 | |||
426 | /* Use udata for delivering data on the control channel */ | 404 | /* Use udata for delivering data on the control channel */ |
427 | if (self->notify.udata_indication) { | 405 | if (self->notify.udata_indication) { |
428 | struct sk_buff *ctrl_skb; | 406 | struct sk_buff *ctrl_skb; |
@@ -442,7 +420,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, | |||
442 | * see ircomm_tty_control_indication(). */ | 420 | * see ircomm_tty_control_indication(). */ |
443 | dev_kfree_skb(ctrl_skb); | 421 | dev_kfree_skb(ctrl_skb); |
444 | } else { | 422 | } else { |
445 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 423 | pr_debug("%s(), missing handler\n", __func__); |
446 | } | 424 | } |
447 | } | 425 | } |
448 | 426 | ||
@@ -457,8 +435,6 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata) | |||
457 | struct ircomm_info info; | 435 | struct ircomm_info info; |
458 | int ret; | 436 | int ret; |
459 | 437 | ||
460 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
461 | |||
462 | IRDA_ASSERT(self != NULL, return -1;); | 438 | IRDA_ASSERT(self != NULL, return -1;); |
463 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 439 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
464 | 440 | ||
@@ -478,15 +454,13 @@ EXPORT_SYMBOL(ircomm_disconnect_request); | |||
478 | void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, | 454 | void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, |
479 | struct ircomm_info *info) | 455 | struct ircomm_info *info) |
480 | { | 456 | { |
481 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
482 | |||
483 | IRDA_ASSERT(info != NULL, return;); | 457 | IRDA_ASSERT(info != NULL, return;); |
484 | 458 | ||
485 | if (self->notify.disconnect_indication) { | 459 | if (self->notify.disconnect_indication) { |
486 | self->notify.disconnect_indication(self->notify.instance, self, | 460 | self->notify.disconnect_indication(self->notify.instance, self, |
487 | info->reason, skb); | 461 | info->reason, skb); |
488 | } else { | 462 | } else { |
489 | IRDA_DEBUG(0, "%s(), missing handler\n", __func__ ); | 463 | pr_debug("%s(), missing handler\n", __func__); |
490 | } | 464 | } |
491 | } | 465 | } |
492 | 466 | ||
@@ -498,8 +472,6 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, | |||
498 | */ | 472 | */ |
499 | void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) | 473 | void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) |
500 | { | 474 | { |
501 | IRDA_DEBUG(2, "%s()\n", __func__ ); | ||
502 | |||
503 | IRDA_ASSERT(self != NULL, return;); | 475 | IRDA_ASSERT(self != NULL, return;); |
504 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 476 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
505 | 477 | ||