aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-11-11 17:44:57 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-12 13:56:41 -0500
commit955a9d202f470019f42979f0d1caec98843e39ce (patch)
treefff6124b339bc33e3b5c67668bfcc13098be865c /net
parent8d326d818a2a8fc80c7df85dd88cb214804d1499 (diff)
irda: Convert IRDA_DEBUG to pr_debug
Use the normal kernel debugging mechanism which also enables dynamic_debug at the same time. Other miscellanea: o Remove sysctl for irda_debug o Remove function tracing like uses (use ftrace instead) o Coalesce formats o Realign arguments o Remove unnecessary OOM messages Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/irda/af_irda.c209
-rw-r--r--net/irda/discovery.c12
-rw-r--r--net/irda/ircomm/ircomm_core.c50
-rw-r--r--net/irda/ircomm/ircomm_event.c24
-rw-r--r--net/irda/ircomm/ircomm_lmp.c28
-rw-r--r--net/irda/ircomm/ircomm_param.c41
-rw-r--r--net/irda/ircomm/ircomm_ttp.c20
-rw-r--r--net/irda/ircomm/ircomm_tty.c95
-rw-r--r--net/irda/ircomm/ircomm_tty_attach.c106
-rw-r--r--net/irda/ircomm/ircomm_tty_ioctl.c18
-rw-r--r--net/irda/irda_device.c16
-rw-r--r--net/irda/iriap.c91
-rw-r--r--net/irda/iriap_event.c38
-rw-r--r--net/irda/irias_object.c14
-rw-r--r--net/irda/irlan/irlan_client.c64
-rw-r--r--net/irda/irlan/irlan_client_event.c62
-rw-r--r--net/irda/irlan/irlan_common.c77
-rw-r--r--net/irda/irlan/irlan_eth.c24
-rw-r--r--net/irda/irlan/irlan_event.c4
-rw-r--r--net/irda/irlan/irlan_filter.c23
-rw-r--r--net/irda/irlan/irlan_provider.c42
-rw-r--r--net/irda/irlan/irlan_provider_event.c16
-rw-r--r--net/irda/irlap.c55
-rw-r--r--net/irda/irlap_event.c225
-rw-r--r--net/irda/irlap_frame.c87
-rw-r--r--net/irda/irlmp.c167
-rw-r--r--net/irda/irlmp_event.c121
-rw-r--r--net/irda/irlmp_frame.c56
-rw-r--r--net/irda/irmod.c12
-rw-r--r--net/irda/irnetlink.c4
-rw-r--r--net/irda/irqueue.c14
-rw-r--r--net/irda/irsysctl.c9
-rw-r--r--net/irda/irttp.c127
-rw-r--r--net/irda/parameters.c38
-rw-r--r--net/irda/qos.c71
-rw-r--r--net/irda/wrapper.c22
36 files changed, 797 insertions, 1285 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 4b04ae06b288..31f70a8c7813 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -84,14 +84,12 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
84 struct sock *sk; 84 struct sock *sk;
85 int err; 85 int err;
86 86
87 IRDA_DEBUG(3, "%s()\n", __func__);
88
89 self = instance; 87 self = instance;
90 sk = instance; 88 sk = instance;
91 89
92 err = sock_queue_rcv_skb(sk, skb); 90 err = sock_queue_rcv_skb(sk, skb);
93 if (err) { 91 if (err) {
94 IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__); 92 pr_debug("%s(), error: no more mem!\n", __func__);
95 self->rx_flow = FLOW_STOP; 93 self->rx_flow = FLOW_STOP;
96 94
97 /* When we return error, TTP will need to requeue the skb */ 95 /* When we return error, TTP will need to requeue the skb */
@@ -115,7 +113,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
115 113
116 self = instance; 114 self = instance;
117 115
118 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 116 pr_debug("%s(%p)\n", __func__, self);
119 117
120 /* Don't care about it, but let's not leak it */ 118 /* Don't care about it, but let's not leak it */
121 if(skb) 119 if(skb)
@@ -123,8 +121,8 @@ static void irda_disconnect_indication(void *instance, void *sap,
123 121
124 sk = instance; 122 sk = instance;
125 if (sk == NULL) { 123 if (sk == NULL) {
126 IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", 124 pr_debug("%s(%p) : BUG : sk is NULL\n",
127 __func__, self); 125 __func__, self);
128 return; 126 return;
129 } 127 }
130 128
@@ -180,7 +178,7 @@ static void irda_connect_confirm(void *instance, void *sap,
180 178
181 self = instance; 179 self = instance;
182 180
183 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 181 pr_debug("%s(%p)\n", __func__, self);
184 182
185 sk = instance; 183 sk = instance;
186 if (sk == NULL) { 184 if (sk == NULL) {
@@ -219,8 +217,8 @@ static void irda_connect_confirm(void *instance, void *sap,
219 self->max_data_size = irttp_get_max_seg_size(self->tsap); 217 self->max_data_size = irttp_get_max_seg_size(self->tsap);
220 } 218 }
221 219
222 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, 220 pr_debug("%s(), max_data_size=%d\n", __func__,
223 self->max_data_size); 221 self->max_data_size);
224 222
225 memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); 223 memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
226 224
@@ -244,7 +242,7 @@ static void irda_connect_indication(void *instance, void *sap,
244 242
245 self = instance; 243 self = instance;
246 244
247 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 245 pr_debug("%s(%p)\n", __func__, self);
248 246
249 sk = instance; 247 sk = instance;
250 if (sk == NULL) { 248 if (sk == NULL) {
@@ -282,8 +280,8 @@ static void irda_connect_indication(void *instance, void *sap,
282 self->max_data_size = irttp_get_max_seg_size(self->tsap); 280 self->max_data_size = irttp_get_max_seg_size(self->tsap);
283 } 281 }
284 282
285 IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, 283 pr_debug("%s(), max_data_size=%d\n", __func__,
286 self->max_data_size); 284 self->max_data_size);
287 285
288 memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); 286 memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
289 287
@@ -301,12 +299,10 @@ static void irda_connect_response(struct irda_sock *self)
301{ 299{
302 struct sk_buff *skb; 300 struct sk_buff *skb;
303 301
304 IRDA_DEBUG(2, "%s()\n", __func__);
305
306 skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL); 302 skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, GFP_KERNEL);
307 if (skb == NULL) { 303 if (skb == NULL) {
308 IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", 304 pr_debug("%s() Unable to allocate sk_buff!\n",
309 __func__); 305 __func__);
310 return; 306 return;
311 } 307 }
312 308
@@ -327,26 +323,24 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
327 struct irda_sock *self; 323 struct irda_sock *self;
328 struct sock *sk; 324 struct sock *sk;
329 325
330 IRDA_DEBUG(2, "%s()\n", __func__);
331
332 self = instance; 326 self = instance;
333 sk = instance; 327 sk = instance;
334 BUG_ON(sk == NULL); 328 BUG_ON(sk == NULL);
335 329
336 switch (flow) { 330 switch (flow) {
337 case FLOW_STOP: 331 case FLOW_STOP:
338 IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n", 332 pr_debug("%s(), IrTTP wants us to slow down\n",
339 __func__); 333 __func__);
340 self->tx_flow = flow; 334 self->tx_flow = flow;
341 break; 335 break;
342 case FLOW_START: 336 case FLOW_START:
343 self->tx_flow = flow; 337 self->tx_flow = flow;
344 IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n", 338 pr_debug("%s(), IrTTP wants us to start again\n",
345 __func__); 339 __func__);
346 wake_up_interruptible(sk_sleep(sk)); 340 wake_up_interruptible(sk_sleep(sk));
347 break; 341 break;
348 default: 342 default:
349 IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__); 343 pr_debug("%s(), Unknown flow command!\n", __func__);
350 /* Unknown flow command, better stop */ 344 /* Unknown flow command, better stop */
351 self->tx_flow = flow; 345 self->tx_flow = flow;
352 break; 346 break;
@@ -372,7 +366,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
372 return; 366 return;
373 } 367 }
374 368
375 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 369 pr_debug("%s(%p)\n", __func__, self);
376 370
377 /* We probably don't need to make any more queries */ 371 /* We probably don't need to make any more queries */
378 iriap_close(self->iriap); 372 iriap_close(self->iriap);
@@ -380,8 +374,8 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
380 374
381 /* Check if request succeeded */ 375 /* Check if request succeeded */
382 if (result != IAS_SUCCESS) { 376 if (result != IAS_SUCCESS) {
383 IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__, 377 pr_debug("%s(), IAS query failed! (%d)\n", __func__,
384 result); 378 result);
385 379
386 self->errno = result; /* We really need it later */ 380 self->errno = result; /* We really need it later */
387 381
@@ -413,8 +407,6 @@ static void irda_selective_discovery_indication(discinfo_t *discovery,
413{ 407{
414 struct irda_sock *self; 408 struct irda_sock *self;
415 409
416 IRDA_DEBUG(2, "%s()\n", __func__);
417
418 self = priv; 410 self = priv;
419 if (!self) { 411 if (!self) {
420 net_warn_ratelimited("%s: lost myself!\n", __func__); 412 net_warn_ratelimited("%s: lost myself!\n", __func__);
@@ -440,8 +432,6 @@ static void irda_discovery_timeout(u_long priv)
440{ 432{
441 struct irda_sock *self; 433 struct irda_sock *self;
442 434
443 IRDA_DEBUG(2, "%s()\n", __func__);
444
445 self = (struct irda_sock *) priv; 435 self = (struct irda_sock *) priv;
446 BUG_ON(self == NULL); 436 BUG_ON(self == NULL);
447 437
@@ -465,7 +455,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
465 notify_t notify; 455 notify_t notify;
466 456
467 if (self->tsap) { 457 if (self->tsap) {
468 IRDA_DEBUG(0, "%s: busy!\n", __func__); 458 pr_debug("%s: busy!\n", __func__);
469 return -EBUSY; 459 return -EBUSY;
470 } 460 }
471 461
@@ -483,8 +473,8 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
483 self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT, 473 self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT,
484 &notify); 474 &notify);
485 if (self->tsap == NULL) { 475 if (self->tsap == NULL) {
486 IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n", 476 pr_debug("%s(), Unable to allocate TSAP!\n",
487 __func__); 477 __func__);
488 return -ENOMEM; 478 return -ENOMEM;
489 } 479 }
490 /* Remember which TSAP selector we actually got */ 480 /* Remember which TSAP selector we actually got */
@@ -517,7 +507,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
517 507
518 self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid); 508 self->lsap = irlmp_open_lsap(LSAP_CONNLESS, &notify, pid);
519 if (self->lsap == NULL) { 509 if (self->lsap == NULL) {
520 IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__); 510 pr_debug("%s(), Unable to allocate LSAP!\n", __func__);
521 return -ENOMEM; 511 return -ENOMEM;
522 } 512 }
523 513
@@ -538,7 +528,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
538 */ 528 */
539static int irda_find_lsap_sel(struct irda_sock *self, char *name) 529static int irda_find_lsap_sel(struct irda_sock *self, char *name)
540{ 530{
541 IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name); 531 pr_debug("%s(%p, %s)\n", __func__, self, name);
542 532
543 if (self->iriap) { 533 if (self->iriap) {
544 net_warn_ratelimited("%s(): busy with a previous query\n", 534 net_warn_ratelimited("%s(): busy with a previous query\n",
@@ -577,8 +567,8 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
577 /* Get the remote TSAP selector */ 567 /* Get the remote TSAP selector */
578 switch (self->ias_result->type) { 568 switch (self->ias_result->type) {
579 case IAS_INTEGER: 569 case IAS_INTEGER:
580 IRDA_DEBUG(4, "%s() int=%d\n", 570 pr_debug("%s() int=%d\n",
581 __func__, self->ias_result->t.integer); 571 __func__, self->ias_result->t.integer);
582 572
583 if (self->ias_result->t.integer != -1) 573 if (self->ias_result->t.integer != -1)
584 self->dtsap_sel = self->ias_result->t.integer; 574 self->dtsap_sel = self->ias_result->t.integer;
@@ -587,7 +577,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
587 break; 577 break;
588 default: 578 default:
589 self->dtsap_sel = 0; 579 self->dtsap_sel = 0;
590 IRDA_DEBUG(0, "%s(), bad type!\n", __func__); 580 pr_debug("%s(), bad type!\n", __func__);
591 break; 581 break;
592 } 582 }
593 if (self->ias_result) 583 if (self->ias_result)
@@ -625,7 +615,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
625 __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ 615 __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */
626 __u8 dtsap_sel = 0x0; /* TSAP associated with it */ 616 __u8 dtsap_sel = 0x0; /* TSAP associated with it */
627 617
628 IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name); 618 pr_debug("%s(), name=%s\n", __func__, name);
629 619
630 /* Ask lmp for the current discovery log 620 /* Ask lmp for the current discovery log
631 * Note : we have to use irlmp_get_discoveries(), as opposed 621 * Note : we have to use irlmp_get_discoveries(), as opposed
@@ -646,8 +636,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
646 /* Try the address in the log */ 636 /* Try the address in the log */
647 self->daddr = discoveries[i].daddr; 637 self->daddr = discoveries[i].daddr;
648 self->saddr = 0x0; 638 self->saddr = 0x0;
649 IRDA_DEBUG(1, "%s(), trying daddr = %08x\n", 639 pr_debug("%s(), trying daddr = %08x\n",
650 __func__, self->daddr); 640 __func__, self->daddr);
651 641
652 /* Query remote LM-IAS for this service */ 642 /* Query remote LM-IAS for this service */
653 err = irda_find_lsap_sel(self, name); 643 err = irda_find_lsap_sel(self, name);
@@ -655,8 +645,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
655 case 0: 645 case 0:
656 /* We found the requested service */ 646 /* We found the requested service */
657 if(daddr != DEV_ADDR_ANY) { 647 if(daddr != DEV_ADDR_ANY) {
658 IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n", 648 pr_debug("%s(), discovered service ''%s'' in two different devices !!!\n",
659 __func__, name); 649 __func__, name);
660 self->daddr = DEV_ADDR_ANY; 650 self->daddr = DEV_ADDR_ANY;
661 kfree(discoveries); 651 kfree(discoveries);
662 return -ENOTUNIQ; 652 return -ENOTUNIQ;
@@ -670,7 +660,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
670 break; 660 break;
671 default: 661 default:
672 /* Something bad did happen :-( */ 662 /* Something bad did happen :-( */
673 IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); 663 pr_debug("%s(), unexpected IAS query failure\n",
664 __func__);
674 self->daddr = DEV_ADDR_ANY; 665 self->daddr = DEV_ADDR_ANY;
675 kfree(discoveries); 666 kfree(discoveries);
676 return -EHOSTUNREACH; 667 return -EHOSTUNREACH;
@@ -681,8 +672,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
681 672
682 /* Check out what we found */ 673 /* Check out what we found */
683 if(daddr == DEV_ADDR_ANY) { 674 if(daddr == DEV_ADDR_ANY) {
684 IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", 675 pr_debug("%s(), cannot discover service ''%s'' in any device !!!\n",
685 __func__, name); 676 __func__, name);
686 self->daddr = DEV_ADDR_ANY; 677 self->daddr = DEV_ADDR_ANY;
687 return -EADDRNOTAVAIL; 678 return -EADDRNOTAVAIL;
688 } 679 }
@@ -692,8 +683,8 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
692 self->saddr = 0x0; 683 self->saddr = 0x0;
693 self->dtsap_sel = dtsap_sel; 684 self->dtsap_sel = dtsap_sel;
694 685
695 IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n", 686 pr_debug("%s(), discovered requested service ''%s'' at address %08x\n",
696 __func__, name, self->daddr); 687 __func__, name, self->daddr);
697 688
698 return 0; 689 return 0;
699} 690}
@@ -725,8 +716,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
725 saddr.sir_addr = self->saddr; 716 saddr.sir_addr = self->saddr;
726 } 717 }
727 718
728 IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel); 719 pr_debug("%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel);
729 IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr); 720 pr_debug("%s(), addr = %08x\n", __func__, saddr.sir_addr);
730 721
731 /* uaddr_len come to us uninitialised */ 722 /* uaddr_len come to us uninitialised */
732 *uaddr_len = sizeof (struct sockaddr_irda); 723 *uaddr_len = sizeof (struct sockaddr_irda);
@@ -746,8 +737,6 @@ static int irda_listen(struct socket *sock, int backlog)
746 struct sock *sk = sock->sk; 737 struct sock *sk = sock->sk;
747 int err = -EOPNOTSUPP; 738 int err = -EOPNOTSUPP;
748 739
749 IRDA_DEBUG(2, "%s()\n", __func__);
750
751 lock_sock(sk); 740 lock_sock(sk);
752 741
753 if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && 742 if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) &&
@@ -779,7 +768,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
779 struct irda_sock *self = irda_sk(sk); 768 struct irda_sock *self = irda_sk(sk);
780 int err; 769 int err;
781 770
782 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 771 pr_debug("%s(%p)\n", __func__, self);
783 772
784 if (addr_len != sizeof(struct sockaddr_irda)) 773 if (addr_len != sizeof(struct sockaddr_irda))
785 return -EINVAL; 774 return -EINVAL;
@@ -792,7 +781,8 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
792 self->pid = addr->sir_lsap_sel; 781 self->pid = addr->sir_lsap_sel;
793 err = -EOPNOTSUPP; 782 err = -EOPNOTSUPP;
794 if (self->pid & 0x80) { 783 if (self->pid & 0x80) {
795 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); 784 pr_debug("%s(), extension in PID not supp!\n",
785 __func__);
796 goto out; 786 goto out;
797 } 787 }
798 err = irda_open_lsap(self, self->pid); 788 err = irda_open_lsap(self, self->pid);
@@ -845,8 +835,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
845 struct sk_buff *skb; 835 struct sk_buff *skb;
846 int err; 836 int err;
847 837
848 IRDA_DEBUG(2, "%s()\n", __func__);
849
850 err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0); 838 err = irda_create(sock_net(sk), newsock, sk->sk_protocol, 0);
851 if (err) 839 if (err)
852 return err; 840 return err;
@@ -911,7 +899,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
911 new->tsap = irttp_dup(self->tsap, new); 899 new->tsap = irttp_dup(self->tsap, new);
912 err = -EPERM; /* value does not seem to make sense. -arnd */ 900 err = -EPERM; /* value does not seem to make sense. -arnd */
913 if (!new->tsap) { 901 if (!new->tsap) {
914 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); 902 pr_debug("%s(), dup failed!\n", __func__);
915 kfree_skb(skb); 903 kfree_skb(skb);
916 goto out; 904 goto out;
917 } 905 }
@@ -971,7 +959,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
971 struct irda_sock *self = irda_sk(sk); 959 struct irda_sock *self = irda_sk(sk);
972 int err; 960 int err;
973 961
974 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 962 pr_debug("%s(%p)\n", __func__, self);
975 963
976 lock_sock(sk); 964 lock_sock(sk);
977 /* Don't allow connect for Ultra sockets */ 965 /* Don't allow connect for Ultra sockets */
@@ -1007,13 +995,13 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
1007 /* Try to find one suitable */ 995 /* Try to find one suitable */
1008 err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); 996 err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name);
1009 if (err) { 997 if (err) {
1010 IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__); 998 pr_debug("%s(), auto-connect failed!\n", __func__);
1011 goto out; 999 goto out;
1012 } 1000 }
1013 } else { 1001 } else {
1014 /* Use the one provided by the user */ 1002 /* Use the one provided by the user */
1015 self->daddr = addr->sir_addr; 1003 self->daddr = addr->sir_addr;
1016 IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr); 1004 pr_debug("%s(), daddr = %08x\n", __func__, self->daddr);
1017 1005
1018 /* If we don't have a valid service name, we assume the 1006 /* If we don't have a valid service name, we assume the
1019 * user want to connect on a specific LSAP. Prevent 1007 * user want to connect on a specific LSAP. Prevent
@@ -1023,7 +1011,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
1023 /* Query remote LM-IAS using service name */ 1011 /* Query remote LM-IAS using service name */
1024 err = irda_find_lsap_sel(self, addr->sir_name); 1012 err = irda_find_lsap_sel(self, addr->sir_name);
1025 if (err) { 1013 if (err) {
1026 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); 1014 pr_debug("%s(), connect failed!\n", __func__);
1027 goto out; 1015 goto out;
1028 } 1016 }
1029 } else { 1017 } else {
@@ -1048,7 +1036,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
1048 self->saddr, self->daddr, NULL, 1036 self->saddr, self->daddr, NULL,
1049 self->max_sdu_size_rx, NULL); 1037 self->max_sdu_size_rx, NULL);
1050 if (err) { 1038 if (err) {
1051 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); 1039 pr_debug("%s(), connect failed!\n", __func__);
1052 goto out; 1040 goto out;
1053 } 1041 }
1054 1042
@@ -1100,8 +1088,6 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,
1100 struct sock *sk; 1088 struct sock *sk;
1101 struct irda_sock *self; 1089 struct irda_sock *self;
1102 1090
1103 IRDA_DEBUG(2, "%s()\n", __func__);
1104
1105 if (net != &init_net) 1091 if (net != &init_net)
1106 return -EAFNOSUPPORT; 1092 return -EAFNOSUPPORT;
1107 1093
@@ -1121,7 +1107,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,
1121 return -ENOMEM; 1107 return -ENOMEM;
1122 1108
1123 self = irda_sk(sk); 1109 self = irda_sk(sk);
1124 IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self); 1110 pr_debug("%s() : self is %p\n", __func__, self);
1125 1111
1126 init_waitqueue_head(&self->query_wait); 1112 init_waitqueue_head(&self->query_wait);
1127 1113
@@ -1183,7 +1169,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol,
1183 */ 1169 */
1184static void irda_destroy_socket(struct irda_sock *self) 1170static void irda_destroy_socket(struct irda_sock *self)
1185{ 1171{
1186 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 1172 pr_debug("%s(%p)\n", __func__, self);
1187 1173
1188 /* Unregister with IrLMP */ 1174 /* Unregister with IrLMP */
1189 irlmp_unregister_client(self->ckey); 1175 irlmp_unregister_client(self->ckey);
@@ -1220,8 +1206,6 @@ static int irda_release(struct socket *sock)
1220{ 1206{
1221 struct sock *sk = sock->sk; 1207 struct sock *sk = sock->sk;
1222 1208
1223 IRDA_DEBUG(2, "%s()\n", __func__);
1224
1225 if (sk == NULL) 1209 if (sk == NULL)
1226 return 0; 1210 return 0;
1227 1211
@@ -1288,7 +1272,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1288 struct sk_buff *skb; 1272 struct sk_buff *skb;
1289 int err = -EPIPE; 1273 int err = -EPIPE;
1290 1274
1291 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); 1275 pr_debug("%s(), len=%zd\n", __func__, len);
1292 1276
1293 /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ 1277 /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
1294 if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | 1278 if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT |
@@ -1324,8 +1308,8 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1324 1308
1325 /* Check that we don't send out too big frames */ 1309 /* Check that we don't send out too big frames */
1326 if (len > self->max_data_size) { 1310 if (len > self->max_data_size) {
1327 IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n", 1311 pr_debug("%s(), Chopping frame from %zd to %d bytes!\n",
1328 __func__, len, self->max_data_size); 1312 __func__, len, self->max_data_size);
1329 len = self->max_data_size; 1313 len = self->max_data_size;
1330 } 1314 }
1331 1315
@@ -1349,7 +1333,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock,
1349 */ 1333 */
1350 err = irttp_data_request(self->tsap, skb); 1334 err = irttp_data_request(self->tsap, skb);
1351 if (err) { 1335 if (err) {
1352 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); 1336 pr_debug("%s(), err=%d\n", __func__, err);
1353 goto out_err; 1337 goto out_err;
1354 } 1338 }
1355 1339
@@ -1380,8 +1364,6 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1380 size_t copied; 1364 size_t copied;
1381 int err; 1365 int err;
1382 1366
1383 IRDA_DEBUG(4, "%s()\n", __func__);
1384
1385 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, 1367 skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
1386 flags & MSG_DONTWAIT, &err); 1368 flags & MSG_DONTWAIT, &err);
1387 if (!skb) 1369 if (!skb)
@@ -1391,8 +1373,8 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1391 copied = skb->len; 1373 copied = skb->len;
1392 1374
1393 if (copied > size) { 1375 if (copied > size) {
1394 IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", 1376 pr_debug("%s(), Received truncated frame (%zd < %zd)!\n",
1395 __func__, copied, size); 1377 __func__, copied, size);
1396 copied = size; 1378 copied = size;
1397 msg->msg_flags |= MSG_TRUNC; 1379 msg->msg_flags |= MSG_TRUNC;
1398 } 1380 }
@@ -1408,7 +1390,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1408 */ 1390 */
1409 if (self->rx_flow == FLOW_STOP) { 1391 if (self->rx_flow == FLOW_STOP) {
1410 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { 1392 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
1411 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); 1393 pr_debug("%s(), Starting IrTTP\n", __func__);
1412 self->rx_flow = FLOW_START; 1394 self->rx_flow = FLOW_START;
1413 irttp_flow_request(self->tsap, FLOW_START); 1395 irttp_flow_request(self->tsap, FLOW_START);
1414 } 1396 }
@@ -1430,8 +1412,6 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1430 int target, err; 1412 int target, err;
1431 long timeo; 1413 long timeo;
1432 1414
1433 IRDA_DEBUG(3, "%s()\n", __func__);
1434
1435 if ((err = sock_error(sk)) < 0) 1415 if ((err = sock_error(sk)) < 0)
1436 return err; 1416 return err;
1437 1417
@@ -1503,15 +1483,15 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1503 1483
1504 /* put the skb back if we didn't use it up.. */ 1484 /* put the skb back if we didn't use it up.. */
1505 if (skb->len) { 1485 if (skb->len) {
1506 IRDA_DEBUG(1, "%s(), back on q!\n", 1486 pr_debug("%s(), back on q!\n",
1507 __func__); 1487 __func__);
1508 skb_queue_head(&sk->sk_receive_queue, skb); 1488 skb_queue_head(&sk->sk_receive_queue, skb);
1509 break; 1489 break;
1510 } 1490 }
1511 1491
1512 kfree_skb(skb); 1492 kfree_skb(skb);
1513 } else { 1493 } else {
1514 IRDA_DEBUG(0, "%s() questionable!?\n", __func__); 1494 pr_debug("%s() questionable!?\n", __func__);
1515 1495
1516 /* put message back and return */ 1496 /* put message back and return */
1517 skb_queue_head(&sk->sk_receive_queue, skb); 1497 skb_queue_head(&sk->sk_receive_queue, skb);
@@ -1527,7 +1507,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1527 */ 1507 */
1528 if (self->rx_flow == FLOW_STOP) { 1508 if (self->rx_flow == FLOW_STOP) {
1529 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { 1509 if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) {
1530 IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); 1510 pr_debug("%s(), Starting IrTTP\n", __func__);
1531 self->rx_flow = FLOW_START; 1511 self->rx_flow = FLOW_START;
1532 irttp_flow_request(self->tsap, FLOW_START); 1512 irttp_flow_request(self->tsap, FLOW_START);
1533 } 1513 }
@@ -1551,7 +1531,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1551 struct sk_buff *skb; 1531 struct sk_buff *skb;
1552 int err; 1532 int err;
1553 1533
1554 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); 1534 pr_debug("%s(), len=%zd\n", __func__, len);
1555 1535
1556 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) 1536 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
1557 return -EINVAL; 1537 return -EINVAL;
@@ -1575,9 +1555,8 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1575 * service, so we have no fragmentation and no coalescence 1555 * service, so we have no fragmentation and no coalescence
1576 */ 1556 */
1577 if (len > self->max_data_size) { 1557 if (len > self->max_data_size) {
1578 IRDA_DEBUG(0, "%s(), Warning to much data! " 1558 pr_debug("%s(), Warning too much data! Chopping frame from %zd to %d bytes!\n",
1579 "Chopping frame from %zd to %d bytes!\n", 1559 __func__, len, self->max_data_size);
1580 __func__, len, self->max_data_size);
1581 len = self->max_data_size; 1560 len = self->max_data_size;
1582 } 1561 }
1583 1562
@@ -1590,7 +1569,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1590 skb_reserve(skb, self->max_header_size); 1569 skb_reserve(skb, self->max_header_size);
1591 skb_reset_transport_header(skb); 1570 skb_reset_transport_header(skb);
1592 1571
1593 IRDA_DEBUG(4, "%s(), appending user data\n", __func__); 1572 pr_debug("%s(), appending user data\n", __func__);
1594 skb_put(skb, len); 1573 skb_put(skb, len);
1595 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); 1574 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
1596 if (err) { 1575 if (err) {
@@ -1604,7 +1583,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock,
1604 */ 1583 */
1605 err = irttp_udata_request(self->tsap, skb); 1584 err = irttp_udata_request(self->tsap, skb);
1606 if (err) { 1585 if (err) {
1607 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); 1586 pr_debug("%s(), err=%d\n", __func__, err);
1608 goto out; 1587 goto out;
1609 } 1588 }
1610 1589
@@ -1633,7 +1612,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1633 struct sk_buff *skb; 1612 struct sk_buff *skb;
1634 int err; 1613 int err;
1635 1614
1636 IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); 1615 pr_debug("%s(), len=%zd\n", __func__, len);
1637 1616
1638 err = -EINVAL; 1617 err = -EINVAL;
1639 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) 1618 if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
@@ -1661,7 +1640,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1661 1640
1662 pid = addr->sir_lsap_sel; 1641 pid = addr->sir_lsap_sel;
1663 if (pid & 0x80) { 1642 if (pid & 0x80) {
1664 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); 1643 pr_debug("%s(), extension in PID not supp!\n",
1644 __func__);
1665 err = -EOPNOTSUPP; 1645 err = -EOPNOTSUPP;
1666 goto out; 1646 goto out;
1667 } 1647 }
@@ -1670,8 +1650,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1670 * port. Jean II */ 1650 * port. Jean II */
1671 if ((self->lsap == NULL) || 1651 if ((self->lsap == NULL) ||
1672 (sk->sk_state != TCP_ESTABLISHED)) { 1652 (sk->sk_state != TCP_ESTABLISHED)) {
1673 IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n", 1653 pr_debug("%s(), socket not bound to Ultra PID.\n",
1674 __func__); 1654 __func__);
1675 err = -ENOTCONN; 1655 err = -ENOTCONN;
1676 goto out; 1656 goto out;
1677 } 1657 }
@@ -1684,9 +1664,8 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1684 * service, so we have no fragmentation and no coalescence 1664 * service, so we have no fragmentation and no coalescence
1685 */ 1665 */
1686 if (len > self->max_data_size) { 1666 if (len > self->max_data_size) {
1687 IRDA_DEBUG(0, "%s(), Warning to much data! " 1667 pr_debug("%s(), Warning too much data! Chopping frame from %zd to %d bytes!\n",
1688 "Chopping frame from %zd to %d bytes!\n", 1668 __func__, len, self->max_data_size);
1689 __func__, len, self->max_data_size);
1690 len = self->max_data_size; 1669 len = self->max_data_size;
1691 } 1670 }
1692 1671
@@ -1699,7 +1678,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1699 skb_reserve(skb, self->max_header_size); 1678 skb_reserve(skb, self->max_header_size);
1700 skb_reset_transport_header(skb); 1679 skb_reset_transport_header(skb);
1701 1680
1702 IRDA_DEBUG(4, "%s(), appending user data\n", __func__); 1681 pr_debug("%s(), appending user data\n", __func__);
1703 skb_put(skb, len); 1682 skb_put(skb, len);
1704 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); 1683 err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len);
1705 if (err) { 1684 if (err) {
@@ -1710,7 +1689,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock,
1710 err = irlmp_connless_data_request((bound ? self->lsap : NULL), 1689 err = irlmp_connless_data_request((bound ? self->lsap : NULL),
1711 skb, pid); 1690 skb, pid);
1712 if (err) 1691 if (err)
1713 IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); 1692 pr_debug("%s(), err=%d\n", __func__, err);
1714out: 1693out:
1715 release_sock(sk); 1694 release_sock(sk);
1716 return err ? : len; 1695 return err ? : len;
@@ -1725,7 +1704,7 @@ static int irda_shutdown(struct socket *sock, int how)
1725 struct sock *sk = sock->sk; 1704 struct sock *sk = sock->sk;
1726 struct irda_sock *self = irda_sk(sk); 1705 struct irda_sock *self = irda_sk(sk);
1727 1706
1728 IRDA_DEBUG(1, "%s(%p)\n", __func__, self); 1707 pr_debug("%s(%p)\n", __func__, self);
1729 1708
1730 lock_sock(sk); 1709 lock_sock(sk);
1731 1710
@@ -1764,8 +1743,6 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1764 struct irda_sock *self = irda_sk(sk); 1743 struct irda_sock *self = irda_sk(sk);
1765 unsigned int mask; 1744 unsigned int mask;
1766 1745
1767 IRDA_DEBUG(4, "%s()\n", __func__);
1768
1769 poll_wait(file, sk_sleep(sk), wait); 1746 poll_wait(file, sk_sleep(sk), wait);
1770 mask = 0; 1747 mask = 0;
1771 1748
@@ -1773,13 +1750,13 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1773 if (sk->sk_err) 1750 if (sk->sk_err)
1774 mask |= POLLERR; 1751 mask |= POLLERR;
1775 if (sk->sk_shutdown & RCV_SHUTDOWN) { 1752 if (sk->sk_shutdown & RCV_SHUTDOWN) {
1776 IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); 1753 pr_debug("%s(), POLLHUP\n", __func__);
1777 mask |= POLLHUP; 1754 mask |= POLLHUP;
1778 } 1755 }
1779 1756
1780 /* Readable? */ 1757 /* Readable? */
1781 if (!skb_queue_empty(&sk->sk_receive_queue)) { 1758 if (!skb_queue_empty(&sk->sk_receive_queue)) {
1782 IRDA_DEBUG(4, "Socket is readable\n"); 1759 pr_debug("Socket is readable\n");
1783 mask |= POLLIN | POLLRDNORM; 1760 mask |= POLLIN | POLLRDNORM;
1784 } 1761 }
1785 1762
@@ -1787,7 +1764,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
1787 switch (sk->sk_type) { 1764 switch (sk->sk_type) {
1788 case SOCK_STREAM: 1765 case SOCK_STREAM:
1789 if (sk->sk_state == TCP_CLOSE) { 1766 if (sk->sk_state == TCP_CLOSE) {
1790 IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); 1767 pr_debug("%s(), POLLHUP\n", __func__);
1791 mask |= POLLHUP; 1768 mask |= POLLHUP;
1792 } 1769 }
1793 1770
@@ -1825,7 +1802,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1825 struct sock *sk = sock->sk; 1802 struct sock *sk = sock->sk;
1826 int err; 1803 int err;
1827 1804
1828 IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd); 1805 pr_debug("%s(), cmd=%#x\n", __func__, cmd);
1829 1806
1830 err = -EINVAL; 1807 err = -EINVAL;
1831 switch (cmd) { 1808 switch (cmd) {
@@ -1866,7 +1843,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1866 case SIOCSIFMETRIC: 1843 case SIOCSIFMETRIC:
1867 break; 1844 break;
1868 default: 1845 default:
1869 IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__); 1846 pr_debug("%s(), doing device ioctl!\n", __func__);
1870 err = -ENOIOCTLCMD; 1847 err = -ENOIOCTLCMD;
1871 } 1848 }
1872 1849
@@ -1902,7 +1879,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
1902 struct ias_attrib * ias_attr; /* Attribute in IAS object */ 1879 struct ias_attrib * ias_attr; /* Attribute in IAS object */
1903 int opt, free_ias = 0, err = 0; 1880 int opt, free_ias = 0, err = 0;
1904 1881
1905 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 1882 pr_debug("%s(%p)\n", __func__, self);
1906 1883
1907 if (level != SOL_IRLMP) 1884 if (level != SOL_IRLMP)
1908 return -ENOPROTOOPT; 1885 return -ENOPROTOOPT;
@@ -2102,7 +2079,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
2102 2079
2103 /* Check is the user space own the object */ 2080 /* Check is the user space own the object */
2104 if(ias_attr->value->owner != IAS_USER_ATTR) { 2081 if(ias_attr->value->owner != IAS_USER_ATTR) {
2105 IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__); 2082 pr_debug("%s(), attempting to delete a kernel attribute\n",
2083 __func__);
2106 kfree(ias_opt); 2084 kfree(ias_opt);
2107 err = -EPERM; 2085 err = -EPERM;
2108 goto out; 2086 goto out;
@@ -2125,8 +2103,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
2125 2103
2126 /* Only possible for a seqpacket service (TTP with SAR) */ 2104 /* Only possible for a seqpacket service (TTP with SAR) */
2127 if (sk->sk_type != SOCK_SEQPACKET) { 2105 if (sk->sk_type != SOCK_SEQPACKET) {
2128 IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n", 2106 pr_debug("%s(), setting max_sdu_size = %d\n",
2129 __func__, opt); 2107 __func__, opt);
2130 self->max_sdu_size_rx = opt; 2108 self->max_sdu_size_rx = opt;
2131 } else { 2109 } else {
2132 net_warn_ratelimited("%s: not allowed to set MAXSDUSIZE for this socket type!\n", 2110 net_warn_ratelimited("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
@@ -2258,7 +2236,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
2258 int err = 0; 2236 int err = 0;
2259 int offset, total; 2237 int offset, total;
2260 2238
2261 IRDA_DEBUG(2, "%s(%p)\n", __func__, self); 2239 pr_debug("%s(%p)\n", __func__, self);
2262 2240
2263 if (level != SOL_IRLMP) 2241 if (level != SOL_IRLMP)
2264 return -ENOPROTOOPT; 2242 return -ENOPROTOOPT;
@@ -2546,7 +2524,8 @@ bed:
2546 2524
2547 /* Wait until a node is discovered */ 2525 /* Wait until a node is discovered */
2548 if (!self->cachedaddr) { 2526 if (!self->cachedaddr) {
2549 IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__); 2527 pr_debug("%s(), nothing discovered yet, going to sleep...\n",
2528 __func__);
2550 2529
2551 /* Set watchdog timer to expire in <val> ms. */ 2530 /* Set watchdog timer to expire in <val> ms. */
2552 self->errno = 0; 2531 self->errno = 0;
@@ -2562,14 +2541,14 @@ bed:
2562 /* If watchdog is still activated, kill it! */ 2541 /* If watchdog is still activated, kill it! */
2563 del_timer(&(self->watchdog)); 2542 del_timer(&(self->watchdog));
2564 2543
2565 IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__); 2544 pr_debug("%s(), ...waking up !\n", __func__);
2566 2545
2567 if (err != 0) 2546 if (err != 0)
2568 goto out; 2547 goto out;
2569 } 2548 }
2570 else 2549 else
2571 IRDA_DEBUG(1, "%s(), found immediately !\n", 2550 pr_debug("%s(), found immediately !\n",
2572 __func__); 2551 __func__);
2573 2552
2574 /* Tell IrLMP that we have been notified */ 2553 /* Tell IrLMP that we have been notified */
2575 irlmp_update_client(self->ckey, self->mask.word, 2554 irlmp_update_client(self->ckey, self->mask.word,
diff --git a/net/irda/discovery.c b/net/irda/discovery.c
index 6786e7f193d2..364d70aed068 100644
--- a/net/irda/discovery.c
+++ b/net/irda/discovery.c
@@ -112,8 +112,6 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
112{ 112{
113 discovery_t *discovery; 113 discovery_t *discovery;
114 114
115 IRDA_DEBUG(4, "%s()\n", __func__);
116
117 /* 115 /*
118 * If log is missing this means that IrLAP was unable to perform the 116 * If log is missing this means that IrLAP was unable to perform the
119 * discovery, so restart discovery again with just the half timeout 117 * discovery, so restart discovery again with just the half timeout
@@ -159,8 +157,6 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
159 int i = 0; /* How many we expired */ 157 int i = 0; /* How many we expired */
160 158
161 IRDA_ASSERT(log != NULL, return;); 159 IRDA_ASSERT(log != NULL, return;);
162 IRDA_DEBUG(4, "%s()\n", __func__);
163
164 spin_lock_irqsave(&log->hb_spinlock, flags); 160 spin_lock_irqsave(&log->hb_spinlock, flags);
165 161
166 discovery = (discovery_t *) hashbin_get_first(log); 162 discovery = (discovery_t *) hashbin_get_first(log);
@@ -232,10 +228,10 @@ void irlmp_dump_discoveries(hashbin_t *log)
232 228
233 discovery = (discovery_t *) hashbin_get_first(log); 229 discovery = (discovery_t *) hashbin_get_first(log);
234 while (discovery != NULL) { 230 while (discovery != NULL) {
235 IRDA_DEBUG(0, "Discovery:\n"); 231 pr_debug("Discovery:\n");
236 IRDA_DEBUG(0, " daddr=%08x\n", discovery->data.daddr); 232 pr_debug(" daddr=%08x\n", discovery->data.daddr);
237 IRDA_DEBUG(0, " saddr=%08x\n", discovery->data.saddr); 233 pr_debug(" saddr=%08x\n", discovery->data.saddr);
238 IRDA_DEBUG(0, " nickname=%s\n", discovery->data.info); 234 pr_debug(" nickname=%s\n", discovery->data.info);
239 235
240 discovery = (discovery_t *) hashbin_get_next(log); 236 discovery = (discovery_t *) hashbin_get_next(log);
241 } 237 }
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
92static void __exit ircomm_cleanup(void) 92static 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 */
156static int __ircomm_close(struct ircomm_cb *self) 154static 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);
243void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb, 235void 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);
290void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, 278void 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 */
334void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) 318void 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);
421static void ircomm_control_indication(struct ircomm_cb *self, 401static 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);
478void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, 454void 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 */
499void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) 473void 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
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c
index b172c6522328..0476da24848c 100644
--- a/net/irda/ircomm/ircomm_event.c
+++ b/net/irda/ircomm/ircomm_event.c
@@ -106,8 +106,8 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event,
106 ircomm_connect_indication(self, skb, info); 106 ircomm_connect_indication(self, skb, info);
107 break; 107 break;
108 default: 108 default:
109 IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ , 109 pr_debug("%s(), unknown event: %s\n", __func__ ,
110 ircomm_event[event]); 110 ircomm_event[event]);
111 ret = -EINVAL; 111 ret = -EINVAL;
112 } 112 }
113 return ret; 113 return ret;
@@ -136,8 +136,8 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event,
136 ircomm_disconnect_indication(self, skb, info); 136 ircomm_disconnect_indication(self, skb, info);
137 break; 137 break;
138 default: 138 default:
139 IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ , 139 pr_debug("%s(), unknown event: %s\n", __func__ ,
140 ircomm_event[event]); 140 ircomm_event[event]);
141 ret = -EINVAL; 141 ret = -EINVAL;
142 } 142 }
143 return ret; 143 return ret;
@@ -169,8 +169,8 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event,
169 ircomm_disconnect_indication(self, skb, info); 169 ircomm_disconnect_indication(self, skb, info);
170 break; 170 break;
171 default: 171 default:
172 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , 172 pr_debug("%s(), unknown event = %s\n", __func__ ,
173 ircomm_event[event]); 173 ircomm_event[event]);
174 ret = -EINVAL; 174 ret = -EINVAL;
175 } 175 }
176 return ret; 176 return ret;
@@ -211,8 +211,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
211 ret = self->issue.disconnect_request(self, skb, info); 211 ret = self->issue.disconnect_request(self, skb, info);
212 break; 212 break;
213 default: 213 default:
214 IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , 214 pr_debug("%s(), unknown event = %s\n", __func__ ,
215 ircomm_event[event]); 215 ircomm_event[event]);
216 ret = -EINVAL; 216 ret = -EINVAL;
217 } 217 }
218 return ret; 218 return ret;
@@ -227,8 +227,8 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event,
227int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, 227int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
228 struct sk_buff *skb, struct ircomm_info *info) 228 struct sk_buff *skb, struct ircomm_info *info)
229{ 229{
230 IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ , 230 pr_debug("%s: state=%s, event=%s\n", __func__ ,
231 ircomm_state[self->state], ircomm_event[event]); 231 ircomm_state[self->state], ircomm_event[event]);
232 232
233 return (*state[self->state])(self, event, skb, info); 233 return (*state[self->state])(self, event, skb, info);
234} 234}
@@ -243,6 +243,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state)
243{ 243{
244 self->state = state; 244 self->state = state;
245 245
246 IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ , 246 pr_debug("%s: next state=%s, service type=%d\n", __func__ ,
247 ircomm_state[self->state], self->service_type); 247 ircomm_state[self->state], self->service_type);
248} 248}
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c
index 05767e3ef0d2..e4cc847bb933 100644
--- a/net/irda/ircomm/ircomm_lmp.c
+++ b/net/irda/ircomm/ircomm_lmp.c
@@ -52,8 +52,6 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self,
52{ 52{
53 int ret = 0; 53 int ret = 0;
54 54
55 IRDA_DEBUG(0, "%s()\n", __func__ );
56
57 /* Don't forget to refcount it - should be NULL anyway */ 55 /* Don't forget to refcount it - should be NULL anyway */
58 if(userdata) 56 if(userdata)
59 skb_get(userdata); 57 skb_get(userdata);
@@ -74,8 +72,6 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self,
74{ 72{
75 struct sk_buff *tx_skb; 73 struct sk_buff *tx_skb;
76 74
77 IRDA_DEBUG(0, "%s()\n", __func__ );
78
79 /* Any userdata supplied? */ 75 /* Any userdata supplied? */
80 if (userdata == NULL) { 76 if (userdata == NULL) {
81 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 77 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
@@ -107,8 +103,6 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
107 struct sk_buff *tx_skb; 103 struct sk_buff *tx_skb;
108 int ret; 104 int ret;
109 105
110 IRDA_DEBUG(0, "%s()\n", __func__ );
111
112 if (!userdata) { 106 if (!userdata) {
113 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 107 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
114 if (!tx_skb) 108 if (!tx_skb)
@@ -144,13 +138,11 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
144 138
145 cb = (struct irda_skb_cb *) skb->cb; 139 cb = (struct irda_skb_cb *) skb->cb;
146 140
147 IRDA_DEBUG(2, "%s()\n", __func__ );
148
149 line = cb->line; 141 line = cb->line;
150 142
151 self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); 143 self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
152 if (!self) { 144 if (!self) {
153 IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ ); 145 pr_debug("%s(), didn't find myself\n", __func__);
154 return; 146 return;
155 } 147 }
156 148
@@ -160,7 +152,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
160 self->pkt_count--; 152 self->pkt_count--;
161 153
162 if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { 154 if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
163 IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ ); 155 pr_debug("%s(), asking TTY to start again!\n", __func__);
164 self->flow_status = FLOW_START; 156 self->flow_status = FLOW_START;
165 if (self->notify.flow_indication) 157 if (self->notify.flow_indication)
166 self->notify.flow_indication(self->notify.instance, 158 self->notify.flow_indication(self->notify.instance,
@@ -187,7 +179,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
187 179
188 cb->line = self->line; 180 cb->line = self->line;
189 181
190 IRDA_DEBUG(4, "%s(), sending frame\n", __func__ ); 182 pr_debug("%s(), sending frame\n", __func__);
191 183
192 /* Don't forget to refcount it - see ircomm_tty_do_softint() */ 184 /* Don't forget to refcount it - see ircomm_tty_do_softint() */
193 skb_get(skb); 185 skb_get(skb);
@@ -196,7 +188,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
196 skb->destructor = ircomm_lmp_flow_control; 188 skb->destructor = ircomm_lmp_flow_control;
197 189
198 if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { 190 if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
199 IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ ); 191 pr_debug("%s(), asking TTY to slow down!\n", __func__);
200 self->flow_status = FLOW_STOP; 192 self->flow_status = FLOW_STOP;
201 if (self->notify.flow_indication) 193 if (self->notify.flow_indication)
202 self->notify.flow_indication(self->notify.instance, 194 self->notify.flow_indication(self->notify.instance,
@@ -222,8 +214,6 @@ static int ircomm_lmp_data_indication(void *instance, void *sap,
222{ 214{
223 struct ircomm_cb *self = (struct ircomm_cb *) instance; 215 struct ircomm_cb *self = (struct ircomm_cb *) instance;
224 216
225 IRDA_DEBUG(4, "%s()\n", __func__ );
226
227 IRDA_ASSERT(self != NULL, return -1;); 217 IRDA_ASSERT(self != NULL, return -1;);
228 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 218 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
229 IRDA_ASSERT(skb != NULL, return -1;); 219 IRDA_ASSERT(skb != NULL, return -1;);
@@ -252,8 +242,6 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap,
252 struct ircomm_cb *self = (struct ircomm_cb *) instance; 242 struct ircomm_cb *self = (struct ircomm_cb *) instance;
253 struct ircomm_info info; 243 struct ircomm_info info;
254 244
255 IRDA_DEBUG(0, "%s()\n", __func__ );
256
257 IRDA_ASSERT(self != NULL, return;); 245 IRDA_ASSERT(self != NULL, return;);
258 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 246 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
259 IRDA_ASSERT(skb != NULL, return;); 247 IRDA_ASSERT(skb != NULL, return;);
@@ -285,8 +273,6 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap,
285 struct ircomm_cb *self = (struct ircomm_cb *)instance; 273 struct ircomm_cb *self = (struct ircomm_cb *)instance;
286 struct ircomm_info info; 274 struct ircomm_info info;
287 275
288 IRDA_DEBUG(0, "%s()\n", __func__ );
289
290 IRDA_ASSERT(self != NULL, return;); 276 IRDA_ASSERT(self != NULL, return;);
291 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 277 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
292 IRDA_ASSERT(skb != NULL, return;); 278 IRDA_ASSERT(skb != NULL, return;);
@@ -315,8 +301,6 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap,
315 struct ircomm_cb *self = (struct ircomm_cb *) instance; 301 struct ircomm_cb *self = (struct ircomm_cb *) instance;
316 struct ircomm_info info; 302 struct ircomm_info info;
317 303
318 IRDA_DEBUG(0, "%s()\n", __func__ );
319
320 IRDA_ASSERT(self != NULL, return;); 304 IRDA_ASSERT(self != NULL, return;);
321 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 305 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
322 306
@@ -338,8 +322,6 @@ int ircomm_open_lsap(struct ircomm_cb *self)
338{ 322{
339 notify_t notify; 323 notify_t notify;
340 324
341 IRDA_DEBUG(0, "%s()\n", __func__ );
342
343 /* Register callbacks */ 325 /* Register callbacks */
344 irda_notify_init(&notify); 326 irda_notify_init(&notify);
345 notify.data_indication = ircomm_lmp_data_indication; 327 notify.data_indication = ircomm_lmp_data_indication;
@@ -351,7 +333,7 @@ int ircomm_open_lsap(struct ircomm_cb *self)
351 333
352 self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0); 334 self->lsap = irlmp_open_lsap(LSAP_ANY, &notify, 0);
353 if (!self->lsap) { 335 if (!self->lsap) {
354 IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ ); 336 pr_debug("%sfailed to allocate tsap\n", __func__);
355 return -1; 337 return -1;
356 } 338 }
357 self->slsap_sel = self->lsap->slsap_sel; 339 self->slsap_sel = self->lsap->slsap_sel;
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index c203fbb8cdd5..27be782be7e7 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -101,8 +101,6 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
101 struct sk_buff *skb; 101 struct sk_buff *skb;
102 int count; 102 int count;
103 103
104 IRDA_DEBUG(2, "%s()\n", __func__ );
105
106 IRDA_ASSERT(self != NULL, return -1;); 104 IRDA_ASSERT(self != NULL, return -1;);
107 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 105 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
108 106
@@ -139,7 +137,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
139 137
140 spin_unlock_irqrestore(&self->spinlock, flags); 138 spin_unlock_irqrestore(&self->spinlock, flags);
141 139
142 IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len); 140 pr_debug("%s(), skb->len=%d\n", __func__ , skb->len);
143 141
144 if (flush) { 142 if (flush) {
145 /* ircomm_tty_do_softint will take care of the rest */ 143 /* ircomm_tty_do_softint will take care of the rest */
@@ -173,12 +171,11 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
173 /* Find all common service types */ 171 /* Find all common service types */
174 service_type &= self->service_type; 172 service_type &= self->service_type;
175 if (!service_type) { 173 if (!service_type) {
176 IRDA_DEBUG(2, 174 pr_debug("%s(), No common service type to use!\n", __func__);
177 "%s(), No common service type to use!\n", __func__ );
178 return -1; 175 return -1;
179 } 176 }
180 IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ , 177 pr_debug("%s(), services in common=%02x\n", __func__ ,
181 service_type); 178 service_type);
182 179
183 /* 180 /*
184 * Now choose a preferred service type of those available 181 * Now choose a preferred service type of those available
@@ -192,8 +189,8 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
192 else if (service_type & IRCOMM_3_WIRE_RAW) 189 else if (service_type & IRCOMM_3_WIRE_RAW)
193 self->settings.service_type = IRCOMM_3_WIRE_RAW; 190 self->settings.service_type = IRCOMM_3_WIRE_RAW;
194 191
195 IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ , 192 pr_debug("%s(), resulting service type=0x%02x\n", __func__ ,
196 self->settings.service_type); 193 self->settings.service_type);
197 194
198 /* 195 /*
199 * Now the line is ready for some communication. Check if we are a 196 * Now the line is ready for some communication. Check if we are a
@@ -235,8 +232,8 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get)
235 else { 232 else {
236 self->settings.port_type = (__u8) param->pv.i; 233 self->settings.port_type = (__u8) param->pv.i;
237 234
238 IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ , 235 pr_debug("%s(), port type=%d\n", __func__ ,
239 self->settings.port_type); 236 self->settings.port_type);
240 } 237 }
241 return 0; 238 return 0;
242} 239}
@@ -255,9 +252,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get)
255 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 252 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
256 253
257 if (get) { 254 if (get) {
258 IRDA_DEBUG(0, "%s(), not imp!\n", __func__ ); 255 pr_debug("%s(), not imp!\n", __func__);
259 } else { 256 } else {
260 IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c); 257 pr_debug("%s(), port-name=%s\n", __func__ , param->pv.c);
261 strncpy(self->settings.port_name, param->pv.c, 32); 258 strncpy(self->settings.port_name, param->pv.c, 32);
262 } 259 }
263 260
@@ -282,7 +279,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get)
282 else 279 else
283 self->settings.data_rate = param->pv.i; 280 self->settings.data_rate = param->pv.i;
284 281
285 IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i); 282 pr_debug("%s(), data rate = %d\n", __func__ , param->pv.i);
286 283
287 return 0; 284 return 0;
288} 285}
@@ -328,7 +325,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param,
328 else 325 else
329 self->settings.flow_control = (__u8) param->pv.i; 326 self->settings.flow_control = (__u8) param->pv.i;
330 327
331 IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i); 328 pr_debug("%s(), flow control = 0x%02x\n", __func__ , (__u8)param->pv.i);
332 329
333 return 0; 330 return 0;
334} 331}
@@ -354,8 +351,8 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get)
354 self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; 351 self->settings.xonxoff[1] = (__u16) param->pv.i >> 8;
355 } 352 }
356 353
357 IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ , 354 pr_debug("%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ ,
358 param->pv.i & 0xff, param->pv.i >> 8); 355 param->pv.i & 0xff, param->pv.i >> 8);
359 356
360 return 0; 357 return 0;
361} 358}
@@ -381,8 +378,8 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
381 self->settings.enqack[1] = (__u16) param->pv.i >> 8; 378 self->settings.enqack[1] = (__u16) param->pv.i >> 8;
382 } 379 }
383 380
384 IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ , 381 pr_debug("%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ ,
385 param->pv.i & 0xff, param->pv.i >> 8); 382 param->pv.i & 0xff, param->pv.i >> 8);
386 383
387 return 0; 384 return 0;
388} 385}
@@ -396,7 +393,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get)
396static int ircomm_param_line_status(void *instance, irda_param_t *param, 393static int ircomm_param_line_status(void *instance, irda_param_t *param,
397 int get) 394 int get)
398{ 395{
399 IRDA_DEBUG(2, "%s(), not impl.\n", __func__ ); 396 pr_debug("%s(), not impl.\n", __func__);
400 397
401 return 0; 398 return 0;
402} 399}
@@ -457,7 +454,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
457 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 454 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
458 __u8 dce; 455 __u8 dce;
459 456
460 IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i); 457 pr_debug("%s(), dce = 0x%02x\n", __func__ , (__u8)param->pv.i);
461 458
462 dce = (__u8) param->pv.i; 459 dce = (__u8) param->pv.i;
463 460
@@ -469,7 +466,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get)
469 /* Check if any of the settings have changed */ 466 /* Check if any of the settings have changed */
470 if (dce & 0x0f) { 467 if (dce & 0x0f) {
471 if (dce & IRCOMM_DELTA_CTS) { 468 if (dce & IRCOMM_DELTA_CTS) {
472 IRDA_DEBUG(2, "%s(), CTS\n", __func__ ); 469 pr_debug("%s(), CTS\n", __func__);
473 } 470 }
474 } 471 }
475 472
diff --git a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c
index abe9a5ab8d34..4b81e0934770 100644
--- a/net/irda/ircomm/ircomm_ttp.c
+++ b/net/irda/ircomm/ircomm_ttp.c
@@ -76,8 +76,6 @@ int ircomm_open_tsap(struct ircomm_cb *self)
76{ 76{
77 notify_t notify; 77 notify_t notify;
78 78
79 IRDA_DEBUG(4, "%s()\n", __func__ );
80
81 /* Register callbacks */ 79 /* Register callbacks */
82 irda_notify_init(&notify); 80 irda_notify_init(&notify);
83 notify.data_indication = ircomm_ttp_data_indication; 81 notify.data_indication = ircomm_ttp_data_indication;
@@ -91,7 +89,7 @@ int ircomm_open_tsap(struct ircomm_cb *self)
91 self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, 89 self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT,
92 &notify); 90 &notify);
93 if (!self->tsap) { 91 if (!self->tsap) {
94 IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ ); 92 pr_debug("%sfailed to allocate tsap\n", __func__);
95 return -1; 93 return -1;
96 } 94 }
97 self->slsap_sel = self->tsap->stsap_sel; 95 self->slsap_sel = self->tsap->stsap_sel;
@@ -119,8 +117,6 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self,
119{ 117{
120 int ret = 0; 118 int ret = 0;
121 119
122 IRDA_DEBUG(4, "%s()\n", __func__ );
123
124 /* Don't forget to refcount it - should be NULL anyway */ 120 /* Don't forget to refcount it - should be NULL anyway */
125 if(userdata) 121 if(userdata)
126 skb_get(userdata); 122 skb_get(userdata);
@@ -143,8 +139,6 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self,
143{ 139{
144 int ret; 140 int ret;
145 141
146 IRDA_DEBUG(4, "%s()\n", __func__ );
147
148 /* Don't forget to refcount it - should be NULL anyway */ 142 /* Don't forget to refcount it - should be NULL anyway */
149 if(userdata) 143 if(userdata)
150 skb_get(userdata); 144 skb_get(userdata);
@@ -171,7 +165,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
171 165
172 IRDA_ASSERT(skb != NULL, return -1;); 166 IRDA_ASSERT(skb != NULL, return -1;);
173 167
174 IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen); 168 pr_debug("%s(), clen=%d\n", __func__ , clen);
175 169
176 /* 170 /*
177 * Insert clen field, currently we either send data only, or control 171 * Insert clen field, currently we either send data only, or control
@@ -206,8 +200,6 @@ static int ircomm_ttp_data_indication(void *instance, void *sap,
206{ 200{
207 struct ircomm_cb *self = (struct ircomm_cb *) instance; 201 struct ircomm_cb *self = (struct ircomm_cb *) instance;
208 202
209 IRDA_DEBUG(4, "%s()\n", __func__ );
210
211 IRDA_ASSERT(self != NULL, return -1;); 203 IRDA_ASSERT(self != NULL, return -1;);
212 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 204 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
213 IRDA_ASSERT(skb != NULL, return -1;); 205 IRDA_ASSERT(skb != NULL, return -1;);
@@ -229,8 +221,6 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
229 struct ircomm_cb *self = (struct ircomm_cb *) instance; 221 struct ircomm_cb *self = (struct ircomm_cb *) instance;
230 struct ircomm_info info; 222 struct ircomm_info info;
231 223
232 IRDA_DEBUG(4, "%s()\n", __func__ );
233
234 IRDA_ASSERT(self != NULL, return;); 224 IRDA_ASSERT(self != NULL, return;);
235 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 225 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
236 IRDA_ASSERT(skb != NULL, return;); 226 IRDA_ASSERT(skb != NULL, return;);
@@ -270,8 +260,6 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
270 struct ircomm_cb *self = (struct ircomm_cb *)instance; 260 struct ircomm_cb *self = (struct ircomm_cb *)instance;
271 struct ircomm_info info; 261 struct ircomm_info info;
272 262
273 IRDA_DEBUG(4, "%s()\n", __func__ );
274
275 IRDA_ASSERT(self != NULL, return;); 263 IRDA_ASSERT(self != NULL, return;);
276 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 264 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
277 IRDA_ASSERT(skb != NULL, return;); 265 IRDA_ASSERT(skb != NULL, return;);
@@ -329,8 +317,6 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap,
329 struct ircomm_cb *self = (struct ircomm_cb *) instance; 317 struct ircomm_cb *self = (struct ircomm_cb *) instance;
330 struct ircomm_info info; 318 struct ircomm_info info;
331 319
332 IRDA_DEBUG(2, "%s()\n", __func__ );
333
334 IRDA_ASSERT(self != NULL, return;); 320 IRDA_ASSERT(self != NULL, return;);
335 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 321 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
336 322
@@ -354,8 +340,6 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap,
354{ 340{
355 struct ircomm_cb *self = (struct ircomm_cb *) instance; 341 struct ircomm_cb *self = (struct ircomm_cb *) instance;
356 342
357 IRDA_DEBUG(4, "%s()\n", __func__ );
358
359 IRDA_ASSERT(self != NULL, return;); 343 IRDA_ASSERT(self != NULL, return;);
360 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 344 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
361 345
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 11b0a5ed0252..40695b9751c1 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -174,8 +174,6 @@ static int __init ircomm_tty_init(void)
174 174
175static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) 175static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
176{ 176{
177 IRDA_DEBUG(0, "%s()\n", __func__ );
178
179 IRDA_ASSERT(self != NULL, return;); 177 IRDA_ASSERT(self != NULL, return;);
180 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 178 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
181 179
@@ -196,8 +194,6 @@ static void __exit ircomm_tty_cleanup(void)
196{ 194{
197 int ret; 195 int ret;
198 196
199 IRDA_DEBUG(4, "%s()\n", __func__ );
200
201 ret = tty_unregister_driver(driver); 197 ret = tty_unregister_driver(driver);
202 if (ret) { 198 if (ret) {
203 net_err_ratelimited("%s(), failed to unregister driver\n", 199 net_err_ratelimited("%s(), failed to unregister driver\n",
@@ -220,14 +216,12 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
220 notify_t notify; 216 notify_t notify;
221 int ret = -ENODEV; 217 int ret = -ENODEV;
222 218
223 IRDA_DEBUG(2, "%s()\n", __func__ );
224
225 IRDA_ASSERT(self != NULL, return -1;); 219 IRDA_ASSERT(self != NULL, return -1;);
226 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 220 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
227 221
228 /* Check if already open */ 222 /* Check if already open */
229 if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) { 223 if (test_and_set_bit(ASYNCB_INITIALIZED, &self->port.flags)) {
230 IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ ); 224 pr_debug("%s(), already open so break out!\n", __func__);
231 return 0; 225 return 0;
232 } 226 }
233 227
@@ -282,8 +276,6 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
282 int do_clocal = 0; 276 int do_clocal = 0;
283 unsigned long flags; 277 unsigned long flags;
284 278
285 IRDA_DEBUG(2, "%s()\n", __func__ );
286
287 /* 279 /*
288 * If non-blocking mode is set, or the port is not enabled, 280 * If non-blocking mode is set, or the port is not enabled,
289 * then make the check up front and then exit. 281 * then make the check up front and then exit.
@@ -298,12 +290,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
298 if (tty->termios.c_cflag & CBAUD) 290 if (tty->termios.c_cflag & CBAUD)
299 tty_port_raise_dtr_rts(port); 291 tty_port_raise_dtr_rts(port);
300 port->flags |= ASYNC_NORMAL_ACTIVE; 292 port->flags |= ASYNC_NORMAL_ACTIVE;
301 IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ ); 293 pr_debug("%s(), O_NONBLOCK requested!\n", __func__);
302 return 0; 294 return 0;
303 } 295 }
304 296
305 if (tty->termios.c_cflag & CLOCAL) { 297 if (tty->termios.c_cflag & CLOCAL) {
306 IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ ); 298 pr_debug("%s(), doing CLOCAL!\n", __func__);
307 do_clocal = 1; 299 do_clocal = 1;
308 } 300 }
309 301
@@ -317,8 +309,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
317 retval = 0; 309 retval = 0;
318 add_wait_queue(&port->open_wait, &wait); 310 add_wait_queue(&port->open_wait, &wait);
319 311
320 IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n", 312 pr_debug("%s(%d):block_til_ready before block on %s open_count=%d\n",
321 __FILE__, __LINE__, tty->driver->name, port->count); 313 __FILE__, __LINE__, tty->driver->name, port->count);
322 314
323 spin_lock_irqsave(&port->lock, flags); 315 spin_lock_irqsave(&port->lock, flags);
324 port->count--; 316 port->count--;
@@ -355,8 +347,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
355 break; 347 break;
356 } 348 }
357 349
358 IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n", 350 pr_debug("%s(%d):block_til_ready blocking on %s open_count=%d\n",
359 __FILE__, __LINE__, tty->driver->name, port->count); 351 __FILE__, __LINE__, tty->driver->name, port->count);
360 352
361 schedule(); 353 schedule();
362 } 354 }
@@ -370,8 +362,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
370 port->blocked_open--; 362 port->blocked_open--;
371 spin_unlock_irqrestore(&port->lock, flags); 363 spin_unlock_irqrestore(&port->lock, flags);
372 364
373 IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n", 365 pr_debug("%s(%d):block_til_ready after blocking on %s open_count=%d\n",
374 __FILE__, __LINE__, tty->driver->name, port->count); 366 __FILE__, __LINE__, tty->driver->name, port->count);
375 367
376 if (!retval) 368 if (!retval)
377 port->flags |= ASYNC_NORMAL_ACTIVE; 369 port->flags |= ASYNC_NORMAL_ACTIVE;
@@ -439,16 +431,14 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
439 unsigned long flags; 431 unsigned long flags;
440 int ret; 432 int ret;
441 433
442 IRDA_DEBUG(2, "%s()\n", __func__ );
443
444 /* ++ is not atomic, so this should be protected - Jean II */ 434 /* ++ is not atomic, so this should be protected - Jean II */
445 spin_lock_irqsave(&self->port.lock, flags); 435 spin_lock_irqsave(&self->port.lock, flags);
446 self->port.count++; 436 self->port.count++;
447 spin_unlock_irqrestore(&self->port.lock, flags); 437 spin_unlock_irqrestore(&self->port.lock, flags);
448 tty_port_tty_set(&self->port, tty); 438 tty_port_tty_set(&self->port, tty);
449 439
450 IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name, 440 pr_debug("%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
451 self->line, self->port.count); 441 self->line, self->port.count);
452 442
453 /* Not really used by us, but lets do it anyway */ 443 /* Not really used by us, but lets do it anyway */
454 self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0; 444 self->port.low_latency = (self->port.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -487,9 +477,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
487 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ 477 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
488 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ 478 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
489 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ 479 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
490 IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ ); 480 pr_debug("%s(), IrCOMM device\n", __func__);
491 } else { 481 } else {
492 IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ ); 482 pr_debug("%s(), IrLPT device\n", __func__);
493 self->service_type = IRCOMM_3_WIRE_RAW; 483 self->service_type = IRCOMM_3_WIRE_RAW;
494 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ 484 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
495 } 485 }
@@ -500,9 +490,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
500 490
501 ret = ircomm_tty_block_til_ready(self, tty, filp); 491 ret = ircomm_tty_block_til_ready(self, tty, filp);
502 if (ret) { 492 if (ret) {
503 IRDA_DEBUG(2, 493 pr_debug("%s(), returning after block_til_ready with %d\n",
504 "%s(), returning after block_til_ready with %d\n", __func__ , 494 __func__, ret);
505 ret);
506 495
507 return ret; 496 return ret;
508 } 497 }
@@ -520,8 +509,6 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
520 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 509 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
521 struct tty_port *port = &self->port; 510 struct tty_port *port = &self->port;
522 511
523 IRDA_DEBUG(0, "%s()\n", __func__ );
524
525 IRDA_ASSERT(self != NULL, return;); 512 IRDA_ASSERT(self != NULL, return;);
526 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 513 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
527 514
@@ -571,8 +558,6 @@ static void ircomm_tty_do_softint(struct work_struct *work)
571 unsigned long flags; 558 unsigned long flags;
572 struct sk_buff *skb, *ctrl_skb; 559 struct sk_buff *skb, *ctrl_skb;
573 560
574 IRDA_DEBUG(2, "%s()\n", __func__ );
575
576 if (!self || self->magic != IRCOMM_TTY_MAGIC) 561 if (!self || self->magic != IRCOMM_TTY_MAGIC)
577 return; 562 return;
578 563
@@ -638,8 +623,8 @@ static int ircomm_tty_write(struct tty_struct *tty,
638 int len = 0; 623 int len = 0;
639 int size; 624 int size;
640 625
641 IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count, 626 pr_debug("%s(), count=%d, hw_stopped=%d\n", __func__ , count,
642 tty->hw_stopped); 627 tty->hw_stopped);
643 628
644 IRDA_ASSERT(self != NULL, return -1;); 629 IRDA_ASSERT(self != NULL, return -1;);
645 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 630 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
@@ -661,7 +646,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
661 * we don't mess up the original "safe skb" (see tx_data_size). 646 * we don't mess up the original "safe skb" (see tx_data_size).
662 * Jean II */ 647 * Jean II */
663 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { 648 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) {
664 IRDA_DEBUG(1, "%s() : not initialised\n", __func__); 649 pr_debug("%s() : not initialised\n", __func__);
665#ifdef IRCOMM_NO_TX_BEFORE_INIT 650#ifdef IRCOMM_NO_TX_BEFORE_INIT
666 /* We didn't consume anything, TTY will retry */ 651 /* We didn't consume anything, TTY will retry */
667 return 0; 652 return 0;
@@ -790,7 +775,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
790 ret = self->max_data_size; 775 ret = self->max_data_size;
791 spin_unlock_irqrestore(&self->spinlock, flags); 776 spin_unlock_irqrestore(&self->spinlock, flags);
792 } 777 }
793 IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret); 778 pr_debug("%s(), ret=%d\n", __func__ , ret);
794 779
795 return ret; 780 return ret;
796} 781}
@@ -807,8 +792,6 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
807 unsigned long orig_jiffies, poll_time; 792 unsigned long orig_jiffies, poll_time;
808 unsigned long flags; 793 unsigned long flags;
809 794
810 IRDA_DEBUG(2, "%s()\n", __func__ );
811
812 IRDA_ASSERT(self != NULL, return;); 795 IRDA_ASSERT(self != NULL, return;);
813 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 796 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
814 797
@@ -842,8 +825,6 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
842{ 825{
843 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 826 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
844 827
845 IRDA_DEBUG(2, "%s()\n", __func__ );
846
847 IRDA_ASSERT(self != NULL, return;); 828 IRDA_ASSERT(self != NULL, return;);
848 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 829 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
849 830
@@ -873,8 +854,6 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
873{ 854{
874 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 855 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
875 856
876 IRDA_DEBUG(2, "%s()\n", __func__ );
877
878 IRDA_ASSERT(self != NULL, return;); 857 IRDA_ASSERT(self != NULL, return;);
879 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 858 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
880 859
@@ -888,7 +867,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
888 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); 867 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
889 868
890 ircomm_param_request(self, IRCOMM_DTE, TRUE); 869 ircomm_param_request(self, IRCOMM_DTE, TRUE);
891 IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ ); 870 pr_debug("%s(), FLOW_START\n", __func__);
892 } 871 }
893 ircomm_flow_request(self->ircomm, FLOW_START); 872 ircomm_flow_request(self->ircomm, FLOW_START);
894} 873}
@@ -925,8 +904,6 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
925 IRDA_ASSERT(self != NULL, return;); 904 IRDA_ASSERT(self != NULL, return;);
926 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 905 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
927 906
928 IRDA_DEBUG(0, "%s()\n", __func__ );
929
930 if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags)) 907 if (!test_and_clear_bit(ASYNCB_INITIALIZED, &self->port.flags))
931 return; 908 return;
932 909
@@ -969,8 +946,6 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
969 struct tty_port *port = &self->port; 946 struct tty_port *port = &self->port;
970 unsigned long flags; 947 unsigned long flags;
971 948
972 IRDA_DEBUG(0, "%s()\n", __func__ );
973
974 IRDA_ASSERT(self != NULL, return;); 949 IRDA_ASSERT(self != NULL, return;);
975 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 950 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
976 951
@@ -998,7 +973,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
998 */ 973 */
999static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) 974static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
1000{ 975{
1001 IRDA_DEBUG(0, "%s(), not impl\n", __func__ ); 976 pr_debug("%s(), not impl\n", __func__);
1002} 977}
1003 978
1004/* 979/*
@@ -1042,8 +1017,6 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1042 struct tty_struct *tty; 1017 struct tty_struct *tty;
1043 int status; 1018 int status;
1044 1019
1045 IRDA_DEBUG(0, "%s()\n", __func__ );
1046
1047 IRDA_ASSERT(self != NULL, return;); 1020 IRDA_ASSERT(self != NULL, return;);
1048 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 1021 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
1049 1022
@@ -1055,15 +1028,13 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1055 /*wake_up_interruptible(&self->delta_msr_wait);*/ 1028 /*wake_up_interruptible(&self->delta_msr_wait);*/
1056 } 1029 }
1057 if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { 1030 if ((self->port.flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
1058 IRDA_DEBUG(2, 1031 pr_debug("%s(), ircomm%d CD now %s...\n", __func__ , self->line,
1059 "%s(), ircomm%d CD now %s...\n", __func__ , self->line, 1032 (status & IRCOMM_CD) ? "on" : "off");
1060 (status & IRCOMM_CD) ? "on" : "off");
1061 1033
1062 if (status & IRCOMM_CD) { 1034 if (status & IRCOMM_CD) {
1063 wake_up_interruptible(&self->port.open_wait); 1035 wake_up_interruptible(&self->port.open_wait);
1064 } else { 1036 } else {
1065 IRDA_DEBUG(2, 1037 pr_debug("%s(), Doing serial hangup..\n", __func__);
1066 "%s(), Doing serial hangup..\n", __func__ );
1067 if (tty) 1038 if (tty)
1068 tty_hangup(tty); 1039 tty_hangup(tty);
1069 1040
@@ -1074,8 +1045,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1074 if (tty && tty_port_cts_enabled(&self->port)) { 1045 if (tty && tty_port_cts_enabled(&self->port)) {
1075 if (tty->hw_stopped) { 1046 if (tty->hw_stopped) {
1076 if (status & IRCOMM_CTS) { 1047 if (status & IRCOMM_CTS) {
1077 IRDA_DEBUG(2, 1048 pr_debug("%s(), CTS tx start...\n", __func__);
1078 "%s(), CTS tx start...\n", __func__ );
1079 tty->hw_stopped = 0; 1049 tty->hw_stopped = 0;
1080 1050
1081 /* Wake up processes blocked on open */ 1051 /* Wake up processes blocked on open */
@@ -1086,8 +1056,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1086 } 1056 }
1087 } else { 1057 } else {
1088 if (!(status & IRCOMM_CTS)) { 1058 if (!(status & IRCOMM_CTS)) {
1089 IRDA_DEBUG(2, 1059 pr_debug("%s(), CTS tx stop...\n", __func__);
1090 "%s(), CTS tx stop...\n", __func__ );
1091 tty->hw_stopped = 1; 1060 tty->hw_stopped = 1;
1092 } 1061 }
1093 } 1062 }
@@ -1108,15 +1077,13 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1108 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1077 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1109 struct tty_struct *tty; 1078 struct tty_struct *tty;
1110 1079
1111 IRDA_DEBUG(2, "%s()\n", __func__ );
1112
1113 IRDA_ASSERT(self != NULL, return -1;); 1080 IRDA_ASSERT(self != NULL, return -1;);
1114 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1081 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
1115 IRDA_ASSERT(skb != NULL, return -1;); 1082 IRDA_ASSERT(skb != NULL, return -1;);
1116 1083
1117 tty = tty_port_tty_get(&self->port); 1084 tty = tty_port_tty_get(&self->port);
1118 if (!tty) { 1085 if (!tty) {
1119 IRDA_DEBUG(0, "%s(), no tty!\n", __func__ ); 1086 pr_debug("%s(), no tty!\n", __func__);
1120 return 0; 1087 return 0;
1121 } 1088 }
1122 1089
@@ -1127,7 +1094,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1127 * params, we can just as well declare the hardware for running. 1094 * params, we can just as well declare the hardware for running.
1128 */ 1095 */
1129 if (tty->hw_stopped && (self->flow == FLOW_START)) { 1096 if (tty->hw_stopped && (self->flow == FLOW_START)) {
1130 IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ ); 1097 pr_debug("%s(), polling for line settings!\n", __func__);
1131 ircomm_param_request(self, IRCOMM_POLL, TRUE); 1098 ircomm_param_request(self, IRCOMM_POLL, TRUE);
1132 1099
1133 /* We can just as well declare the hardware for running */ 1100 /* We can just as well declare the hardware for running */
@@ -1160,8 +1127,6 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
1160 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1127 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1161 int clen; 1128 int clen;
1162 1129
1163 IRDA_DEBUG(4, "%s()\n", __func__ );
1164
1165 IRDA_ASSERT(self != NULL, return -1;); 1130 IRDA_ASSERT(self != NULL, return -1;);
1166 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1131 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
1167 IRDA_ASSERT(skb != NULL, return -1;); 1132 IRDA_ASSERT(skb != NULL, return -1;);
@@ -1196,7 +1161,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1196 1161
1197 switch (cmd) { 1162 switch (cmd) {
1198 case FLOW_START: 1163 case FLOW_START:
1199 IRDA_DEBUG(2, "%s(), hw start!\n", __func__ ); 1164 pr_debug("%s(), hw start!\n", __func__);
1200 if (tty) 1165 if (tty)
1201 tty->hw_stopped = 0; 1166 tty->hw_stopped = 0;
1202 1167
@@ -1205,7 +1170,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1205 break; 1170 break;
1206 default: /* If we get here, something is very wrong, better stop */ 1171 default: /* If we get here, something is very wrong, better stop */
1207 case FLOW_STOP: 1172 case FLOW_STOP:
1208 IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ ); 1173 pr_debug("%s(), hw stopped!\n", __func__);
1209 if (tty) 1174 if (tty)
1210 tty->hw_stopped = 1; 1175 tty->hw_stopped = 1;
1211 break; 1176 break;
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
index 211904419f68..549ca143f0a9 100644
--- a/net/irda/ircomm/ircomm_tty_attach.c
+++ b/net/irda/ircomm/ircomm_tty_attach.c
@@ -130,14 +130,12 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
130{ 130{
131 struct tty_struct *tty; 131 struct tty_struct *tty;
132 132
133 IRDA_DEBUG(0, "%s()\n", __func__ );
134
135 IRDA_ASSERT(self != NULL, return -1;); 133 IRDA_ASSERT(self != NULL, return -1;);
136 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 134 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
137 135
138 /* Check if somebody has already connected to us */ 136 /* Check if somebody has already connected to us */
139 if (ircomm_is_connected(self->ircomm)) { 137 if (ircomm_is_connected(self->ircomm)) {
140 IRDA_DEBUG(0, "%s(), already connected!\n", __func__ ); 138 pr_debug("%s(), already connected!\n", __func__);
141 return 0; 139 return 0;
142 } 140 }
143 141
@@ -163,8 +161,6 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
163 */ 161 */
164void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) 162void ircomm_tty_detach_cable(struct ircomm_tty_cb *self)
165{ 163{
166 IRDA_DEBUG(0, "%s()\n", __func__ );
167
168 IRDA_ASSERT(self != NULL, return;); 164 IRDA_ASSERT(self != NULL, return;);
169 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 165 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
170 166
@@ -212,8 +208,6 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self)
212 __u8 oct_seq[6]; 208 __u8 oct_seq[6];
213 __u16 hints; 209 __u16 hints;
214 210
215 IRDA_DEBUG(0, "%s()\n", __func__ );
216
217 IRDA_ASSERT(self != NULL, return;); 211 IRDA_ASSERT(self != NULL, return;);
218 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 212 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
219 213
@@ -313,17 +307,17 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self)
313 * Set default values, but only if the application for some reason 307 * Set default values, but only if the application for some reason
314 * haven't set them already 308 * haven't set them already
315 */ 309 */
316 IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ , 310 pr_debug("%s(), data-rate = %d\n", __func__ ,
317 self->settings.data_rate); 311 self->settings.data_rate);
318 if (!self->settings.data_rate) 312 if (!self->settings.data_rate)
319 self->settings.data_rate = 9600; 313 self->settings.data_rate = 9600;
320 IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ , 314 pr_debug("%s(), data-format = %d\n", __func__ ,
321 self->settings.data_format); 315 self->settings.data_format);
322 if (!self->settings.data_format) 316 if (!self->settings.data_format)
323 self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ 317 self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */
324 318
325 IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ , 319 pr_debug("%s(), flow-control = %d\n", __func__ ,
326 self->settings.flow_control); 320 self->settings.flow_control);
327 /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ 321 /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/
328 322
329 /* Do not set delta values for the initial parameters */ 323 /* Do not set delta values for the initial parameters */
@@ -367,8 +361,6 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery,
367 struct ircomm_tty_cb *self; 361 struct ircomm_tty_cb *self;
368 struct ircomm_tty_info info; 362 struct ircomm_tty_info info;
369 363
370 IRDA_DEBUG(2, "%s()\n", __func__ );
371
372 /* Important note : 364 /* Important note :
373 * We need to drop all passive discoveries. 365 * We need to drop all passive discoveries.
374 * The LSAP management of IrComm is deficient and doesn't deal 366 * The LSAP management of IrComm is deficient and doesn't deal
@@ -404,8 +396,6 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap,
404 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 396 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
405 struct tty_struct *tty; 397 struct tty_struct *tty;
406 398
407 IRDA_DEBUG(2, "%s()\n", __func__ );
408
409 IRDA_ASSERT(self != NULL, return;); 399 IRDA_ASSERT(self != NULL, return;);
410 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 400 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
411 401
@@ -436,8 +426,6 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
436{ 426{
437 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; 427 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv;
438 428
439 IRDA_DEBUG(2, "%s()\n", __func__ );
440
441 IRDA_ASSERT(self != NULL, return;); 429 IRDA_ASSERT(self != NULL, return;);
442 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 430 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
443 431
@@ -447,13 +435,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
447 435
448 /* Check if request succeeded */ 436 /* Check if request succeeded */
449 if (result != IAS_SUCCESS) { 437 if (result != IAS_SUCCESS) {
450 IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ ); 438 pr_debug("%s(), got NULL value!\n", __func__);
451 return; 439 return;
452 } 440 }
453 441
454 switch (value->type) { 442 switch (value->type) {
455 case IAS_OCT_SEQ: 443 case IAS_OCT_SEQ:
456 IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ ); 444 pr_debug("%s(), got octet sequence\n", __func__);
457 445
458 irda_param_extract_all(self, value->t.oct_seq, value->len, 446 irda_param_extract_all(self, value->t.oct_seq, value->len,
459 &ircomm_param_info); 447 &ircomm_param_info);
@@ -463,21 +451,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
463 break; 451 break;
464 case IAS_INTEGER: 452 case IAS_INTEGER:
465 /* Got LSAP selector */ 453 /* Got LSAP selector */
466 IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ , 454 pr_debug("%s(), got lsapsel = %d\n", __func__ ,
467 value->t.integer); 455 value->t.integer);
468 456
469 if (value->t.integer == -1) { 457 if (value->t.integer == -1) {
470 IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ ); 458 pr_debug("%s(), invalid value!\n", __func__);
471 } else 459 } else
472 self->dlsap_sel = value->t.integer; 460 self->dlsap_sel = value->t.integer;
473 461
474 ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); 462 ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL);
475 break; 463 break;
476 case IAS_MISSING: 464 case IAS_MISSING:
477 IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ ); 465 pr_debug("%s(), got IAS_MISSING\n", __func__);
478 break; 466 break;
479 default: 467 default:
480 IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ ); 468 pr_debug("%s(), got unknown type!\n", __func__);
481 break; 469 break;
482 } 470 }
483 irias_delete_value(value); 471 irias_delete_value(value);
@@ -497,8 +485,6 @@ void ircomm_tty_connect_confirm(void *instance, void *sap,
497{ 485{
498 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 486 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
499 487
500 IRDA_DEBUG(2, "%s()\n", __func__ );
501
502 IRDA_ASSERT(self != NULL, return;); 488 IRDA_ASSERT(self != NULL, return;);
503 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 489 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
504 490
@@ -528,8 +514,6 @@ void ircomm_tty_connect_indication(void *instance, void *sap,
528 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 514 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
529 int clen; 515 int clen;
530 516
531 IRDA_DEBUG(2, "%s()\n", __func__ );
532
533 IRDA_ASSERT(self != NULL, return;); 517 IRDA_ASSERT(self != NULL, return;);
534 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 518 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
535 519
@@ -559,8 +543,6 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
559{ 543{
560 struct tty_struct *tty; 544 struct tty_struct *tty;
561 545
562 IRDA_DEBUG(2, "%s()\n", __func__ );
563
564 IRDA_ASSERT(self != NULL, return;); 546 IRDA_ASSERT(self != NULL, return;);
565 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 547 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
566 548
@@ -578,10 +560,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self)
578 */ 560 */
579 if (tty_port_cts_enabled(&self->port) && 561 if (tty_port_cts_enabled(&self->port) &&
580 ((self->settings.dce & IRCOMM_CTS) == 0)) { 562 ((self->settings.dce & IRCOMM_CTS) == 0)) {
581 IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ ); 563 pr_debug("%s(), waiting for CTS ...\n", __func__);
582 goto put; 564 goto put;
583 } else { 565 } else {
584 IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ ); 566 pr_debug("%s(), starting hardware!\n", __func__);
585 567
586 tty->hw_stopped = 0; 568 tty->hw_stopped = 0;
587 569
@@ -621,8 +603,6 @@ static void ircomm_tty_watchdog_timer_expired(void *data)
621{ 603{
622 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; 604 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data;
623 605
624 IRDA_DEBUG(2, "%s()\n", __func__ );
625
626 IRDA_ASSERT(self != NULL, return;); 606 IRDA_ASSERT(self != NULL, return;);
627 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 607 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
628 608
@@ -642,8 +622,8 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event,
642 IRDA_ASSERT(self != NULL, return -1;); 622 IRDA_ASSERT(self != NULL, return -1;);
643 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 623 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
644 624
645 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 625 pr_debug("%s: state=%s, event=%s\n", __func__ ,
646 ircomm_tty_state[self->state], ircomm_tty_event[event]); 626 ircomm_tty_state[self->state], ircomm_tty_event[event]);
647 627
648 return (*state[self->state])(self, event, skb, info); 628 return (*state[self->state])(self, event, skb, info);
649} 629}
@@ -660,8 +640,8 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_
660 IRDA_ASSERT(self != NULL, return;); 640 IRDA_ASSERT(self != NULL, return;);
661 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 641 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
662 642
663 IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ , 643 pr_debug("%s: next state=%s, service type=%d\n", __func__ ,
664 ircomm_tty_state[self->state], self->service_type); 644 ircomm_tty_state[self->state], self->service_type);
665 */ 645 */
666 self->state = state; 646 self->state = state;
667} 647}
@@ -679,8 +659,8 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
679{ 659{
680 int ret = 0; 660 int ret = 0;
681 661
682 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 662 pr_debug("%s: state=%s, event=%s\n", __func__ ,
683 ircomm_tty_state[self->state], ircomm_tty_event[event]); 663 ircomm_tty_state[self->state], ircomm_tty_event[event]);
684 switch (event) { 664 switch (event) {
685 case IRCOMM_TTY_ATTACH_CABLE: 665 case IRCOMM_TTY_ATTACH_CABLE:
686 /* Try to discover any remote devices */ 666 /* Try to discover any remote devices */
@@ -723,8 +703,8 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
723 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 703 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
724 break; 704 break;
725 default: 705 default:
726 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 706 pr_debug("%s(), unknown event: %s\n", __func__ ,
727 ircomm_tty_event[event]); 707 ircomm_tty_event[event]);
728 ret = -EINVAL; 708 ret = -EINVAL;
729 } 709 }
730 return ret; 710 return ret;
@@ -743,8 +723,8 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
743{ 723{
744 int ret = 0; 724 int ret = 0;
745 725
746 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 726 pr_debug("%s: state=%s, event=%s\n", __func__ ,
747 ircomm_tty_state[self->state], ircomm_tty_event[event]); 727 ircomm_tty_state[self->state], ircomm_tty_event[event]);
748 728
749 switch (event) { 729 switch (event) {
750 case IRCOMM_TTY_DISCOVERY_INDICATION: 730 case IRCOMM_TTY_DISCOVERY_INDICATION:
@@ -796,8 +776,8 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
796 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 776 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
797 break; 777 break;
798 default: 778 default:
799 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 779 pr_debug("%s(), unknown event: %s\n", __func__ ,
800 ircomm_tty_event[event]); 780 ircomm_tty_event[event]);
801 ret = -EINVAL; 781 ret = -EINVAL;
802 } 782 }
803 return ret; 783 return ret;
@@ -816,8 +796,8 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
816{ 796{
817 int ret = 0; 797 int ret = 0;
818 798
819 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 799 pr_debug("%s: state=%s, event=%s\n", __func__ ,
820 ircomm_tty_state[self->state], ircomm_tty_event[event]); 800 ircomm_tty_state[self->state], ircomm_tty_event[event]);
821 801
822 switch (event) { 802 switch (event) {
823 case IRCOMM_TTY_GOT_PARAMETERS: 803 case IRCOMM_TTY_GOT_PARAMETERS:
@@ -854,8 +834,8 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
854 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 834 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
855 break; 835 break;
856 default: 836 default:
857 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 837 pr_debug("%s(), unknown event: %s\n", __func__ ,
858 ircomm_tty_event[event]); 838 ircomm_tty_event[event]);
859 ret = -EINVAL; 839 ret = -EINVAL;
860 } 840 }
861 return ret; 841 return ret;
@@ -874,8 +854,8 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
874{ 854{
875 int ret = 0; 855 int ret = 0;
876 856
877 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 857 pr_debug("%s: state=%s, event=%s\n", __func__ ,
878 ircomm_tty_state[self->state], ircomm_tty_event[event]); 858 ircomm_tty_state[self->state], ircomm_tty_event[event]);
879 859
880 switch (event) { 860 switch (event) {
881 case IRCOMM_TTY_GOT_LSAPSEL: 861 case IRCOMM_TTY_GOT_LSAPSEL:
@@ -903,8 +883,8 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self,
903 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 883 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
904 break; 884 break;
905 default: 885 default:
906 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 886 pr_debug("%s(), unknown event: %s\n", __func__ ,
907 ircomm_tty_event[event]); 887 ircomm_tty_event[event]);
908 ret = -EINVAL; 888 ret = -EINVAL;
909 } 889 }
910 return ret; 890 return ret;
@@ -923,8 +903,8 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
923{ 903{
924 int ret = 0; 904 int ret = 0;
925 905
926 IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , 906 pr_debug("%s: state=%s, event=%s\n", __func__ ,
927 ircomm_tty_state[self->state], ircomm_tty_event[event]); 907 ircomm_tty_state[self->state], ircomm_tty_event[event]);
928 908
929 switch (event) { 909 switch (event) {
930 case IRCOMM_TTY_CONNECT_CONFIRM: 910 case IRCOMM_TTY_CONNECT_CONFIRM:
@@ -957,8 +937,8 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self,
957 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); 937 ircomm_tty_next_state(self, IRCOMM_TTY_IDLE);
958 break; 938 break;
959 default: 939 default:
960 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 940 pr_debug("%s(), unknown event: %s\n", __func__ ,
961 ircomm_tty_event[event]); 941 ircomm_tty_event[event]);
962 ret = -EINVAL; 942 ret = -EINVAL;
963 } 943 }
964 return ret; 944 return ret;
@@ -995,13 +975,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self,
995 self->settings.dce = IRCOMM_DELTA_CD; 975 self->settings.dce = IRCOMM_DELTA_CD;
996 ircomm_tty_check_modem_status(self); 976 ircomm_tty_check_modem_status(self);
997 } else { 977 } else {
998 IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ ); 978 pr_debug("%s(), hanging up!\n", __func__);
999 tty_port_tty_hangup(&self->port, false); 979 tty_port_tty_hangup(&self->port, false);
1000 } 980 }
1001 break; 981 break;
1002 default: 982 default:
1003 IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , 983 pr_debug("%s(), unknown event: %s\n", __func__ ,
1004 ircomm_tty_event[event]); 984 ircomm_tty_event[event]);
1005 ret = -EINVAL; 985 ret = -EINVAL;
1006 } 986 }
1007 return ret; 987 return ret;
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index 7eb06e08f8ed..75ccdbd0728e 100644
--- a/net/irda/ircomm/ircomm_tty_ioctl.c
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c
@@ -56,8 +56,6 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self,
56 unsigned int cflag, cval; 56 unsigned int cflag, cval;
57 int baud; 57 int baud;
58 58
59 IRDA_DEBUG(2, "%s()\n", __func__ );
60
61 if (!self->ircomm) 59 if (!self->ircomm)
62 return; 60 return;
63 61
@@ -150,8 +148,6 @@ void ircomm_tty_set_termios(struct tty_struct *tty,
150 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 148 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
151 unsigned int cflag = tty->termios.c_cflag; 149 unsigned int cflag = tty->termios.c_cflag;
152 150
153 IRDA_DEBUG(2, "%s()\n", __func__ );
154
155 if ((cflag == old_termios->c_cflag) && 151 if ((cflag == old_termios->c_cflag) &&
156 (RELEVANT_IFLAG(tty->termios.c_iflag) == 152 (RELEVANT_IFLAG(tty->termios.c_iflag) ==
157 RELEVANT_IFLAG(old_termios->c_iflag))) 153 RELEVANT_IFLAG(old_termios->c_iflag)))
@@ -199,8 +195,6 @@ int ircomm_tty_tiocmget(struct tty_struct *tty)
199 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 195 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
200 unsigned int result; 196 unsigned int result;
201 197
202 IRDA_DEBUG(2, "%s()\n", __func__ );
203
204 if (tty->flags & (1 << TTY_IO_ERROR)) 198 if (tty->flags & (1 << TTY_IO_ERROR))
205 return -EIO; 199 return -EIO;
206 200
@@ -224,8 +218,6 @@ int ircomm_tty_tiocmset(struct tty_struct *tty,
224{ 218{
225 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 219 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
226 220
227 IRDA_DEBUG(2, "%s()\n", __func__ );
228
229 if (tty->flags & (1 << TTY_IO_ERROR)) 221 if (tty->flags & (1 << TTY_IO_ERROR))
230 return -EIO; 222 return -EIO;
231 223
@@ -266,8 +258,6 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
266 if (!retinfo) 258 if (!retinfo)
267 return -EFAULT; 259 return -EFAULT;
268 260
269 IRDA_DEBUG(2, "%s()\n", __func__ );
270
271 memset(&info, 0, sizeof(info)); 261 memset(&info, 0, sizeof(info));
272 info.line = self->line; 262 info.line = self->line;
273 info.flags = self->port.flags; 263 info.flags = self->port.flags;
@@ -302,8 +292,6 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self,
302 struct serial_struct new_serial; 292 struct serial_struct new_serial;
303 struct ircomm_tty_cb old_state, *state; 293 struct ircomm_tty_cb old_state, *state;
304 294
305 IRDA_DEBUG(0, "%s()\n", __func__ );
306
307 if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) 295 if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
308 return -EFAULT; 296 return -EFAULT;
309 297
@@ -376,8 +364,6 @@ int ircomm_tty_ioctl(struct tty_struct *tty,
376 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 364 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
377 int ret = 0; 365 int ret = 0;
378 366
379 IRDA_DEBUG(2, "%s()\n", __func__ );
380
381 if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && 367 if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
382 (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && 368 (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
383 (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { 369 (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
@@ -393,11 +379,11 @@ int ircomm_tty_ioctl(struct tty_struct *tty,
393 ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg); 379 ret = ircomm_tty_set_serial_info(self, (struct serial_struct __user *) arg);
394 break; 380 break;
395 case TIOCMIWAIT: 381 case TIOCMIWAIT:
396 IRDA_DEBUG(0, "(), TIOCMIWAIT, not impl!\n"); 382 pr_debug("(), TIOCMIWAIT, not impl!\n");
397 break; 383 break;
398 384
399 case TIOCGICOUNT: 385 case TIOCGICOUNT:
400 IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ ); 386 pr_debug("%s(), TIOCGICOUNT not impl!\n", __func__);
401#if 0 387#if 0
402 save_flags(flags); cli(); 388 save_flags(flags); cli();
403 cnow = driver->icount; 389 cnow = driver->icount;
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index 96788db1dc31..856736656a30 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -90,8 +90,6 @@ static void leftover_dongle(void *arg)
90 90
91void irda_device_cleanup(void) 91void irda_device_cleanup(void)
92{ 92{
93 IRDA_DEBUG(4, "%s()\n", __func__);
94
95 hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); 93 hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
96 94
97 hashbin_delete(dongles, leftover_dongle); 95 hashbin_delete(dongles, leftover_dongle);
@@ -107,7 +105,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
107{ 105{
108 struct irlap_cb *self; 106 struct irlap_cb *self;
109 107
110 IRDA_DEBUG(4, "%s(%s)\n", __func__, status ? "TRUE" : "FALSE"); 108 pr_debug("%s(%s)\n", __func__, status ? "TRUE" : "FALSE");
111 109
112 self = (struct irlap_cb *) dev->atalk_ptr; 110 self = (struct irlap_cb *) dev->atalk_ptr;
113 111
@@ -127,7 +125,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
127 irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT); 125 irlap_start_mbusy_timer(self, SMALLBUSY_TIMEOUT);
128 else 126 else
129 irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT); 127 irlap_start_mbusy_timer(self, MEDIABUSY_TIMEOUT);
130 IRDA_DEBUG( 4, "Media busy!\n"); 128 pr_debug("Media busy!\n");
131 } else { 129 } else {
132 self->media_busy = FALSE; 130 self->media_busy = FALSE;
133 irlap_stop_mbusy_timer(self); 131 irlap_stop_mbusy_timer(self);
@@ -147,8 +145,6 @@ int irda_device_is_receiving(struct net_device *dev)
147 struct if_irda_req req; 145 struct if_irda_req req;
148 int ret; 146 int ret;
149 147
150 IRDA_DEBUG(2, "%s()\n", __func__);
151
152 if (!dev->netdev_ops->ndo_do_ioctl) { 148 if (!dev->netdev_ops->ndo_do_ioctl) {
153 net_err_ratelimited("%s: do_ioctl not impl. by device driver\n", 149 net_err_ratelimited("%s: do_ioctl not impl. by device driver\n",
154 __func__); 150 __func__);
@@ -192,8 +188,6 @@ static int irda_task_kick(struct irda_task *task)
192 int count = 0; 188 int count = 0;
193 int timeout; 189 int timeout;
194 190
195 IRDA_DEBUG(2, "%s()\n", __func__);
196
197 IRDA_ASSERT(task != NULL, return -1;); 191 IRDA_ASSERT(task != NULL, return -1;);
198 IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); 192 IRDA_ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
199 193
@@ -241,8 +235,8 @@ static int irda_task_kick(struct irda_task *task)
241 irda_task_timer_expired); 235 irda_task_timer_expired);
242 finished = FALSE; 236 finished = FALSE;
243 } else { 237 } else {
244 IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n", 238 pr_debug("%s(), not finished, and no timeout!\n",
245 __func__); 239 __func__);
246 finished = FALSE; 240 finished = FALSE;
247 } 241 }
248 242
@@ -259,8 +253,6 @@ static void irda_task_timer_expired(void *data)
259{ 253{
260 struct irda_task *task; 254 struct irda_task *task;
261 255
262 IRDA_DEBUG(2, "%s()\n", __func__);
263
264 task = data; 256 task = data;
265 257
266 irda_task_kick(task); 258 irda_task_kick(task);
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index c2ea3443f669..7a93cdd1ac31 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -145,7 +145,7 @@ int __init iriap_init(void)
145 */ 145 */
146 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 146 server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
147 if (!server) { 147 if (!server) {
148 IRDA_DEBUG(0, "%s(), unable to open server\n", __func__); 148 pr_debug("%s(), unable to open server\n", __func__);
149 return -1; 149 return -1;
150 } 150 }
151 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); 151 iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
@@ -177,8 +177,6 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
177{ 177{
178 struct iriap_cb *self; 178 struct iriap_cb *self;
179 179
180 IRDA_DEBUG(2, "%s()\n", __func__);
181
182 self = kzalloc(sizeof(*self), GFP_ATOMIC); 180 self = kzalloc(sizeof(*self), GFP_ATOMIC);
183 if (!self) 181 if (!self)
184 return NULL; 182 return NULL;
@@ -221,8 +219,6 @@ EXPORT_SYMBOL(iriap_open);
221 */ 219 */
222static void __iriap_close(struct iriap_cb *self) 220static void __iriap_close(struct iriap_cb *self)
223{ 221{
224 IRDA_DEBUG(4, "%s()\n", __func__);
225
226 IRDA_ASSERT(self != NULL, return;); 222 IRDA_ASSERT(self != NULL, return;);
227 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 223 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
228 224
@@ -245,8 +241,6 @@ void iriap_close(struct iriap_cb *self)
245{ 241{
246 struct iriap_cb *entry; 242 struct iriap_cb *entry;
247 243
248 IRDA_DEBUG(2, "%s()\n", __func__);
249
250 IRDA_ASSERT(self != NULL, return;); 244 IRDA_ASSERT(self != NULL, return;);
251 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 245 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
252 246
@@ -266,8 +260,6 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
266{ 260{
267 notify_t notify; 261 notify_t notify;
268 262
269 IRDA_DEBUG(2, "%s()\n", __func__);
270
271 irda_notify_init(&notify); 263 irda_notify_init(&notify);
272 notify.connect_confirm = iriap_connect_confirm; 264 notify.connect_confirm = iriap_connect_confirm;
273 notify.connect_indication = iriap_connect_indication; 265 notify.connect_indication = iriap_connect_indication;
@@ -302,8 +294,8 @@ static void iriap_disconnect_indication(void *instance, void *sap,
302{ 294{
303 struct iriap_cb *self; 295 struct iriap_cb *self;
304 296
305 IRDA_DEBUG(4, "%s(), reason=%s [%d]\n", __func__, 297 pr_debug("%s(), reason=%s [%d]\n", __func__,
306 irlmp_reason_str(reason), reason); 298 irlmp_reason_str(reason), reason);
307 299
308 self = instance; 300 self = instance;
309 301
@@ -319,7 +311,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
319 dev_kfree_skb(skb); 311 dev_kfree_skb(skb);
320 312
321 if (self->mode == IAS_CLIENT) { 313 if (self->mode == IAS_CLIENT) {
322 IRDA_DEBUG(4, "%s(), disconnect as client\n", __func__); 314 pr_debug("%s(), disconnect as client\n", __func__);
323 315
324 316
325 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, 317 iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
@@ -332,7 +324,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
332 if (self->confirm) 324 if (self->confirm)
333 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 325 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
334 } else { 326 } else {
335 IRDA_DEBUG(4, "%s(), disconnect as server\n", __func__); 327 pr_debug("%s(), disconnect as server\n", __func__);
336 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, 328 iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
337 NULL); 329 NULL);
338 iriap_close(self); 330 iriap_close(self);
@@ -346,16 +338,13 @@ static void iriap_disconnect_request(struct iriap_cb *self)
346{ 338{
347 struct sk_buff *tx_skb; 339 struct sk_buff *tx_skb;
348 340
349 IRDA_DEBUG(4, "%s()\n", __func__);
350
351 IRDA_ASSERT(self != NULL, return;); 341 IRDA_ASSERT(self != NULL, return;);
352 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 342 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
353 343
354 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 344 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
355 if (tx_skb == NULL) { 345 if (tx_skb == NULL) {
356 IRDA_DEBUG(0, 346 pr_debug("%s(), Could not allocate an sk_buff of length %d\n",
357 "%s(), Could not allocate an sk_buff of length %d\n", 347 __func__, LMP_MAX_HEADER);
358 __func__, LMP_MAX_HEADER);
359 return; 348 return;
360 } 349 }
361 350
@@ -460,14 +449,14 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
460 len = get_unaligned_be16(fp + n); 449 len = get_unaligned_be16(fp + n);
461 n += 2; 450 n += 2;
462 451
463 IRDA_DEBUG(4, "%s(), len=%d\n", __func__, len); 452 pr_debug("%s(), len=%d\n", __func__, len);
464 453
465 /* Get object ID, MSB first */ 454 /* Get object ID, MSB first */
466 obj_id = get_unaligned_be16(fp + n); 455 obj_id = get_unaligned_be16(fp + n);
467 n += 2; 456 n += 2;
468 457
469 type = fp[n++]; 458 type = fp[n++];
470 IRDA_DEBUG(4, "%s(), Value type = %d\n", __func__, type); 459 pr_debug("%s(), Value type = %d\n", __func__, type);
471 460
472 switch (type) { 461 switch (type) {
473 case IAS_INTEGER: 462 case IAS_INTEGER:
@@ -476,7 +465,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
476 value = irias_new_integer_value(tmp_cpu32); 465 value = irias_new_integer_value(tmp_cpu32);
477 466
478 /* Legal values restricted to 0x01-0x6f, page 15 irttp */ 467 /* Legal values restricted to 0x01-0x6f, page 15 irttp */
479 IRDA_DEBUG(4, "%s(), lsap=%d\n", __func__, value->t.integer); 468 pr_debug("%s(), lsap=%d\n", __func__, value->t.integer);
480 break; 469 break;
481 case IAS_STRING: 470 case IAS_STRING:
482 charset = fp[n++]; 471 charset = fp[n++];
@@ -495,11 +484,11 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
495/* case CS_ISO_8859_9: */ 484/* case CS_ISO_8859_9: */
496/* case CS_UNICODE: */ 485/* case CS_UNICODE: */
497 default: 486 default:
498 IRDA_DEBUG(0, "%s(), charset [%d] %s, not supported\n", 487 pr_debug("%s(), charset [%d] %s, not supported\n",
499 __func__, charset, 488 __func__, charset,
500 charset < ARRAY_SIZE(ias_charset_types) ? 489 charset < ARRAY_SIZE(ias_charset_types) ?
501 ias_charset_types[charset] : 490 ias_charset_types[charset] :
502 "(unknown)"); 491 "(unknown)");
503 492
504 /* Aborting, close connection! */ 493 /* Aborting, close connection! */
505 iriap_disconnect_request(self); 494 iriap_disconnect_request(self);
@@ -507,12 +496,12 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
507 /* break; */ 496 /* break; */
508 } 497 }
509 value_len = fp[n++]; 498 value_len = fp[n++];
510 IRDA_DEBUG(4, "%s(), strlen=%d\n", __func__, value_len); 499 pr_debug("%s(), strlen=%d\n", __func__, value_len);
511 500
512 /* Make sure the string is null-terminated */ 501 /* Make sure the string is null-terminated */
513 if (n + value_len < skb->len) 502 if (n + value_len < skb->len)
514 fp[n + value_len] = 0x00; 503 fp[n + value_len] = 0x00;
515 IRDA_DEBUG(4, "Got string %s\n", fp+n); 504 pr_debug("Got string %s\n", fp+n);
516 505
517 /* Will truncate to IAS_MAX_STRING bytes */ 506 /* Will truncate to IAS_MAX_STRING bytes */
518 value = irias_new_string_value(fp+n); 507 value = irias_new_string_value(fp+n);
@@ -538,7 +527,7 @@ static void iriap_getvaluebyclass_confirm(struct iriap_cb *self,
538 if (self->confirm) 527 if (self->confirm)
539 self->confirm(IAS_SUCCESS, obj_id, value, self->priv); 528 self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
540 else { 529 else {
541 IRDA_DEBUG(0, "%s(), missing handler!\n", __func__); 530 pr_debug("%s(), missing handler!\n", __func__);
542 irias_delete_value(value); 531 irias_delete_value(value);
543 } 532 }
544} 533}
@@ -560,8 +549,6 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
560 __be16 tmp_be16; 549 __be16 tmp_be16;
561 __u8 *fp; 550 __u8 *fp;
562 551
563 IRDA_DEBUG(4, "%s()\n", __func__);
564
565 IRDA_ASSERT(self != NULL, return;); 552 IRDA_ASSERT(self != NULL, return;);
566 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 553 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
567 IRDA_ASSERT(value != NULL, return;); 554 IRDA_ASSERT(value != NULL, return;);
@@ -622,12 +609,12 @@ static void iriap_getvaluebyclass_response(struct iriap_cb *self,
622 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; 609 memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
623 break; 610 break;
624 case IAS_MISSING: 611 case IAS_MISSING:
625 IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __func__); 612 pr_debug("%s: sending IAS_MISSING\n", __func__);
626 skb_put(tx_skb, 1); 613 skb_put(tx_skb, 1);
627 fp[n++] = value->type; 614 fp[n++] = value->type;
628 break; 615 break;
629 default: 616 default:
630 IRDA_DEBUG(0, "%s(), type not implemented!\n", __func__); 617 pr_debug("%s(), type not implemented!\n", __func__);
631 break; 618 break;
632 } 619 }
633 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb); 620 iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, tx_skb);
@@ -654,8 +641,6 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
654 __u8 *fp; 641 __u8 *fp;
655 int n; 642 int n;
656 643
657 IRDA_DEBUG(4, "%s()\n", __func__);
658
659 IRDA_ASSERT(self != NULL, return;); 644 IRDA_ASSERT(self != NULL, return;);
660 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 645 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
661 IRDA_ASSERT(skb != NULL, return;); 646 IRDA_ASSERT(skb != NULL, return;);
@@ -677,20 +662,20 @@ static void iriap_getvaluebyclass_indication(struct iriap_cb *self,
677 memcpy(attr, fp+n, attr_len); n+=attr_len; 662 memcpy(attr, fp+n, attr_len); n+=attr_len;
678 attr[attr_len] = '\0'; 663 attr[attr_len] = '\0';
679 664
680 IRDA_DEBUG(4, "LM-IAS: Looking up %s: %s\n", name, attr); 665 pr_debug("LM-IAS: Looking up %s: %s\n", name, attr);
681 obj = irias_find_object(name); 666 obj = irias_find_object(name);
682 667
683 if (obj == NULL) { 668 if (obj == NULL) {
684 IRDA_DEBUG(2, "LM-IAS: Object %s not found\n", name); 669 pr_debug("LM-IAS: Object %s not found\n", name);
685 iriap_getvaluebyclass_response(self, 0x1235, IAS_CLASS_UNKNOWN, 670 iriap_getvaluebyclass_response(self, 0x1235, IAS_CLASS_UNKNOWN,
686 &irias_missing); 671 &irias_missing);
687 return; 672 return;
688 } 673 }
689 IRDA_DEBUG(4, "LM-IAS: found %s, id=%d\n", obj->name, obj->id); 674 pr_debug("LM-IAS: found %s, id=%d\n", obj->name, obj->id);
690 675
691 attrib = irias_find_attrib(obj, attr); 676 attrib = irias_find_attrib(obj, attr);
692 if (attrib == NULL) { 677 if (attrib == NULL) {
693 IRDA_DEBUG(2, "LM-IAS: Attribute %s not found\n", attr); 678 pr_debug("LM-IAS: Attribute %s not found\n", attr);
694 iriap_getvaluebyclass_response(self, obj->id, 679 iriap_getvaluebyclass_response(self, obj->id,
695 IAS_ATTRIB_UNKNOWN, 680 IAS_ATTRIB_UNKNOWN,
696 &irias_missing); 681 &irias_missing);
@@ -713,8 +698,6 @@ void iriap_send_ack(struct iriap_cb *self)
713 struct sk_buff *tx_skb; 698 struct sk_buff *tx_skb;
714 __u8 *frame; 699 __u8 *frame;
715 700
716 IRDA_DEBUG(2, "%s()\n", __func__);
717
718 IRDA_ASSERT(self != NULL, return;); 701 IRDA_ASSERT(self != NULL, return;);
719 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 702 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
720 703
@@ -744,7 +727,7 @@ void iriap_connect_request(struct iriap_cb *self)
744 self->saddr, self->daddr, 727 self->saddr, self->daddr,
745 NULL, NULL); 728 NULL, NULL);
746 if (ret < 0) { 729 if (ret < 0) {
747 IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); 730 pr_debug("%s(), connect failed!\n", __func__);
748 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); 731 self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
749 } 732 }
750} 733}
@@ -792,8 +775,6 @@ static void iriap_connect_indication(void *instance, void *sap,
792{ 775{
793 struct iriap_cb *self, *new; 776 struct iriap_cb *self, *new;
794 777
795 IRDA_DEBUG(1, "%s()\n", __func__);
796
797 self = instance; 778 self = instance;
798 779
799 IRDA_ASSERT(skb != NULL, return;); 780 IRDA_ASSERT(skb != NULL, return;);
@@ -803,14 +784,14 @@ static void iriap_connect_indication(void *instance, void *sap,
803 /* Start new server */ 784 /* Start new server */
804 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); 785 new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
805 if (!new) { 786 if (!new) {
806 IRDA_DEBUG(0, "%s(), open failed\n", __func__); 787 pr_debug("%s(), open failed\n", __func__);
807 goto out; 788 goto out;
808 } 789 }
809 790
810 /* Now attach up the new "socket" */ 791 /* Now attach up the new "socket" */
811 new->lsap = irlmp_dup(self->lsap, new); 792 new->lsap = irlmp_dup(self->lsap, new);
812 if (!new->lsap) { 793 if (!new->lsap) {
813 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); 794 pr_debug("%s(), dup failed!\n", __func__);
814 goto out; 795 goto out;
815 } 796 }
816 797
@@ -840,8 +821,6 @@ static int iriap_data_indication(void *instance, void *sap,
840 __u8 *frame; 821 __u8 *frame;
841 __u8 opcode; 822 __u8 opcode;
842 823
843 IRDA_DEBUG(3, "%s()\n", __func__);
844
845 self = instance; 824 self = instance;
846 825
847 IRDA_ASSERT(skb != NULL, return 0;); 826 IRDA_ASSERT(skb != NULL, return 0;);
@@ -852,7 +831,7 @@ static int iriap_data_indication(void *instance, void *sap,
852 831
853 if (self->mode == IAS_SERVER) { 832 if (self->mode == IAS_SERVER) {
854 /* Call server */ 833 /* Call server */
855 IRDA_DEBUG(4, "%s(), Calling server!\n", __func__); 834 pr_debug("%s(), Calling server!\n", __func__);
856 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); 835 iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
857 goto out; 836 goto out;
858 } 837 }
@@ -865,7 +844,7 @@ static int iriap_data_indication(void *instance, void *sap,
865 844
866 /* Check for ack frames since they don't contain any data */ 845 /* Check for ack frames since they don't contain any data */
867 if (opcode & IAP_ACK) { 846 if (opcode & IAP_ACK) {
868 IRDA_DEBUG(0, "%s() Got ack frame!\n", __func__); 847 pr_debug("%s() Got ack frame!\n", __func__);
869 goto out; 848 goto out;
870 } 849 }
871 850
@@ -873,7 +852,7 @@ static int iriap_data_indication(void *instance, void *sap,
873 852
874 switch (opcode) { 853 switch (opcode) {
875 case GET_INFO_BASE: 854 case GET_INFO_BASE:
876 IRDA_DEBUG(0, "IrLMP GetInfoBaseDetails not implemented!\n"); 855 pr_debug("IrLMP GetInfoBaseDetails not implemented!\n");
877 break; 856 break;
878 case GET_VALUE_BY_CLASS: 857 case GET_VALUE_BY_CLASS:
879 iriap_do_call_event(self, IAP_RECV_F_LST, NULL); 858 iriap_do_call_event(self, IAP_RECV_F_LST, NULL);
@@ -883,7 +862,7 @@ static int iriap_data_indication(void *instance, void *sap,
883 iriap_getvaluebyclass_confirm(self, skb); 862 iriap_getvaluebyclass_confirm(self, skb);
884 break; 863 break;
885 case IAS_CLASS_UNKNOWN: 864 case IAS_CLASS_UNKNOWN:
886 IRDA_DEBUG(1, "%s(), No such class!\n", __func__); 865 pr_debug("%s(), No such class!\n", __func__);
887 /* Finished, close connection! */ 866 /* Finished, close connection! */
888 iriap_disconnect_request(self); 867 iriap_disconnect_request(self);
889 868
@@ -896,7 +875,7 @@ static int iriap_data_indication(void *instance, void *sap,
896 self->priv); 875 self->priv);
897 break; 876 break;
898 case IAS_ATTRIB_UNKNOWN: 877 case IAS_ATTRIB_UNKNOWN:
899 IRDA_DEBUG(1, "%s(), No such attribute!\n", __func__); 878 pr_debug("%s(), No such attribute!\n", __func__);
900 /* Finished, close connection! */ 879 /* Finished, close connection! */
901 iriap_disconnect_request(self); 880 iriap_disconnect_request(self);
902 881
@@ -911,8 +890,8 @@ static int iriap_data_indication(void *instance, void *sap,
911 } 890 }
912 break; 891 break;
913 default: 892 default:
914 IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __func__, 893 pr_debug("%s(), Unknown op-code: %02x\n", __func__,
915 opcode); 894 opcode);
916 break; 895 break;
917 } 896 }
918 897
@@ -933,8 +912,6 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
933 __u8 *fp; 912 __u8 *fp;
934 __u8 opcode; 913 __u8 opcode;
935 914
936 IRDA_DEBUG(4, "%s()\n", __func__);
937
938 IRDA_ASSERT(self != NULL, return;); 915 IRDA_ASSERT(self != NULL, return;);
939 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 916 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
940 IRDA_ASSERT(skb != NULL, return;); 917 IRDA_ASSERT(skb != NULL, return;);
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c
index 09de4efc73a7..e6098b2e048a 100644
--- a/net/irda/iriap_event.c
+++ b/net/irda/iriap_event.c
@@ -187,7 +187,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
187 case IAP_LM_DISCONNECT_INDICATION: 187 case IAP_LM_DISCONNECT_INDICATION:
188 break; 188 break;
189 default: 189 default:
190 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); 190 pr_debug("%s(), Unknown event %d\n", __func__, event);
191 break; 191 break;
192 } 192 }
193} 193}
@@ -219,7 +219,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
219 iriap_next_client_state(self, S_DISCONNECT); 219 iriap_next_client_state(self, S_DISCONNECT);
220 break; 220 break;
221 default: 221 default:
222 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); 222 pr_debug("%s(), Unknown event %d\n", __func__, event);
223 break; 223 break;
224 } 224 }
225} 225}
@@ -243,7 +243,7 @@ static void state_s_call(struct iriap_cb *self, IRIAP_EVENT event,
243 iriap_next_client_state(self, S_DISCONNECT); 243 iriap_next_client_state(self, S_DISCONNECT);
244 break; 244 break;
245 default: 245 default:
246 IRDA_DEBUG(0, "state_s_call: Unknown event %d\n", event); 246 pr_debug("state_s_call: Unknown event %d\n", event);
247 break; 247 break;
248 } 248 }
249} 249}
@@ -271,7 +271,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
271 iriap_next_call_state(self, S_OUTSTANDING); 271 iriap_next_call_state(self, S_OUTSTANDING);
272 break; 272 break;
273 default: 273 default:
274 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); 274 pr_debug("%s(), Unknown event %d\n", __func__, event);
275 break; 275 break;
276 } 276 }
277} 277}
@@ -285,7 +285,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
285static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, 285static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
286 struct sk_buff *skb) 286 struct sk_buff *skb)
287{ 287{
288 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 288 pr_debug("%s(), Not implemented\n", __func__);
289} 289}
290 290
291/* 291/*
@@ -307,7 +307,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
307 iriap_next_call_state(self, S_WAIT_FOR_CALL); 307 iriap_next_call_state(self, S_WAIT_FOR_CALL);
308 break; 308 break;
309 default: 309 default:
310 IRDA_DEBUG(0, "%s(), Unknown event %d\n", __func__, event); 310 pr_debug("%s(), Unknown event %d\n", __func__, event);
311 break; 311 break;
312 } 312 }
313} 313}
@@ -320,7 +320,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
320static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, 320static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
321 struct sk_buff *skb) 321 struct sk_buff *skb)
322{ 322{
323 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 323 pr_debug("%s(), Not implemented\n", __func__);
324} 324}
325 325
326/* 326/*
@@ -332,7 +332,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
332static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, 332static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
333 struct sk_buff *skb) 333 struct sk_buff *skb)
334{ 334{
335 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 335 pr_debug("%s(), Not implemented\n", __func__);
336} 336}
337 337
338 338
@@ -345,7 +345,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
345static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, 345static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
346 struct sk_buff *skb) 346 struct sk_buff *skb)
347{ 347{
348 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 348 pr_debug("%s(), Not implemented\n", __func__);
349} 349}
350 350
351/************************************************************************** 351/**************************************************************************
@@ -386,7 +386,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
386 iriap_next_r_connect_state(self, R_RECEIVING); 386 iriap_next_r_connect_state(self, R_RECEIVING);
387 break; 387 break;
388 default: 388 default:
389 IRDA_DEBUG(0, "%s(), unknown event %d\n", __func__, event); 389 pr_debug("%s(), unknown event %d\n", __func__, event);
390 break; 390 break;
391 } 391 }
392} 392}
@@ -397,8 +397,6 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
397static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, 397static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
398 struct sk_buff *skb) 398 struct sk_buff *skb)
399{ 399{
400 IRDA_DEBUG(4, "%s()\n", __func__);
401
402 switch (event) { 400 switch (event) {
403 case IAP_LM_DISCONNECT_INDICATION: 401 case IAP_LM_DISCONNECT_INDICATION:
404 /* Abort call */ 402 /* Abort call */
@@ -406,7 +404,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
406 iriap_next_r_connect_state(self, R_WAITING); 404 iriap_next_r_connect_state(self, R_WAITING);
407 break; 405 break;
408 default: 406 default:
409 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); 407 pr_debug("%s(), unknown event!\n", __func__);
410 break; 408 break;
411 } 409 }
412} 410}
@@ -421,13 +419,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
421static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, 419static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
422 struct sk_buff *skb) 420 struct sk_buff *skb)
423{ 421{
424 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 422 pr_debug("%s(), Not implemented\n", __func__);
425} 423}
426 424
427static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, 425static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
428 struct sk_buff *skb) 426 struct sk_buff *skb)
429{ 427{
430 IRDA_DEBUG(0, "%s(), Not implemented\n", __func__); 428 pr_debug("%s(), Not implemented\n", __func__);
431} 429}
432 430
433/* 431/*
@@ -439,8 +437,6 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
439static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, 437static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
440 struct sk_buff *skb) 438 struct sk_buff *skb)
441{ 439{
442 IRDA_DEBUG(4, "%s()\n", __func__);
443
444 switch (event) { 440 switch (event) {
445 case IAP_RECV_F_LST: 441 case IAP_RECV_F_LST:
446 iriap_next_r_connect_state(self, R_EXECUTE); 442 iriap_next_r_connect_state(self, R_EXECUTE);
@@ -448,7 +444,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
448 iriap_call_indication(self, skb); 444 iriap_call_indication(self, skb);
449 break; 445 break;
450 default: 446 default:
451 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); 447 pr_debug("%s(), unknown event!\n", __func__);
452 break; 448 break;
453 } 449 }
454} 450}
@@ -462,8 +458,6 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
462static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, 458static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
463 struct sk_buff *skb) 459 struct sk_buff *skb)
464{ 460{
465 IRDA_DEBUG(4, "%s()\n", __func__);
466
467 IRDA_ASSERT(skb != NULL, return;); 461 IRDA_ASSERT(skb != NULL, return;);
468 IRDA_ASSERT(self != NULL, return;); 462 IRDA_ASSERT(self != NULL, return;);
469 IRDA_ASSERT(self->magic == IAS_MAGIC, return;); 463 IRDA_ASSERT(self->magic == IAS_MAGIC, return;);
@@ -483,7 +477,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
483 irlmp_data_request(self->lsap, skb); 477 irlmp_data_request(self->lsap, skb);
484 break; 478 break;
485 default: 479 default:
486 IRDA_DEBUG(0, "%s(), unknown event!\n", __func__); 480 pr_debug("%s(), unknown event!\n", __func__);
487 break; 481 break;
488 } 482 }
489} 483}
@@ -491,7 +485,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
491static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, 485static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
492 struct sk_buff *skb) 486 struct sk_buff *skb)
493{ 487{
494 IRDA_DEBUG(0, "%s(), event=%d\n", __func__, event); 488 pr_debug("%s(), event=%d\n", __func__, event);
495 489
496 switch (event) { 490 switch (event) {
497 case IAP_RECV_F_LST: 491 case IAP_RECV_F_LST:
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
index cd53692fe8c9..53b86d0e1630 100644
--- a/net/irda/irias_object.c
+++ b/net/irda/irias_object.c
@@ -48,8 +48,6 @@ struct ias_object *irias_new_object( char *name, int id)
48{ 48{
49 struct ias_object *obj; 49 struct ias_object *obj;
50 50
51 IRDA_DEBUG( 4, "%s()\n", __func__);
52
53 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); 51 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
54 if (obj == NULL) { 52 if (obj == NULL) {
55 net_warn_ratelimited("%s(), Unable to allocate object!\n", 53 net_warn_ratelimited("%s(), Unable to allocate object!\n",
@@ -134,8 +132,8 @@ int irias_delete_object(struct ias_object *obj)
134 /* Remove from list */ 132 /* Remove from list */
135 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj); 133 node = hashbin_remove_this(irias_objects, (irda_queue_t *) obj);
136 if (!node) 134 if (!node)
137 IRDA_DEBUG( 0, "%s(), object already removed!\n", 135 pr_debug("%s(), object already removed!\n",
138 __func__); 136 __func__);
139 137
140 /* Destroy */ 138 /* Destroy */
141 __irias_delete_object(obj); 139 __irias_delete_object(obj);
@@ -287,8 +285,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
287 } 285 }
288 286
289 if ( attrib->value->type != new_value->type) { 287 if ( attrib->value->type != new_value->type) {
290 IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n", 288 pr_debug("%s(), changing value type not allowed!\n",
291 __func__); 289 __func__);
292 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 290 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
293 return -1; 291 return -1;
294 } 292 }
@@ -533,8 +531,6 @@ struct ias_value *irias_new_missing_value(void)
533 */ 531 */
534void irias_delete_value(struct ias_value *value) 532void irias_delete_value(struct ias_value *value)
535{ 533{
536 IRDA_DEBUG(4, "%s()\n", __func__);
537
538 IRDA_ASSERT(value != NULL, return;); 534 IRDA_ASSERT(value != NULL, return;);
539 535
540 switch (value->type) { 536 switch (value->type) {
@@ -551,7 +547,7 @@ void irias_delete_value(struct ias_value *value)
551 kfree(value->t.oct_seq); 547 kfree(value->t.oct_seq);
552 break; 548 break;
553 default: 549 default:
554 IRDA_DEBUG(0, "%s(), Unknown value type!\n", __func__); 550 pr_debug("%s(), Unknown value type!\n", __func__);
555 break; 551 break;
556 } 552 }
557 kfree(value); 553 kfree(value);
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
index f8eea02843f5..c5837a40c78e 100644
--- a/net/irda/irlan/irlan_client.c
+++ b/net/irda/irlan/irlan_client.c
@@ -72,8 +72,6 @@ static void irlan_client_kick_timer_expired(void *data)
72{ 72{
73 struct irlan_cb *self = (struct irlan_cb *) data; 73 struct irlan_cb *self = (struct irlan_cb *) data;
74 74
75 IRDA_DEBUG(2, "%s()\n", __func__ );
76
77 IRDA_ASSERT(self != NULL, return;); 75 IRDA_ASSERT(self != NULL, return;);
78 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 76 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
79 77
@@ -91,8 +89,6 @@ static void irlan_client_kick_timer_expired(void *data)
91 89
92static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) 90static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
93{ 91{
94 IRDA_DEBUG(4, "%s()\n", __func__ );
95
96 irda_start_timer(&self->client.kick_timer, timeout, (void *) self, 92 irda_start_timer(&self->client.kick_timer, timeout, (void *) self,
97 irlan_client_kick_timer_expired); 93 irlan_client_kick_timer_expired);
98} 94}
@@ -105,8 +101,6 @@ static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout)
105 */ 101 */
106void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) 102void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
107{ 103{
108 IRDA_DEBUG(1, "%s()\n", __func__ );
109
110 IRDA_ASSERT(self != NULL, return;); 104 IRDA_ASSERT(self != NULL, return;);
111 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 105 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
112 106
@@ -117,7 +111,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
117 if ((self->client.state != IRLAN_IDLE) || 111 if ((self->client.state != IRLAN_IDLE) ||
118 (self->provider.access_type == ACCESS_DIRECT)) 112 (self->provider.access_type == ACCESS_DIRECT))
119 { 113 {
120 IRDA_DEBUG(0, "%s(), already awake!\n", __func__ ); 114 pr_debug("%s(), already awake!\n", __func__);
121 return; 115 return;
122 } 116 }
123 117
@@ -126,7 +120,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr)
126 self->daddr = daddr; 120 self->daddr = daddr;
127 121
128 if (self->disconnect_reason == LM_USER_REQUEST) { 122 if (self->disconnect_reason == LM_USER_REQUEST) {
129 IRDA_DEBUG(0, "%s(), still stopped by user\n", __func__ ); 123 pr_debug("%s(), still stopped by user\n", __func__);
130 return; 124 return;
131 } 125 }
132 126
@@ -153,8 +147,6 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
153 struct irlan_cb *self; 147 struct irlan_cb *self;
154 __u32 saddr, daddr; 148 __u32 saddr, daddr;
155 149
156 IRDA_DEBUG(1, "%s()\n", __func__ );
157
158 IRDA_ASSERT(discovery != NULL, return;); 150 IRDA_ASSERT(discovery != NULL, return;);
159 151
160 /* 152 /*
@@ -175,8 +167,8 @@ void irlan_client_discovery_indication(discinfo_t *discovery,
175 if (self) { 167 if (self) {
176 IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;); 168 IRDA_ASSERT(self->magic == IRLAN_MAGIC, goto out;);
177 169
178 IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __func__ , 170 pr_debug("%s(), Found instance (%08x)!\n", __func__ ,
179 daddr); 171 daddr);
180 172
181 irlan_client_wakeup(self, saddr, daddr); 173 irlan_client_wakeup(self, saddr, daddr);
182 } 174 }
@@ -195,8 +187,6 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
195{ 187{
196 struct irlan_cb *self; 188 struct irlan_cb *self;
197 189
198 IRDA_DEBUG(2, "%s()\n", __func__ );
199
200 self = instance; 190 self = instance;
201 191
202 IRDA_ASSERT(self != NULL, return -1;); 192 IRDA_ASSERT(self != NULL, return -1;);
@@ -206,7 +196,7 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap,
206 irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); 196 irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb);
207 197
208 /* Ready for a new command */ 198 /* Ready for a new command */
209 IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __func__ ); 199 pr_debug("%s(), clearing tx_busy\n", __func__);
210 self->client.tx_busy = FALSE; 200 self->client.tx_busy = FALSE;
211 201
212 /* Check if we have some queued commands waiting to be sent */ 202 /* Check if we have some queued commands waiting to be sent */
@@ -223,7 +213,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
223 struct tsap_cb *tsap; 213 struct tsap_cb *tsap;
224 struct sk_buff *skb; 214 struct sk_buff *skb;
225 215
226 IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason); 216 pr_debug("%s(), reason=%d\n", __func__ , reason);
227 217
228 self = instance; 218 self = instance;
229 tsap = sap; 219 tsap = sap;
@@ -255,8 +245,6 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
255 struct tsap_cb *tsap; 245 struct tsap_cb *tsap;
256 notify_t notify; 246 notify_t notify;
257 247
258 IRDA_DEBUG(4, "%s()\n", __func__ );
259
260 IRDA_ASSERT(self != NULL, return;); 248 IRDA_ASSERT(self != NULL, return;);
261 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 249 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
262 250
@@ -275,7 +263,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self)
275 263
276 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); 264 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
277 if (!tsap) { 265 if (!tsap) {
278 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); 266 pr_debug("%s(), Got no tsap!\n", __func__);
279 return; 267 return;
280 } 268 }
281 self->client.tsap_ctrl = tsap; 269 self->client.tsap_ctrl = tsap;
@@ -295,8 +283,6 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap,
295{ 283{
296 struct irlan_cb *self; 284 struct irlan_cb *self;
297 285
298 IRDA_DEBUG(4, "%s()\n", __func__ );
299
300 self = instance; 286 self = instance;
301 287
302 IRDA_ASSERT(self != NULL, return;); 288 IRDA_ASSERT(self != NULL, return;);
@@ -374,7 +360,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
374 360
375 IRDA_ASSERT(skb != NULL, return;); 361 IRDA_ASSERT(skb != NULL, return;);
376 362
377 IRDA_DEBUG(4, "%s() skb->len=%d\n", __func__ , (int) skb->len); 363 pr_debug("%s() skb->len=%d\n", __func__ , (int)skb->len);
378 364
379 IRDA_ASSERT(self != NULL, return;); 365 IRDA_ASSERT(self != NULL, return;);
380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 366 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -405,7 +391,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
405 /* How many parameters? */ 391 /* How many parameters? */
406 count = frame[1]; 392 count = frame[1];
407 393
408 IRDA_DEBUG(4, "%s(), got %d parameters\n", __func__ , count); 394 pr_debug("%s(), got %d parameters\n", __func__ , count);
409 395
410 ptr = frame+2; 396 ptr = frame+2;
411 397
@@ -413,7 +399,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
413 for (i=0; i<count;i++) { 399 for (i=0; i<count;i++) {
414 ret = irlan_extract_param(ptr, name, value, &val_len); 400 ret = irlan_extract_param(ptr, name, value, &val_len);
415 if (ret < 0) { 401 if (ret < 0) {
416 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ ); 402 pr_debug("%s(), IrLAN, Error!\n", __func__);
417 break; 403 break;
418 } 404 }
419 ptr += ret; 405 ptr += ret;
@@ -437,7 +423,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
437 __u8 *bytes; 423 __u8 *bytes;
438 int i; 424 int i;
439 425
440 IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param); 426 pr_debug("%s(), parm=%s\n", __func__ , param);
441 427
442 IRDA_ASSERT(self != NULL, return;); 428 IRDA_ASSERT(self != NULL, return;);
443 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 429 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -475,13 +461,13 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
475 else if (strcmp(value, "HOSTED") == 0) 461 else if (strcmp(value, "HOSTED") == 0)
476 self->client.access_type = ACCESS_HOSTED; 462 self->client.access_type = ACCESS_HOSTED;
477 else { 463 else {
478 IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ ); 464 pr_debug("%s(), unknown access type!\n", __func__);
479 } 465 }
480 } 466 }
481 /* IRLAN version */ 467 /* IRLAN version */
482 if (strcmp(param, "IRLAN_VER") == 0) { 468 if (strcmp(param, "IRLAN_VER") == 0) {
483 IRDA_DEBUG(4, "IrLAN version %d.%d\n", (__u8) value[0], 469 pr_debug("IrLAN version %d.%d\n", (__u8)value[0],
484 (__u8) value[1]); 470 (__u8)value[1]);
485 471
486 self->version[0] = value[0]; 472 self->version[0] = value[0];
487 self->version[1] = value[1]; 473 self->version[1] = value[1];
@@ -490,37 +476,37 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
490 /* Which remote TSAP to use for data channel */ 476 /* Which remote TSAP to use for data channel */
491 if (strcmp(param, "DATA_CHAN") == 0) { 477 if (strcmp(param, "DATA_CHAN") == 0) {
492 self->dtsap_sel_data = value[0]; 478 self->dtsap_sel_data = value[0];
493 IRDA_DEBUG(4, "Data TSAP = %02x\n", self->dtsap_sel_data); 479 pr_debug("Data TSAP = %02x\n", self->dtsap_sel_data);
494 return; 480 return;
495 } 481 }
496 if (strcmp(param, "CON_ARB") == 0) { 482 if (strcmp(param, "CON_ARB") == 0) {
497 memcpy(&tmp_cpu, value, 2); /* Align value */ 483 memcpy(&tmp_cpu, value, 2); /* Align value */
498 le16_to_cpus(&tmp_cpu); /* Convert to host order */ 484 le16_to_cpus(&tmp_cpu); /* Convert to host order */
499 self->client.recv_arb_val = tmp_cpu; 485 self->client.recv_arb_val = tmp_cpu;
500 IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __func__ , 486 pr_debug("%s(), receive arb val=%d\n", __func__ ,
501 self->client.recv_arb_val); 487 self->client.recv_arb_val);
502 } 488 }
503 if (strcmp(param, "MAX_FRAME") == 0) { 489 if (strcmp(param, "MAX_FRAME") == 0) {
504 memcpy(&tmp_cpu, value, 2); /* Align value */ 490 memcpy(&tmp_cpu, value, 2); /* Align value */
505 le16_to_cpus(&tmp_cpu); /* Convert to host order */ 491 le16_to_cpus(&tmp_cpu); /* Convert to host order */
506 self->client.max_frame = tmp_cpu; 492 self->client.max_frame = tmp_cpu;
507 IRDA_DEBUG(4, "%s(), max frame=%d\n", __func__ , 493 pr_debug("%s(), max frame=%d\n", __func__ ,
508 self->client.max_frame); 494 self->client.max_frame);
509 } 495 }
510 496
511 /* RECONNECT_KEY, in case the link goes down! */ 497 /* RECONNECT_KEY, in case the link goes down! */
512 if (strcmp(param, "RECONNECT_KEY") == 0) { 498 if (strcmp(param, "RECONNECT_KEY") == 0) {
513 IRDA_DEBUG(4, "Got reconnect key: "); 499 pr_debug("Got reconnect key: ");
514 /* for (i = 0; i < val_len; i++) */ 500 /* for (i = 0; i < val_len; i++) */
515/* printk("%02x", value[i]); */ 501/* printk("%02x", value[i]); */
516 memcpy(self->client.reconnect_key, value, val_len); 502 memcpy(self->client.reconnect_key, value, val_len);
517 self->client.key_len = val_len; 503 self->client.key_len = val_len;
518 IRDA_DEBUG(4, "\n"); 504 pr_debug("\n");
519 } 505 }
520 /* FILTER_ENTRY, have we got an ethernet address? */ 506 /* FILTER_ENTRY, have we got an ethernet address? */
521 if (strcmp(param, "FILTER_ENTRY") == 0) { 507 if (strcmp(param, "FILTER_ENTRY") == 0) {
522 bytes = value; 508 bytes = value;
523 IRDA_DEBUG(4, "Ethernet address = %pM\n", bytes); 509 pr_debug("Ethernet address = %pM\n", bytes);
524 for (i = 0; i < 6; i++) 510 for (i = 0; i < 6; i++)
525 self->dev->dev_addr[i] = bytes[i]; 511 self->dev->dev_addr[i] = bytes[i];
526 } 512 }
@@ -537,8 +523,6 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
537{ 523{
538 struct irlan_cb *self; 524 struct irlan_cb *self;
539 525
540 IRDA_DEBUG(4, "%s()\n", __func__ );
541
542 IRDA_ASSERT(priv != NULL, return;); 526 IRDA_ASSERT(priv != NULL, return;);
543 527
544 self = priv; 528 self = priv;
@@ -550,7 +534,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
550 534
551 /* Check if request succeeded */ 535 /* Check if request succeeded */
552 if (result != IAS_SUCCESS) { 536 if (result != IAS_SUCCESS) {
553 IRDA_DEBUG(2, "%s(), got NULL value!\n", __func__ ); 537 pr_debug("%s(), got NULL value!\n", __func__);
554 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, 538 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL,
555 NULL); 539 NULL);
556 return; 540 return;
@@ -568,7 +552,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id,
568 irias_delete_value(value); 552 irias_delete_value(value);
569 break; 553 break;
570 default: 554 default:
571 IRDA_DEBUG(2, "%s(), unknown type!\n", __func__ ); 555 pr_debug("%s(), unknown type!\n", __func__);
572 break; 556 break;
573 } 557 }
574 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL); 558 irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, NULL);
diff --git a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c
index f9d11bf38157..cc93fabbbb19 100644
--- a/net/irda/irlan/irlan_client_event.c
+++ b/net/irda/irlan/irlan_client_event.c
@@ -92,8 +92,6 @@ void irlan_do_client_event(struct irlan_cb *self, IRLAN_EVENT event,
92static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event, 92static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
93 struct sk_buff *skb) 93 struct sk_buff *skb)
94{ 94{
95 IRDA_DEBUG(4, "%s()\n", __func__ );
96
97 IRDA_ASSERT(self != NULL, return -1;); 95 IRDA_ASSERT(self != NULL, return -1;);
98 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 96 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
99 97
@@ -114,10 +112,10 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
114 "IrLAN", "IrDA:TinyTP:LsapSel"); 112 "IrLAN", "IrDA:TinyTP:LsapSel");
115 break; 113 break;
116 case IRLAN_WATCHDOG_TIMEOUT: 114 case IRLAN_WATCHDOG_TIMEOUT:
117 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 115 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
118 break; 116 break;
119 default: 117 default:
120 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event); 118 pr_debug("%s(), Unknown event %d\n", __func__ , event);
121 break; 119 break;
122 } 120 }
123 if (skb) 121 if (skb)
@@ -136,8 +134,6 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
136static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event, 134static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
137 struct sk_buff *skb) 135 struct sk_buff *skb)
138{ 136{
139 IRDA_DEBUG(4, "%s()\n", __func__ );
140
141 IRDA_ASSERT(self != NULL, return -1;); 137 IRDA_ASSERT(self != NULL, return -1;);
142 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 138 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
143 139
@@ -154,7 +150,7 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
154 irlan_next_client_state(self, IRLAN_CONN); 150 irlan_next_client_state(self, IRLAN_CONN);
155 break; 151 break;
156 case IRLAN_IAS_PROVIDER_NOT_AVAIL: 152 case IRLAN_IAS_PROVIDER_NOT_AVAIL:
157 IRDA_DEBUG(2, "%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__ ); 153 pr_debug("%s(), IAS_PROVIDER_NOT_AVAIL\n", __func__);
158 irlan_next_client_state(self, IRLAN_IDLE); 154 irlan_next_client_state(self, IRLAN_IDLE);
159 155
160 /* Give the client a kick! */ 156 /* Give the client a kick! */
@@ -167,10 +163,10 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
167 irlan_next_client_state(self, IRLAN_IDLE); 163 irlan_next_client_state(self, IRLAN_IDLE);
168 break; 164 break;
169 case IRLAN_WATCHDOG_TIMEOUT: 165 case IRLAN_WATCHDOG_TIMEOUT:
170 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 166 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
171 break; 167 break;
172 default: 168 default:
173 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 169 pr_debug("%s(), Unknown event %d\n", __func__ , event);
174 break; 170 break;
175 } 171 }
176 if (skb) 172 if (skb)
@@ -189,8 +185,6 @@ static int irlan_client_state_query(struct irlan_cb *self, IRLAN_EVENT event,
189static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event, 185static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
190 struct sk_buff *skb) 186 struct sk_buff *skb)
191{ 187{
192 IRDA_DEBUG(4, "%s()\n", __func__ );
193
194 IRDA_ASSERT(self != NULL, return -1;); 188 IRDA_ASSERT(self != NULL, return -1;);
195 189
196 switch (event) { 190 switch (event) {
@@ -204,10 +198,10 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
204 irlan_next_client_state(self, IRLAN_IDLE); 198 irlan_next_client_state(self, IRLAN_IDLE);
205 break; 199 break;
206 case IRLAN_WATCHDOG_TIMEOUT: 200 case IRLAN_WATCHDOG_TIMEOUT:
207 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 201 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
208 break; 202 break;
209 default: 203 default:
210 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 204 pr_debug("%s(), Unknown event %d\n", __func__ , event);
211 break; 205 break;
212 } 206 }
213 if (skb) 207 if (skb)
@@ -224,8 +218,6 @@ static int irlan_client_state_conn(struct irlan_cb *self, IRLAN_EVENT event,
224static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event, 218static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
225 struct sk_buff *skb) 219 struct sk_buff *skb)
226{ 220{
227 IRDA_DEBUG(4, "%s()\n", __func__ );
228
229 IRDA_ASSERT(self != NULL, return -1;); 221 IRDA_ASSERT(self != NULL, return -1;);
230 222
231 switch (event) { 223 switch (event) {
@@ -244,10 +236,10 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
244 irlan_next_client_state(self, IRLAN_IDLE); 236 irlan_next_client_state(self, IRLAN_IDLE);
245 break; 237 break;
246 case IRLAN_WATCHDOG_TIMEOUT: 238 case IRLAN_WATCHDOG_TIMEOUT:
247 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 239 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
248 break; 240 break;
249 default: 241 default:
250 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 242 pr_debug("%s(), Unknown event %d\n", __func__ , event);
251 break; 243 break;
252 } 244 }
253 if (skb) 245 if (skb)
@@ -266,8 +258,6 @@ static int irlan_client_state_info(struct irlan_cb *self, IRLAN_EVENT event,
266static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event, 258static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
267 struct sk_buff *skb) 259 struct sk_buff *skb)
268{ 260{
269 IRDA_DEBUG(4, "%s()\n", __func__ );
270
271 IRDA_ASSERT(self != NULL, return -1;); 261 IRDA_ASSERT(self != NULL, return -1;);
272 262
273 switch(event) { 263 switch(event) {
@@ -281,10 +271,10 @@ static int irlan_client_state_media(struct irlan_cb *self, IRLAN_EVENT event,
281 irlan_next_client_state(self, IRLAN_IDLE); 271 irlan_next_client_state(self, IRLAN_IDLE);
282 break; 272 break;
283 case IRLAN_WATCHDOG_TIMEOUT: 273 case IRLAN_WATCHDOG_TIMEOUT:
284 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 274 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
285 break; 275 break;
286 default: 276 default:
287 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 277 pr_debug("%s(), Unknown event %d\n", __func__ , event);
288 break; 278 break;
289 } 279 }
290 if (skb) 280 if (skb)
@@ -305,8 +295,6 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
305{ 295{
306 struct qos_info qos; 296 struct qos_info qos;
307 297
308 IRDA_DEBUG(4, "%s()\n", __func__ );
309
310 IRDA_ASSERT(self != NULL, return -1;); 298 IRDA_ASSERT(self != NULL, return -1;);
311 299
312 switch(event) { 300 switch(event) {
@@ -344,7 +332,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
344 irlan_next_client_state(self, IRLAN_DATA); 332 irlan_next_client_state(self, IRLAN_DATA);
345 break; 333 break;
346 default: 334 default:
347 IRDA_DEBUG(2, "%s(), unknown access type!\n", __func__ ); 335 pr_debug("%s(), unknown access type!\n", __func__);
348 break; 336 break;
349 } 337 }
350 break; 338 break;
@@ -353,10 +341,10 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
353 irlan_next_client_state(self, IRLAN_IDLE); 341 irlan_next_client_state(self, IRLAN_IDLE);
354 break; 342 break;
355 case IRLAN_WATCHDOG_TIMEOUT: 343 case IRLAN_WATCHDOG_TIMEOUT:
356 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 344 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
357 break; 345 break;
358 default: 346 default:
359 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 347 pr_debug("%s(), Unknown event %d\n", __func__ , event);
360 break; 348 break;
361 } 349 }
362 350
@@ -376,8 +364,6 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
376static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event, 364static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
377 struct sk_buff *skb) 365 struct sk_buff *skb)
378{ 366{
379 IRDA_DEBUG(4, "%s()\n", __func__ );
380
381 IRDA_ASSERT(self != NULL, return -1;); 367 IRDA_ASSERT(self != NULL, return -1;);
382 368
383 switch(event) { 369 switch(event) {
@@ -390,10 +376,10 @@ static int irlan_client_state_wait(struct irlan_cb *self, IRLAN_EVENT event,
390 irlan_next_client_state(self, IRLAN_IDLE); 376 irlan_next_client_state(self, IRLAN_IDLE);
391 break; 377 break;
392 case IRLAN_WATCHDOG_TIMEOUT: 378 case IRLAN_WATCHDOG_TIMEOUT:
393 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 379 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
394 break; 380 break;
395 default: 381 default:
396 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 382 pr_debug("%s(), Unknown event %d\n", __func__ , event);
397 break; 383 break;
398 } 384 }
399 if (skb) 385 if (skb)
@@ -407,8 +393,6 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
407{ 393{
408 struct qos_info qos; 394 struct qos_info qos;
409 395
410 IRDA_DEBUG(2, "%s()\n", __func__ );
411
412 IRDA_ASSERT(self != NULL, return -1;); 396 IRDA_ASSERT(self != NULL, return -1;);
413 397
414 switch(event) { 398 switch(event) {
@@ -429,7 +413,7 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
429 } else if (self->client.recv_arb_val > 413 } else if (self->client.recv_arb_val >
430 self->provider.send_arb_val) 414 self->provider.send_arb_val)
431 { 415 {
432 IRDA_DEBUG(2, "%s(), lost the battle :-(\n", __func__ ); 416 pr_debug("%s(), lost the battle :-(\n", __func__);
433 } 417 }
434 break; 418 break;
435 case IRLAN_DATA_CONNECT_INDICATION: 419 case IRLAN_DATA_CONNECT_INDICATION:
@@ -440,10 +424,10 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
440 irlan_next_client_state(self, IRLAN_IDLE); 424 irlan_next_client_state(self, IRLAN_IDLE);
441 break; 425 break;
442 case IRLAN_WATCHDOG_TIMEOUT: 426 case IRLAN_WATCHDOG_TIMEOUT:
443 IRDA_DEBUG(2, "%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__ ); 427 pr_debug("%s(), IRLAN_WATCHDOG_TIMEOUT\n", __func__);
444 break; 428 break;
445 default: 429 default:
446 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 430 pr_debug("%s(), Unknown event %d\n", __func__ , event);
447 break; 431 break;
448 } 432 }
449 if (skb) 433 if (skb)
@@ -462,8 +446,6 @@ static int irlan_client_state_arb(struct irlan_cb *self, IRLAN_EVENT event,
462static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event, 446static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
463 struct sk_buff *skb) 447 struct sk_buff *skb)
464{ 448{
465 IRDA_DEBUG(4, "%s()\n", __func__ );
466
467 IRDA_ASSERT(self != NULL, return -1;); 449 IRDA_ASSERT(self != NULL, return -1;);
468 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 450 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
469 451
@@ -476,7 +458,7 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
476 irlan_next_client_state(self, IRLAN_IDLE); 458 irlan_next_client_state(self, IRLAN_IDLE);
477 break; 459 break;
478 default: 460 default:
479 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 461 pr_debug("%s(), Unknown event %d\n", __func__ , event);
480 break; 462 break;
481 } 463 }
482 if (skb) 464 if (skb)
@@ -494,8 +476,6 @@ static int irlan_client_state_data(struct irlan_cb *self, IRLAN_EVENT event,
494static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event, 476static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
495 struct sk_buff *skb) 477 struct sk_buff *skb)
496{ 478{
497 IRDA_DEBUG(2, "%s()\n", __func__ );
498
499 if (skb) 479 if (skb)
500 dev_kfree_skb(skb); 480 dev_kfree_skb(skb);
501 481
@@ -511,8 +491,6 @@ static int irlan_client_state_close(struct irlan_cb *self, IRLAN_EVENT event,
511static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event, 491static int irlan_client_state_sync(struct irlan_cb *self, IRLAN_EVENT event,
512 struct sk_buff *skb) 492 struct sk_buff *skb)
513{ 493{
514 IRDA_DEBUG(2, "%s()\n", __func__ );
515
516 if (skb) 494 if (skb)
517 dev_kfree_skb(skb); 495 dev_kfree_skb(skb);
518 496
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index cc60b4a282ae..481bbc2a4349 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -118,8 +118,6 @@ static int __init irlan_init(void)
118 struct irlan_cb *new; 118 struct irlan_cb *new;
119 __u16 hints; 119 __u16 hints;
120 120
121 IRDA_DEBUG(2, "%s()\n", __func__ );
122
123#ifdef CONFIG_PROC_FS 121#ifdef CONFIG_PROC_FS
124 { struct proc_dir_entry *proc; 122 { struct proc_dir_entry *proc;
125 proc = proc_create("irlan", 0, proc_irda, &irlan_fops); 123 proc = proc_create("irlan", 0, proc_irda, &irlan_fops);
@@ -130,7 +128,6 @@ static int __init irlan_init(void)
130 } 128 }
131#endif /* CONFIG_PROC_FS */ 129#endif /* CONFIG_PROC_FS */
132 130
133 IRDA_DEBUG(4, "%s()\n", __func__ );
134 hints = irlmp_service_to_hint(S_LAN); 131 hints = irlmp_service_to_hint(S_LAN);
135 132
136 /* Register with IrLMP as a client */ 133 /* Register with IrLMP as a client */
@@ -173,8 +170,6 @@ static void __exit irlan_cleanup(void)
173{ 170{
174 struct irlan_cb *self, *next; 171 struct irlan_cb *self, *next;
175 172
176 IRDA_DEBUG(4, "%s()\n", __func__ );
177
178 irlmp_unregister_client(ckey); 173 irlmp_unregister_client(ckey);
179 irlmp_unregister_service(skey); 174 irlmp_unregister_service(skey);
180 175
@@ -201,8 +196,6 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr)
201 struct net_device *dev; 196 struct net_device *dev;
202 struct irlan_cb *self; 197 struct irlan_cb *self;
203 198
204 IRDA_DEBUG(2, "%s()\n", __func__ );
205
206 /* Create network device with irlan */ 199 /* Create network device with irlan */
207 dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); 200 dev = alloc_irlandev(eth ? "eth%d" : "irlan%d");
208 if (!dev) 201 if (!dev)
@@ -245,8 +238,8 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr)
245 irlan_next_provider_state(self, IRLAN_IDLE); 238 irlan_next_provider_state(self, IRLAN_IDLE);
246 239
247 if (register_netdev(dev)) { 240 if (register_netdev(dev)) {
248 IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", 241 pr_debug("%s(), register_netdev() failed!\n",
249 __func__ ); 242 __func__);
250 self = NULL; 243 self = NULL;
251 free_netdev(dev); 244 free_netdev(dev);
252 } else { 245 } else {
@@ -266,8 +259,6 @@ static struct irlan_cb __init *irlan_open(__u32 saddr, __u32 daddr)
266 */ 259 */
267static void __irlan_close(struct irlan_cb *self) 260static void __irlan_close(struct irlan_cb *self)
268{ 261{
269 IRDA_DEBUG(2, "%s()\n", __func__ );
270
271 ASSERT_RTNL(); 262 ASSERT_RTNL();
272 IRDA_ASSERT(self != NULL, return;); 263 IRDA_ASSERT(self != NULL, return;);
273 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 264 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -314,8 +305,6 @@ static void irlan_connect_indication(void *instance, void *sap,
314 struct irlan_cb *self; 305 struct irlan_cb *self;
315 struct tsap_cb *tsap; 306 struct tsap_cb *tsap;
316 307
317 IRDA_DEBUG(2, "%s()\n", __func__ );
318
319 self = instance; 308 self = instance;
320 tsap = sap; 309 tsap = sap;
321 310
@@ -326,7 +315,7 @@ static void irlan_connect_indication(void *instance, void *sap,
326 self->max_sdu_size = max_sdu_size; 315 self->max_sdu_size = max_sdu_size;
327 self->max_header_size = max_header_size; 316 self->max_header_size = max_header_size;
328 317
329 IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); 318 pr_debug("%s: We are now connected!\n", __func__);
330 319
331 del_timer(&self->watchdog_timer); 320 del_timer(&self->watchdog_timer);
332 321
@@ -370,7 +359,7 @@ static void irlan_connect_confirm(void *instance, void *sap,
370 359
371 /* TODO: we could set the MTU depending on the max_sdu_size */ 360 /* TODO: we could set the MTU depending on the max_sdu_size */
372 361
373 IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); 362 pr_debug("%s: We are now connected!\n", __func__);
374 del_timer(&self->watchdog_timer); 363 del_timer(&self->watchdog_timer);
375 364
376 /* 365 /*
@@ -403,7 +392,7 @@ static void irlan_disconnect_indication(void *instance,
403 struct irlan_cb *self; 392 struct irlan_cb *self;
404 struct tsap_cb *tsap; 393 struct tsap_cb *tsap;
405 394
406 IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason); 395 pr_debug("%s(), reason=%d\n", __func__ , reason);
407 396
408 self = instance; 397 self = instance;
409 tsap = sap; 398 tsap = sap;
@@ -415,26 +404,26 @@ static void irlan_disconnect_indication(void *instance,
415 404
416 IRDA_ASSERT(tsap == self->tsap_data, return;); 405 IRDA_ASSERT(tsap == self->tsap_data, return;);
417 406
418 IRDA_DEBUG(2, "IrLAN, data channel disconnected by peer!\n"); 407 pr_debug("IrLAN, data channel disconnected by peer!\n");
419 408
420 /* Save reason so we know if we should try to reconnect or not */ 409 /* Save reason so we know if we should try to reconnect or not */
421 self->disconnect_reason = reason; 410 self->disconnect_reason = reason;
422 411
423 switch (reason) { 412 switch (reason) {
424 case LM_USER_REQUEST: /* User request */ 413 case LM_USER_REQUEST: /* User request */
425 IRDA_DEBUG(2, "%s(), User requested\n", __func__ ); 414 pr_debug("%s(), User requested\n", __func__);
426 break; 415 break;
427 case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ 416 case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */
428 IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ ); 417 pr_debug("%s(), Unexpected IrLAP disconnect\n", __func__);
429 break; 418 break;
430 case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ 419 case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */
431 IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ ); 420 pr_debug("%s(), IrLAP connect failed\n", __func__);
432 break; 421 break;
433 case LM_LAP_RESET: /* IrLAP reset */ 422 case LM_LAP_RESET: /* IrLAP reset */
434 IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ ); 423 pr_debug("%s(), IrLAP reset\n", __func__);
435 break; 424 break;
436 case LM_INIT_DISCONNECT: 425 case LM_INIT_DISCONNECT:
437 IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ ); 426 pr_debug("%s(), IrLMP connect failed\n", __func__);
438 break; 427 break;
439 default: 428 default:
440 net_err_ratelimited("%s(), Unknown disconnect reason\n", 429 net_err_ratelimited("%s(), Unknown disconnect reason\n",
@@ -460,8 +449,6 @@ void irlan_open_data_tsap(struct irlan_cb *self)
460 struct tsap_cb *tsap; 449 struct tsap_cb *tsap;
461 notify_t notify; 450 notify_t notify;
462 451
463 IRDA_DEBUG(2, "%s()\n", __func__ );
464
465 IRDA_ASSERT(self != NULL, return;); 452 IRDA_ASSERT(self != NULL, return;);
466 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 453 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
467 454
@@ -482,7 +469,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
482 469
483 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify); 470 tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, &notify);
484 if (!tsap) { 471 if (!tsap) {
485 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); 472 pr_debug("%s(), Got no tsap!\n", __func__);
486 return; 473 return;
487 } 474 }
488 self->tsap_data = tsap; 475 self->tsap_data = tsap;
@@ -496,8 +483,6 @@ void irlan_open_data_tsap(struct irlan_cb *self)
496 483
497void irlan_close_tsaps(struct irlan_cb *self) 484void irlan_close_tsaps(struct irlan_cb *self)
498{ 485{
499 IRDA_DEBUG(4, "%s()\n", __func__ );
500
501 IRDA_ASSERT(self != NULL, return;); 486 IRDA_ASSERT(self != NULL, return;);
502 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 487 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
503 488
@@ -586,8 +571,6 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
586{ 571{
587 struct sk_buff *skb; 572 struct sk_buff *skb;
588 573
589 IRDA_DEBUG(2, "%s()\n", __func__ );
590
591 if (irda_lock(&self->client.tx_busy) == FALSE) 574 if (irda_lock(&self->client.tx_busy) == FALSE)
592 return -EBUSY; 575 return -EBUSY;
593 576
@@ -605,7 +588,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
605 dev_kfree_skb(skb); 588 dev_kfree_skb(skb);
606 return -1; 589 return -1;
607 } 590 }
608 IRDA_DEBUG(2, "%s(), sending ...\n", __func__ ); 591 pr_debug("%s(), sending ...\n", __func__);
609 592
610 return irttp_data_request(self->client.tsap_ctrl, skb); 593 return irttp_data_request(self->client.tsap_ctrl, skb);
611} 594}
@@ -618,8 +601,6 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self)
618 */ 601 */
619static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) 602static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb)
620{ 603{
621 IRDA_DEBUG(2, "%s()\n", __func__ );
622
623 /* Queue command */ 604 /* Queue command */
624 skb_queue_tail(&self->client.txq, skb); 605 skb_queue_tail(&self->client.txq, skb);
625 606
@@ -638,8 +619,6 @@ void irlan_get_provider_info(struct irlan_cb *self)
638 struct sk_buff *skb; 619 struct sk_buff *skb;
639 __u8 *frame; 620 __u8 *frame;
640 621
641 IRDA_DEBUG(4, "%s()\n", __func__ );
642
643 IRDA_ASSERT(self != NULL, return;); 622 IRDA_ASSERT(self != NULL, return;);
644 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 623 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
645 624
@@ -671,8 +650,6 @@ void irlan_open_data_channel(struct irlan_cb *self)
671 struct sk_buff *skb; 650 struct sk_buff *skb;
672 __u8 *frame; 651 __u8 *frame;
673 652
674 IRDA_DEBUG(4, "%s()\n", __func__ );
675
676 IRDA_ASSERT(self != NULL, return;); 653 IRDA_ASSERT(self != NULL, return;);
677 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 654 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
678 655
@@ -706,8 +683,6 @@ void irlan_close_data_channel(struct irlan_cb *self)
706 struct sk_buff *skb; 683 struct sk_buff *skb;
707 __u8 *frame; 684 __u8 *frame;
708 685
709 IRDA_DEBUG(4, "%s()\n", __func__ );
710
711 IRDA_ASSERT(self != NULL, return;); 686 IRDA_ASSERT(self != NULL, return;);
712 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 687 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
713 688
@@ -747,8 +722,6 @@ static void irlan_open_unicast_addr(struct irlan_cb *self)
747 struct sk_buff *skb; 722 struct sk_buff *skb;
748 __u8 *frame; 723 __u8 *frame;
749 724
750 IRDA_DEBUG(4, "%s()\n", __func__ );
751
752 IRDA_ASSERT(self != NULL, return;); 725 IRDA_ASSERT(self != NULL, return;);
753 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 726 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
754 727
@@ -789,8 +762,6 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
789 struct sk_buff *skb; 762 struct sk_buff *skb;
790 __u8 *frame; 763 __u8 *frame;
791 764
792 IRDA_DEBUG(2, "%s()\n", __func__ );
793
794 IRDA_ASSERT(self != NULL, return;); 765 IRDA_ASSERT(self != NULL, return;);
795 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 766 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
796 767
@@ -833,8 +804,6 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
833 struct sk_buff *skb; 804 struct sk_buff *skb;
834 __u8 *frame; 805 __u8 *frame;
835 806
836 IRDA_DEBUG(2, "%s()\n", __func__ );
837
838 IRDA_ASSERT(self != NULL, return;); 807 IRDA_ASSERT(self != NULL, return;);
839 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 808 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
840 809
@@ -878,8 +847,6 @@ static void irlan_get_unicast_addr(struct irlan_cb *self)
878 struct sk_buff *skb; 847 struct sk_buff *skb;
879 __u8 *frame; 848 __u8 *frame;
880 849
881 IRDA_DEBUG(2, "%s()\n", __func__ );
882
883 IRDA_ASSERT(self != NULL, return;); 850 IRDA_ASSERT(self != NULL, return;);
884 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 851 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
885 852
@@ -918,8 +885,6 @@ void irlan_get_media_char(struct irlan_cb *self)
918 struct sk_buff *skb; 885 struct sk_buff *skb;
919 __u8 *frame; 886 __u8 *frame;
920 887
921 IRDA_DEBUG(4, "%s()\n", __func__ );
922
923 IRDA_ASSERT(self != NULL, return;); 888 IRDA_ASSERT(self != NULL, return;);
924 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 889 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
925 890
@@ -1006,7 +971,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1006 int n=0; 971 int n=0;
1007 972
1008 if (skb == NULL) { 973 if (skb == NULL) {
1009 IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ ); 974 pr_debug("%s(), Got NULL skb\n", __func__);
1010 return 0; 975 return 0;
1011 } 976 }
1012 977
@@ -1023,7 +988,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1023 IRDA_ASSERT(value_len > 0, return 0;); 988 IRDA_ASSERT(value_len > 0, return 0;);
1024 break; 989 break;
1025 default: 990 default:
1026 IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ ); 991 pr_debug("%s(), Unknown parameter type!\n", __func__);
1027 return 0; 992 return 0;
1028 } 993 }
1029 994
@@ -1032,7 +997,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type,
1032 997
1033 /* Make space for data */ 998 /* Make space for data */
1034 if (skb_tailroom(skb) < (param_len+value_len+3)) { 999 if (skb_tailroom(skb) < (param_len+value_len+3)) {
1035 IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ ); 1000 pr_debug("%s(), No more space at end of skb\n", __func__);
1036 return 0; 1001 return 0;
1037 } 1002 }
1038 skb_put(skb, param_len+value_len+3); 1003 skb_put(skb, param_len+value_len+3);
@@ -1079,13 +1044,11 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
1079 __u16 val_len; 1044 __u16 val_len;
1080 int n=0; 1045 int n=0;
1081 1046
1082 IRDA_DEBUG(4, "%s()\n", __func__ );
1083
1084 /* get length of parameter name (1 byte) */ 1047 /* get length of parameter name (1 byte) */
1085 name_len = buf[n++]; 1048 name_len = buf[n++];
1086 1049
1087 if (name_len > 254) { 1050 if (name_len > 254) {
1088 IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ ); 1051 pr_debug("%s(), name_len > 254\n", __func__);
1089 return -RSP_INVALID_COMMAND_FORMAT; 1052 return -RSP_INVALID_COMMAND_FORMAT;
1090 } 1053 }
1091 1054
@@ -1102,7 +1065,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
1102 le16_to_cpus(&val_len); n+=2; 1065 le16_to_cpus(&val_len); n+=2;
1103 1066
1104 if (val_len >= 1016) { 1067 if (val_len >= 1016) {
1105 IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ ); 1068 pr_debug("%s(), parameter length to long\n", __func__);
1106 return -RSP_INVALID_COMMAND_FORMAT; 1069 return -RSP_INVALID_COMMAND_FORMAT;
1107 } 1070 }
1108 *len = val_len; 1071 *len = val_len;
@@ -1112,8 +1075,8 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len)
1112 value[val_len] = '\0'; 1075 value[val_len] = '\0';
1113 n+=val_len; 1076 n+=val_len;
1114 1077
1115 IRDA_DEBUG(4, "Parameter: %s ", name); 1078 pr_debug("Parameter: %s ", name);
1116 IRDA_DEBUG(4, "Value: %s\n", value); 1079 pr_debug("Value: %s\n", value);
1117 1080
1118 return n; 1081 return n;
1119} 1082}
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index 94b948ef36f9..fcfbe579434a 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -110,8 +110,6 @@ static int irlan_eth_open(struct net_device *dev)
110{ 110{
111 struct irlan_cb *self = netdev_priv(dev); 111 struct irlan_cb *self = netdev_priv(dev);
112 112
113 IRDA_DEBUG(2, "%s()\n", __func__);
114
115 /* Ready to play! */ 113 /* Ready to play! */
116 netif_stop_queue(dev); /* Wait until data link is ready */ 114 netif_stop_queue(dev); /* Wait until data link is ready */
117 115
@@ -137,8 +135,6 @@ static int irlan_eth_close(struct net_device *dev)
137{ 135{
138 struct irlan_cb *self = netdev_priv(dev); 136 struct irlan_cb *self = netdev_priv(dev);
139 137
140 IRDA_DEBUG(2, "%s()\n", __func__);
141
142 /* Stop device */ 138 /* Stop device */
143 netif_stop_queue(dev); 139 netif_stop_queue(dev);
144 140
@@ -231,8 +227,8 @@ int irlan_eth_receive(void *instance, void *sap, struct sk_buff *skb)
231 return 0; 227 return 0;
232 } 228 }
233 if (skb->len < ETH_HLEN) { 229 if (skb->len < ETH_HLEN) {
234 IRDA_DEBUG(0, "%s() : IrLAN frame too short (%d)\n", 230 pr_debug("%s() : IrLAN frame too short (%d)\n",
235 __func__, skb->len); 231 __func__, skb->len);
236 dev->stats.rx_dropped++; 232 dev->stats.rx_dropped++;
237 dev_kfree_skb(skb); 233 dev_kfree_skb(skb);
238 return 0; 234 return 0;
@@ -281,9 +277,9 @@ void irlan_eth_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
281 277
282 IRDA_ASSERT(dev != NULL, return;); 278 IRDA_ASSERT(dev != NULL, return;);
283 279
284 IRDA_DEBUG(0, "%s() : flow %s ; running %d\n", __func__, 280 pr_debug("%s() : flow %s ; running %d\n", __func__,
285 flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START", 281 flow == FLOW_STOP ? "FLOW_STOP" : "FLOW_START",
286 netif_running(dev)); 282 netif_running(dev));
287 283
288 switch (flow) { 284 switch (flow) {
289 case FLOW_STOP: 285 case FLOW_STOP:
@@ -310,11 +306,9 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
310{ 306{
311 struct irlan_cb *self = netdev_priv(dev); 307 struct irlan_cb *self = netdev_priv(dev);
312 308
313 IRDA_DEBUG(2, "%s()\n", __func__);
314
315 /* Check if data channel has been connected yet */ 309 /* Check if data channel has been connected yet */
316 if (self->client.state != IRLAN_DATA) { 310 if (self->client.state != IRLAN_DATA) {
317 IRDA_DEBUG(1, "%s(), delaying!\n", __func__); 311 pr_debug("%s(), delaying!\n", __func__);
318 return; 312 return;
319 } 313 }
320 314
@@ -324,18 +318,18 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
324 } else if ((dev->flags & IFF_ALLMULTI) || 318 } else if ((dev->flags & IFF_ALLMULTI) ||
325 netdev_mc_count(dev) > HW_MAX_ADDRS) { 319 netdev_mc_count(dev) > HW_MAX_ADDRS) {
326 /* Disable promiscuous mode, use normal mode. */ 320 /* Disable promiscuous mode, use normal mode. */
327 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); 321 pr_debug("%s(), Setting multicast filter\n", __func__);
328 /* hardware_set_filter(NULL); */ 322 /* hardware_set_filter(NULL); */
329 323
330 irlan_set_multicast_filter(self, TRUE); 324 irlan_set_multicast_filter(self, TRUE);
331 } else if (!netdev_mc_empty(dev)) { 325 } else if (!netdev_mc_empty(dev)) {
332 IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__); 326 pr_debug("%s(), Setting multicast filter\n", __func__);
333 /* Walk the address list, and load the filter */ 327 /* Walk the address list, and load the filter */
334 /* hardware_set_filter(dev->mc_list); */ 328 /* hardware_set_filter(dev->mc_list); */
335 329
336 irlan_set_multicast_filter(self, TRUE); 330 irlan_set_multicast_filter(self, TRUE);
337 } else { 331 } else {
338 IRDA_DEBUG(4, "%s(), Clearing multicast filter\n", __func__); 332 pr_debug("%s(), Clearing multicast filter\n", __func__);
339 irlan_set_multicast_filter(self, FALSE); 333 irlan_set_multicast_filter(self, FALSE);
340 } 334 }
341 335
diff --git a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c
index 43f16040a6fe..9a1cc11c16f6 100644
--- a/net/irda/irlan/irlan_event.c
+++ b/net/irda/irlan/irlan_event.c
@@ -40,7 +40,7 @@ const char * const irlan_state[] = {
40 40
41void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state) 41void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
42{ 42{
43 IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); 43 pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
44 44
45 IRDA_ASSERT(self != NULL, return;); 45 IRDA_ASSERT(self != NULL, return;);
46 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 46 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
@@ -50,7 +50,7 @@ void irlan_next_client_state(struct irlan_cb *self, IRLAN_STATE state)
50 50
51void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state) 51void irlan_next_provider_state(struct irlan_cb *self, IRLAN_STATE state)
52{ 52{
53 IRDA_DEBUG(2, "%s(), %s\n", __func__ , irlan_state[state]); 53 pr_debug("%s(), %s\n", __func__ , irlan_state[state]);
54 54
55 IRDA_ASSERT(self != NULL, return;); 55 IRDA_ASSERT(self != NULL, return;);
56 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 56 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
diff --git a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c
index 7977be7caf0f..e755e90b2f26 100644
--- a/net/irda/irlan/irlan_filter.c
+++ b/net/irda/irlan/irlan_filter.c
@@ -43,7 +43,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
43 if ((self->provider.filter_type == IRLAN_DIRECTED) && 43 if ((self->provider.filter_type == IRLAN_DIRECTED) &&
44 (self->provider.filter_operation == DYNAMIC)) 44 (self->provider.filter_operation == DYNAMIC))
45 { 45 {
46 IRDA_DEBUG(0, "Giving peer a dynamic Ethernet address\n"); 46 pr_debug("Giving peer a dynamic Ethernet address\n");
47 self->provider.mac_address[0] = 0x40; 47 self->provider.mac_address[0] = 0x40;
48 self->provider.mac_address[1] = 0x00; 48 self->provider.mac_address[1] = 0x00;
49 self->provider.mac_address[2] = 0x00; 49 self->provider.mac_address[2] = 0x00;
@@ -73,7 +73,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
73 if ((self->provider.filter_type == IRLAN_DIRECTED) && 73 if ((self->provider.filter_type == IRLAN_DIRECTED) &&
74 (self->provider.filter_mode == FILTER)) 74 (self->provider.filter_mode == FILTER))
75 { 75 {
76 IRDA_DEBUG(0, "Directed filter on\n"); 76 pr_debug("Directed filter on\n");
77 skb->data[0] = 0x00; /* Success */ 77 skb->data[0] = 0x00; /* Success */
78 skb->data[1] = 0x00; 78 skb->data[1] = 0x00;
79 return; 79 return;
@@ -81,7 +81,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
81 if ((self->provider.filter_type == IRLAN_DIRECTED) && 81 if ((self->provider.filter_type == IRLAN_DIRECTED) &&
82 (self->provider.filter_mode == NONE)) 82 (self->provider.filter_mode == NONE))
83 { 83 {
84 IRDA_DEBUG(0, "Directed filter off\n"); 84 pr_debug("Directed filter off\n");
85 skb->data[0] = 0x00; /* Success */ 85 skb->data[0] = 0x00; /* Success */
86 skb->data[1] = 0x00; 86 skb->data[1] = 0x00;
87 return; 87 return;
@@ -90,7 +90,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
90 if ((self->provider.filter_type == IRLAN_BROADCAST) && 90 if ((self->provider.filter_type == IRLAN_BROADCAST) &&
91 (self->provider.filter_mode == FILTER)) 91 (self->provider.filter_mode == FILTER))
92 { 92 {
93 IRDA_DEBUG(0, "Broadcast filter on\n"); 93 pr_debug("Broadcast filter on\n");
94 skb->data[0] = 0x00; /* Success */ 94 skb->data[0] = 0x00; /* Success */
95 skb->data[1] = 0x00; 95 skb->data[1] = 0x00;
96 return; 96 return;
@@ -98,7 +98,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
98 if ((self->provider.filter_type == IRLAN_BROADCAST) && 98 if ((self->provider.filter_type == IRLAN_BROADCAST) &&
99 (self->provider.filter_mode == NONE)) 99 (self->provider.filter_mode == NONE))
100 { 100 {
101 IRDA_DEBUG(0, "Broadcast filter off\n"); 101 pr_debug("Broadcast filter off\n");
102 skb->data[0] = 0x00; /* Success */ 102 skb->data[0] = 0x00; /* Success */
103 skb->data[1] = 0x00; 103 skb->data[1] = 0x00;
104 return; 104 return;
@@ -106,7 +106,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
106 if ((self->provider.filter_type == IRLAN_MULTICAST) && 106 if ((self->provider.filter_type == IRLAN_MULTICAST) &&
107 (self->provider.filter_mode == FILTER)) 107 (self->provider.filter_mode == FILTER))
108 { 108 {
109 IRDA_DEBUG(0, "Multicast filter on\n"); 109 pr_debug("Multicast filter on\n");
110 skb->data[0] = 0x00; /* Success */ 110 skb->data[0] = 0x00; /* Success */
111 skb->data[1] = 0x00; 111 skb->data[1] = 0x00;
112 return; 112 return;
@@ -114,7 +114,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
114 if ((self->provider.filter_type == IRLAN_MULTICAST) && 114 if ((self->provider.filter_type == IRLAN_MULTICAST) &&
115 (self->provider.filter_mode == NONE)) 115 (self->provider.filter_mode == NONE))
116 { 116 {
117 IRDA_DEBUG(0, "Multicast filter off\n"); 117 pr_debug("Multicast filter off\n");
118 skb->data[0] = 0x00; /* Success */ 118 skb->data[0] = 0x00; /* Success */
119 skb->data[1] = 0x00; 119 skb->data[1] = 0x00;
120 return; 120 return;
@@ -122,7 +122,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
122 if ((self->provider.filter_type == IRLAN_MULTICAST) && 122 if ((self->provider.filter_type == IRLAN_MULTICAST) &&
123 (self->provider.filter_operation == GET)) 123 (self->provider.filter_operation == GET))
124 { 124 {
125 IRDA_DEBUG(0, "Multicast filter get\n"); 125 pr_debug("Multicast filter get\n");
126 skb->data[0] = 0x00; /* Success? */ 126 skb->data[0] = 0x00; /* Success? */
127 skb->data[1] = 0x02; 127 skb->data[1] = 0x02;
128 irlan_insert_string_param(skb, "FILTER_MODE", "NONE"); 128 irlan_insert_string_param(skb, "FILTER_MODE", "NONE");
@@ -132,7 +132,7 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
132 skb->data[0] = 0x00; /* Command not supported */ 132 skb->data[0] = 0x00; /* Command not supported */
133 skb->data[1] = 0x00; 133 skb->data[1] = 0x00;
134 134
135 IRDA_DEBUG(0, "Not implemented!\n"); 135 pr_debug("Not implemented!\n");
136} 136}
137 137
138/* 138/*
@@ -143,18 +143,15 @@ void irlan_filter_request(struct irlan_cb *self, struct sk_buff *skb)
143 */ 143 */
144void irlan_check_command_param(struct irlan_cb *self, char *param, char *value) 144void irlan_check_command_param(struct irlan_cb *self, char *param, char *value)
145{ 145{
146 IRDA_DEBUG(4, "%s()\n", __func__ );
147
148 IRDA_ASSERT(self != NULL, return;); 146 IRDA_ASSERT(self != NULL, return;);
149 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 147 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
150 148
151 IRDA_DEBUG(4, "%s, %s\n", param, value); 149 pr_debug("%s, %s\n", param, value);
152 150
153 /* 151 /*
154 * This is experimental!! DB. 152 * This is experimental!! DB.
155 */ 153 */
156 if (strcmp(param, "MODE") == 0) { 154 if (strcmp(param, "MODE") == 0) {
157 IRDA_DEBUG(0, "%s()\n", __func__ );
158 self->use_udata = TRUE; 155 self->use_udata = TRUE;
159 return; 156 return;
160 } 157 }
diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c
index 4664855222f4..15c292cf2644 100644
--- a/net/irda/irlan/irlan_provider.c
+++ b/net/irda/irlan/irlan_provider.c
@@ -70,8 +70,6 @@ static int irlan_provider_data_indication(void *instance, void *sap,
70 struct irlan_cb *self; 70 struct irlan_cb *self;
71 __u8 code; 71 __u8 code;
72 72
73 IRDA_DEBUG(4, "%s()\n", __func__ );
74
75 self = instance; 73 self = instance;
76 74
77 IRDA_ASSERT(self != NULL, return -1;); 75 IRDA_ASSERT(self != NULL, return -1;);
@@ -82,32 +80,32 @@ static int irlan_provider_data_indication(void *instance, void *sap,
82 code = skb->data[0]; 80 code = skb->data[0];
83 switch(code) { 81 switch(code) {
84 case CMD_GET_PROVIDER_INFO: 82 case CMD_GET_PROVIDER_INFO:
85 IRDA_DEBUG(4, "Got GET_PROVIDER_INFO command!\n"); 83 pr_debug("Got GET_PROVIDER_INFO command!\n");
86 irlan_do_provider_event(self, IRLAN_GET_INFO_CMD, skb); 84 irlan_do_provider_event(self, IRLAN_GET_INFO_CMD, skb);
87 break; 85 break;
88 86
89 case CMD_GET_MEDIA_CHAR: 87 case CMD_GET_MEDIA_CHAR:
90 IRDA_DEBUG(4, "Got GET_MEDIA_CHAR command!\n"); 88 pr_debug("Got GET_MEDIA_CHAR command!\n");
91 irlan_do_provider_event(self, IRLAN_GET_MEDIA_CMD, skb); 89 irlan_do_provider_event(self, IRLAN_GET_MEDIA_CMD, skb);
92 break; 90 break;
93 case CMD_OPEN_DATA_CHANNEL: 91 case CMD_OPEN_DATA_CHANNEL:
94 IRDA_DEBUG(4, "Got OPEN_DATA_CHANNEL command!\n"); 92 pr_debug("Got OPEN_DATA_CHANNEL command!\n");
95 irlan_do_provider_event(self, IRLAN_OPEN_DATA_CMD, skb); 93 irlan_do_provider_event(self, IRLAN_OPEN_DATA_CMD, skb);
96 break; 94 break;
97 case CMD_FILTER_OPERATION: 95 case CMD_FILTER_OPERATION:
98 IRDA_DEBUG(4, "Got FILTER_OPERATION command!\n"); 96 pr_debug("Got FILTER_OPERATION command!\n");
99 irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb); 97 irlan_do_provider_event(self, IRLAN_FILTER_CONFIG_CMD, skb);
100 break; 98 break;
101 case CMD_RECONNECT_DATA_CHAN: 99 case CMD_RECONNECT_DATA_CHAN:
102 IRDA_DEBUG(2, "%s(), Got RECONNECT_DATA_CHAN command\n", __func__ ); 100 pr_debug("%s(), Got RECONNECT_DATA_CHAN command\n", __func__);
103 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ ); 101 pr_debug("%s(), NOT IMPLEMENTED\n", __func__);
104 break; 102 break;
105 case CMD_CLOSE_DATA_CHAN: 103 case CMD_CLOSE_DATA_CHAN:
106 IRDA_DEBUG(2, "Got CLOSE_DATA_CHAN command!\n"); 104 pr_debug("Got CLOSE_DATA_CHAN command!\n");
107 IRDA_DEBUG(2, "%s(), NOT IMPLEMENTED\n", __func__ ); 105 pr_debug("%s(), NOT IMPLEMENTED\n", __func__);
108 break; 106 break;
109 default: 107 default:
110 IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ ); 108 pr_debug("%s(), Unknown command!\n", __func__);
111 break; 109 break;
112 } 110 }
113 return 0; 111 return 0;
@@ -128,8 +126,6 @@ static void irlan_provider_connect_indication(void *instance, void *sap,
128 struct irlan_cb *self; 126 struct irlan_cb *self;
129 struct tsap_cb *tsap; 127 struct tsap_cb *tsap;
130 128
131 IRDA_DEBUG(0, "%s()\n", __func__ );
132
133 self = instance; 129 self = instance;
134 tsap = sap; 130 tsap = sap;
135 131
@@ -179,7 +175,7 @@ static void irlan_provider_disconnect_indication(void *instance, void *sap,
179 struct irlan_cb *self; 175 struct irlan_cb *self;
180 struct tsap_cb *tsap; 176 struct tsap_cb *tsap;
181 177
182 IRDA_DEBUG(4, "%s(), reason=%d\n", __func__ , reason); 178 pr_debug("%s(), reason=%d\n", __func__ , reason);
183 179
184 self = instance; 180 self = instance;
185 tsap = sap; 181 tsap = sap;
@@ -233,7 +229,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
233 229
234 IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); 230 IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
235 231
236 IRDA_DEBUG(4, "%s(), skb->len=%d\n", __func__ , (int)skb->len); 232 pr_debug("%s(), skb->len=%d\n", __func__ , (int)skb->len);
237 233
238 IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;); 234 IRDA_ASSERT(self != NULL, return -RSP_PROTOCOL_ERROR;);
239 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;); 235 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -RSP_PROTOCOL_ERROR;);
@@ -255,7 +251,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
255 /* How many parameters? */ 251 /* How many parameters? */
256 count = frame[1]; 252 count = frame[1];
257 253
258 IRDA_DEBUG(4, "Got %d parameters\n", count); 254 pr_debug("Got %d parameters\n", count);
259 255
260 ptr = frame+2; 256 ptr = frame+2;
261 257
@@ -263,7 +259,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
263 for (i=0; i<count;i++) { 259 for (i=0; i<count;i++) {
264 ret = irlan_extract_param(ptr, name, value, &val_len); 260 ret = irlan_extract_param(ptr, name, value, &val_len);
265 if (ret < 0) { 261 if (ret < 0) {
266 IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __func__ ); 262 pr_debug("%s(), IrLAN, Error!\n", __func__);
267 break; 263 break;
268 } 264 }
269 ptr+=ret; 265 ptr+=ret;
@@ -288,8 +284,6 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
288{ 284{
289 struct sk_buff *skb; 285 struct sk_buff *skb;
290 286
291 IRDA_DEBUG(4, "%s()\n", __func__ );
292
293 IRDA_ASSERT(self != NULL, return;); 287 IRDA_ASSERT(self != NULL, return;);
294 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 288 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
295 289
@@ -320,7 +314,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
320 irlan_insert_string_param(skb, "MEDIA", "802.5"); 314 irlan_insert_string_param(skb, "MEDIA", "802.5");
321 break; 315 break;
322 default: 316 default:
323 IRDA_DEBUG(2, "%s(), unknown media type!\n", __func__ ); 317 pr_debug("%s(), unknown media type!\n", __func__);
324 break; 318 break;
325 } 319 }
326 irlan_insert_short_param(skb, "IRLAN_VER", 0x0101); 320 irlan_insert_short_param(skb, "IRLAN_VER", 0x0101);
@@ -344,7 +338,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
344 irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED"); 338 irlan_insert_string_param(skb, "ACCESS_TYPE", "HOSTED");
345 break; 339 break;
346 default: 340 default:
347 IRDA_DEBUG(2, "%s(), Unknown access type\n", __func__ ); 341 pr_debug("%s(), Unknown access type\n", __func__);
348 break; 342 break;
349 } 343 }
350 irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee); 344 irlan_insert_short_param(skb, "MAX_FRAME", 0x05ee);
@@ -364,7 +358,7 @@ void irlan_provider_send_reply(struct irlan_cb *self, int command,
364 irlan_filter_request(self, skb); 358 irlan_filter_request(self, skb);
365 break; 359 break;
366 default: 360 default:
367 IRDA_DEBUG(2, "%s(), Unknown command!\n", __func__ ); 361 pr_debug("%s(), Unknown command!\n", __func__);
368 break; 362 break;
369 } 363 }
370 364
@@ -382,8 +376,6 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
382 struct tsap_cb *tsap; 376 struct tsap_cb *tsap;
383 notify_t notify; 377 notify_t notify;
384 378
385 IRDA_DEBUG(4, "%s()\n", __func__ );
386
387 IRDA_ASSERT(self != NULL, return -1;); 379 IRDA_ASSERT(self != NULL, return -1;);
388 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
389 381
@@ -403,7 +395,7 @@ int irlan_provider_open_ctrl_tsap(struct irlan_cb *self)
403 395
404 tsap = irttp_open_tsap(LSAP_ANY, 1, &notify); 396 tsap = irttp_open_tsap(LSAP_ANY, 1, &notify);
405 if (!tsap) { 397 if (!tsap) {
406 IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); 398 pr_debug("%s(), Got no tsap!\n", __func__);
407 return -1; 399 return -1;
408 } 400 }
409 self->provider.tsap_ctrl = tsap; 401 self->provider.tsap_ctrl = tsap;
diff --git a/net/irda/irlan/irlan_provider_event.c b/net/irda/irlan/irlan_provider_event.c
index 01a9d7c993ee..9c4f7f51d6b5 100644
--- a/net/irda/irlan/irlan_provider_event.c
+++ b/net/irda/irlan/irlan_provider_event.c
@@ -72,8 +72,6 @@ void irlan_do_provider_event(struct irlan_cb *self, IRLAN_EVENT event,
72static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event, 72static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
73 struct sk_buff *skb) 73 struct sk_buff *skb)
74{ 74{
75 IRDA_DEBUG(4, "%s()\n", __func__ );
76
77 IRDA_ASSERT(self != NULL, return -1;); 75 IRDA_ASSERT(self != NULL, return -1;);
78 76
79 switch(event) { 77 switch(event) {
@@ -82,7 +80,7 @@ static int irlan_provider_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
82 irlan_next_provider_state( self, IRLAN_INFO); 80 irlan_next_provider_state( self, IRLAN_INFO);
83 break; 81 break;
84 default: 82 default:
85 IRDA_DEBUG(4, "%s(), Unknown event %d\n", __func__ , event); 83 pr_debug("%s(), Unknown event %d\n", __func__ , event);
86 break; 84 break;
87 } 85 }
88 if (skb) 86 if (skb)
@@ -101,8 +99,6 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
101{ 99{
102 int ret; 100 int ret;
103 101
104 IRDA_DEBUG(4, "%s()\n", __func__ );
105
106 IRDA_ASSERT(self != NULL, return -1;); 102 IRDA_ASSERT(self != NULL, return -1;);
107 103
108 switch(event) { 104 switch(event) {
@@ -147,7 +143,7 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
147 irlan_next_provider_state(self, IRLAN_IDLE); 143 irlan_next_provider_state(self, IRLAN_IDLE);
148 break; 144 break;
149 default: 145 default:
150 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event); 146 pr_debug("%s(), Unknown event %d\n", __func__ , event);
151 break; 147 break;
152 } 148 }
153 if (skb) 149 if (skb)
@@ -166,8 +162,6 @@ static int irlan_provider_state_info(struct irlan_cb *self, IRLAN_EVENT event,
166static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event, 162static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
167 struct sk_buff *skb) 163 struct sk_buff *skb)
168{ 164{
169 IRDA_DEBUG(4, "%s()\n", __func__ );
170
171 IRDA_ASSERT(self != NULL, return -1;); 165 IRDA_ASSERT(self != NULL, return -1;);
172 166
173 switch(event) { 167 switch(event) {
@@ -186,7 +180,7 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
186 irlan_next_provider_state(self, IRLAN_IDLE); 180 irlan_next_provider_state(self, IRLAN_IDLE);
187 break; 181 break;
188 default: 182 default:
189 IRDA_DEBUG(2, "%s(), Unknown event %d\n", __func__ , event); 183 pr_debug("%s(), Unknown event %d\n", __func__ , event);
190 break; 184 break;
191 } 185 }
192 if (skb) 186 if (skb)
@@ -205,8 +199,6 @@ static int irlan_provider_state_open(struct irlan_cb *self, IRLAN_EVENT event,
205static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event, 199static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
206 struct sk_buff *skb) 200 struct sk_buff *skb)
207{ 201{
208 IRDA_DEBUG(4, "%s()\n", __func__ );
209
210 IRDA_ASSERT(self != NULL, return -1;); 202 IRDA_ASSERT(self != NULL, return -1;);
211 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); 203 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;);
212 204
@@ -221,7 +213,7 @@ static int irlan_provider_state_data(struct irlan_cb *self, IRLAN_EVENT event,
221 irlan_next_provider_state(self, IRLAN_IDLE); 213 irlan_next_provider_state(self, IRLAN_IDLE);
222 break; 214 break;
223 default: 215 default:
224 IRDA_DEBUG( 0, "%s(), Unknown event %d\n", __func__ , event); 216 pr_debug("%s(), Unknown event %d\n", __func__ , event);
225 break; 217 break;
226 } 218 }
227 if (skb) 219 if (skb)
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index 2e3bc6ccf4b5..4b011b7aac80 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -111,8 +111,6 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
111{ 111{
112 struct irlap_cb *self; 112 struct irlap_cb *self;
113 113
114 IRDA_DEBUG(4, "%s()\n", __func__);
115
116 /* Initialize the irlap structure. */ 114 /* Initialize the irlap structure. */
117 self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL); 115 self = kzalloc(sizeof(struct irlap_cb), GFP_KERNEL);
118 if (self == NULL) 116 if (self == NULL)
@@ -213,8 +211,6 @@ void irlap_close(struct irlap_cb *self)
213{ 211{
214 struct irlap_cb *lap; 212 struct irlap_cb *lap;
215 213
216 IRDA_DEBUG(4, "%s()\n", __func__);
217
218 IRDA_ASSERT(self != NULL, return;); 214 IRDA_ASSERT(self != NULL, return;);
219 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 215 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
220 216
@@ -229,7 +225,7 @@ void irlap_close(struct irlap_cb *self)
229 /* Be sure that we manage to remove ourself from the hash */ 225 /* Be sure that we manage to remove ourself from the hash */
230 lap = hashbin_remove(irlap, self->saddr, NULL); 226 lap = hashbin_remove(irlap, self->saddr, NULL);
231 if (!lap) { 227 if (!lap) {
232 IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __func__); 228 pr_debug("%s(), Didn't find myself!\n", __func__);
233 return; 229 return;
234 } 230 }
235 __irlap_close(lap); 231 __irlap_close(lap);
@@ -244,8 +240,6 @@ EXPORT_SYMBOL(irlap_close);
244 */ 240 */
245void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) 241void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
246{ 242{
247 IRDA_DEBUG(4, "%s()\n", __func__);
248
249 IRDA_ASSERT(self != NULL, return;); 243 IRDA_ASSERT(self != NULL, return;);
250 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 244 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
251 245
@@ -263,8 +257,6 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
263 */ 257 */
264void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata) 258void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
265{ 259{
266 IRDA_DEBUG(4, "%s()\n", __func__);
267
268 irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL); 260 irlap_do_event(self, CONNECT_RESPONSE, userdata, NULL);
269} 261}
270 262
@@ -278,7 +270,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *userdata)
278void irlap_connect_request(struct irlap_cb *self, __u32 daddr, 270void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
279 struct qos_info *qos_user, int sniff) 271 struct qos_info *qos_user, int sniff)
280{ 272{
281 IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __func__, daddr); 273 pr_debug("%s(), daddr=0x%08x\n", __func__, daddr);
282 274
283 IRDA_ASSERT(self != NULL, return;); 275 IRDA_ASSERT(self != NULL, return;);
284 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 276 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -305,8 +297,6 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
305 */ 297 */
306void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) 298void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb)
307{ 299{
308 IRDA_DEBUG(4, "%s()\n", __func__);
309
310 IRDA_ASSERT(self != NULL, return;); 300 IRDA_ASSERT(self != NULL, return;);
311 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 301 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
312 302
@@ -342,8 +332,6 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
342 IRDA_ASSERT(self != NULL, return;); 332 IRDA_ASSERT(self != NULL, return;);
343 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 333 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
344 334
345 IRDA_DEBUG(3, "%s()\n", __func__);
346
347 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), 335 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
348 return;); 336 return;);
349 skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); 337 skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER);
@@ -389,8 +377,6 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
389 IRDA_ASSERT(self != NULL, return;); 377 IRDA_ASSERT(self != NULL, return;);
390 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 378 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
391 379
392 IRDA_DEBUG(3, "%s()\n", __func__);
393
394 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), 380 IRDA_ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
395 return;); 381 return;);
396 skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER); 382 skb_push(skb, LAP_ADDR_HEADER+LAP_CTRL_HEADER);
@@ -415,8 +401,6 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
415#ifdef CONFIG_IRDA_ULTRA 401#ifdef CONFIG_IRDA_ULTRA
416void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) 402void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
417{ 403{
418 IRDA_DEBUG(1, "%s()\n", __func__);
419
420 IRDA_ASSERT(self != NULL, return;); 404 IRDA_ASSERT(self != NULL, return;);
421 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 405 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
422 IRDA_ASSERT(skb != NULL, return;); 406 IRDA_ASSERT(skb != NULL, return;);
@@ -435,8 +419,6 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
435 */ 419 */
436void irlap_disconnect_request(struct irlap_cb *self) 420void irlap_disconnect_request(struct irlap_cb *self)
437{ 421{
438 IRDA_DEBUG(3, "%s()\n", __func__);
439
440 IRDA_ASSERT(self != NULL, return;); 422 IRDA_ASSERT(self != NULL, return;);
441 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 423 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
442 424
@@ -456,7 +438,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
456 irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); 438 irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
457 break; 439 break;
458 default: 440 default:
459 IRDA_DEBUG(2, "%s(), disconnect pending!\n", __func__); 441 pr_debug("%s(), disconnect pending!\n", __func__);
460 self->disconnect_pending = TRUE; 442 self->disconnect_pending = TRUE;
461 break; 443 break;
462 } 444 }
@@ -470,7 +452,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
470 */ 452 */
471void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) 453void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
472{ 454{
473 IRDA_DEBUG(1, "%s(), reason=%s\n", __func__, lap_reasons[reason]); 455 pr_debug("%s(), reason=%s\n", __func__, lap_reasons[reason]);
474 456
475 IRDA_ASSERT(self != NULL, return;); 457 IRDA_ASSERT(self != NULL, return;);
476 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 458 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -480,7 +462,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
480 462
481 switch (reason) { 463 switch (reason) {
482 case LAP_RESET_INDICATION: 464 case LAP_RESET_INDICATION:
483 IRDA_DEBUG(1, "%s(), Sending reset request!\n", __func__); 465 pr_debug("%s(), Sending reset request!\n", __func__);
484 irlap_do_event(self, RESET_REQUEST, NULL, NULL); 466 irlap_do_event(self, RESET_REQUEST, NULL, NULL);
485 break; 467 break;
486 case LAP_NO_RESPONSE: /* FALLTHROUGH */ 468 case LAP_NO_RESPONSE: /* FALLTHROUGH */
@@ -510,7 +492,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
510 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 492 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
511 IRDA_ASSERT(discovery != NULL, return;); 493 IRDA_ASSERT(discovery != NULL, return;);
512 494
513 IRDA_DEBUG(4, "%s(), nslots = %d\n", __func__, discovery->nslots); 495 pr_debug("%s(), nslots = %d\n", __func__, discovery->nslots);
514 496
515 IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || 497 IRDA_ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) ||
516 (discovery->nslots == 8) || (discovery->nslots == 16), 498 (discovery->nslots == 8) || (discovery->nslots == 16),
@@ -518,8 +500,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
518 500
519 /* Discovery is only possible in NDM mode */ 501 /* Discovery is only possible in NDM mode */
520 if (self->state != LAP_NDM) { 502 if (self->state != LAP_NDM) {
521 IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n", 503 pr_debug("%s(), discovery only possible in NDM mode\n",
522 __func__); 504 __func__);
523 irlap_discovery_confirm(self, NULL); 505 irlap_discovery_confirm(self, NULL);
524 /* Note : in theory, if we are not in NDM, we could postpone 506 /* Note : in theory, if we are not in NDM, we could postpone
525 * the discovery like we do for connection request. 507 * the discovery like we do for connection request.
@@ -597,8 +579,6 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log)
597 */ 579 */
598void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) 580void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
599{ 581{
600 IRDA_DEBUG(4, "%s()\n", __func__);
601
602 IRDA_ASSERT(self != NULL, return;); 582 IRDA_ASSERT(self != NULL, return;);
603 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 583 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
604 IRDA_ASSERT(discovery != NULL, return;); 584 IRDA_ASSERT(discovery != NULL, return;);
@@ -643,8 +623,6 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
643 */ 623 */
644void irlap_reset_indication(struct irlap_cb *self) 624void irlap_reset_indication(struct irlap_cb *self)
645{ 625{
646 IRDA_DEBUG(1, "%s()\n", __func__);
647
648 IRDA_ASSERT(self != NULL, return;); 626 IRDA_ASSERT(self != NULL, return;);
649 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 627 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
650 628
@@ -659,7 +637,6 @@ void irlap_reset_indication(struct irlap_cb *self)
659 */ 637 */
660void irlap_reset_confirm(void) 638void irlap_reset_confirm(void)
661{ 639{
662 IRDA_DEBUG(1, "%s()\n", __func__);
663} 640}
664 641
665/* 642/*
@@ -759,7 +736,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
759{ 736{
760 /* nr as expected? */ 737 /* nr as expected? */
761 if (nr == self->vs) { 738 if (nr == self->vs) {
762 IRDA_DEBUG(4, "%s(), expected!\n", __func__); 739 pr_debug("%s(), expected!\n", __func__);
763 return NR_EXPECTED; 740 return NR_EXPECTED;
764 } 741 }
765 742
@@ -787,8 +764,6 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
787 */ 764 */
788void irlap_initiate_connection_state(struct irlap_cb *self) 765void irlap_initiate_connection_state(struct irlap_cb *self)
789{ 766{
790 IRDA_DEBUG(4, "%s()\n", __func__);
791
792 IRDA_ASSERT(self != NULL, return;); 767 IRDA_ASSERT(self != NULL, return;);
793 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 768 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
794 769
@@ -870,7 +845,7 @@ static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
870{ 845{
871 struct sk_buff *skb; 846 struct sk_buff *skb;
872 847
873 IRDA_DEBUG(0, "%s(), setting speed to %d\n", __func__, speed); 848 pr_debug("%s(), setting speed to %d\n", __func__, speed);
874 849
875 IRDA_ASSERT(self != NULL, return;); 850 IRDA_ASSERT(self != NULL, return;);
876 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 851 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -913,7 +888,7 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
913 * user may not have set all of them. 888 * user may not have set all of them.
914 */ 889 */
915 if (qos_user) { 890 if (qos_user) {
916 IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __func__); 891 pr_debug("%s(), Found user specified QoS!\n", __func__);
917 892
918 if (qos_user->baud_rate.bits) 893 if (qos_user->baud_rate.bits)
919 self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; 894 self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
@@ -943,8 +918,6 @@ static void irlap_init_qos_capabilities(struct irlap_cb *self,
943 */ 918 */
944void irlap_apply_default_connection_parameters(struct irlap_cb *self) 919void irlap_apply_default_connection_parameters(struct irlap_cb *self)
945{ 920{
946 IRDA_DEBUG(4, "%s()\n", __func__);
947
948 IRDA_ASSERT(self != NULL, return;); 921 IRDA_ASSERT(self != NULL, return;);
949 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 922 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
950 923
@@ -1006,8 +979,6 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self)
1006 */ 979 */
1007void irlap_apply_connection_parameters(struct irlap_cb *self, int now) 980void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
1008{ 981{
1009 IRDA_DEBUG(4, "%s()\n", __func__);
1010
1011 IRDA_ASSERT(self != NULL, return;); 982 IRDA_ASSERT(self != NULL, return;);
1012 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 983 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
1013 984
@@ -1086,12 +1057,12 @@ void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
1086 self->N1 = sysctl_warn_noreply_time * 1000 / 1057 self->N1 = sysctl_warn_noreply_time * 1000 /
1087 self->qos_rx.max_turn_time.value; 1058 self->qos_rx.max_turn_time.value;
1088 1059
1089 IRDA_DEBUG(4, "Setting N1 = %d\n", self->N1); 1060 pr_debug("Setting N1 = %d\n", self->N1);
1090 1061
1091 /* Set N2 to match our own disconnect time */ 1062 /* Set N2 to match our own disconnect time */
1092 self->N2 = self->qos_tx.link_disc_time.value * 1000 / 1063 self->N2 = self->qos_tx.link_disc_time.value * 1000 /
1093 self->qos_rx.max_turn_time.value; 1064 self->qos_rx.max_turn_time.value;
1094 IRDA_DEBUG(4, "Setting N2 = %d\n", self->N2); 1065 pr_debug("Setting N2 = %d\n", self->N2);
1095} 1066}
1096 1067
1097#ifdef CONFIG_PROC_FS 1068#ifdef CONFIG_PROC_FS
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index 5f4a84eb35c7..245d87b42020 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -218,7 +218,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
218 } else 218 } else
219 self->fast_RR = FALSE; 219 self->fast_RR = FALSE;
220 220
221 IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies); 221 pr_debug("%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies);
222#endif /* CONFIG_IRDA_FAST_RR */ 222#endif /* CONFIG_IRDA_FAST_RR */
223 223
224 if (timeout == 0) 224 if (timeout == 0)
@@ -242,8 +242,8 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
242 if (!self || self->magic != LAP_MAGIC) 242 if (!self || self->magic != LAP_MAGIC)
243 return; 243 return;
244 244
245 IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__, 245 pr_debug("%s(), event = %s, state = %s\n", __func__,
246 irlap_event[event], irlap_state[self->state]); 246 irlap_event[event], irlap_state[self->state]);
247 247
248 ret = (*state[self->state])(self, event, skb, info); 248 ret = (*state[self->state])(self, event, skb, info);
249 249
@@ -260,8 +260,8 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
260 * try to disconnect link if we send any data frames, since 260 * try to disconnect link if we send any data frames, since
261 * that will change the state away form XMIT 261 * that will change the state away form XMIT
262 */ 262 */
263 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, 263 pr_debug("%s() : queue len = %d\n", __func__,
264 skb_queue_len(&self->txq)); 264 skb_queue_len(&self->txq));
265 265
266 if (!skb_queue_empty(&self->txq)) { 266 if (!skb_queue_empty(&self->txq)) {
267 /* Prevent race conditions with irlap_data_request() */ 267 /* Prevent race conditions with irlap_data_request() */
@@ -340,8 +340,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
340 /* Note : this will never happen, because we test 340 /* Note : this will never happen, because we test
341 * media busy in irlap_connect_request() and 341 * media busy in irlap_connect_request() and
342 * postpone the event... - Jean II */ 342 * postpone the event... - Jean II */
343 IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", 343 pr_debug("%s(), CONNECT_REQUEST: media busy!\n",
344 __func__); 344 __func__);
345 345
346 /* Always switch state before calling upper layers */ 346 /* Always switch state before calling upper layers */
347 irlap_next_state(self, LAP_NDM); 347 irlap_next_state(self, LAP_NDM);
@@ -367,16 +367,16 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
367 367
368 irlap_connect_indication(self, skb); 368 irlap_connect_indication(self, skb);
369 } else { 369 } else {
370 IRDA_DEBUG(0, "%s(), SNRM frame does not " 370 pr_debug("%s(), SNRM frame does not contain an I field!\n",
371 "contain an I field!\n", __func__); 371 __func__);
372 } 372 }
373 break; 373 break;
374 case DISCOVERY_REQUEST: 374 case DISCOVERY_REQUEST:
375 IRDA_ASSERT(info != NULL, return -1;); 375 IRDA_ASSERT(info != NULL, return -1;);
376 376
377 if (self->media_busy) { 377 if (self->media_busy) {
378 IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", 378 pr_debug("%s(), DISCOVERY_REQUEST: media busy!\n",
379 __func__); 379 __func__);
380 /* irlap->log.condition = MEDIA_BUSY; */ 380 /* irlap->log.condition = MEDIA_BUSY; */
381 381
382 /* This will make IrLMP try again */ 382 /* This will make IrLMP try again */
@@ -442,7 +442,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
442 * those cases... 442 * those cases...
443 * Jean II 443 * Jean II
444 */ 444 */
445 IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__); 445 pr_debug("%s(), Receiving final discovery request, missed the discovery slots :-(\n",
446 __func__);
446 447
447 /* Last discovery request -> in the log */ 448 /* Last discovery request -> in the log */
448 irlap_discovery_indication(self, info->discovery); 449 irlap_discovery_indication(self, info->discovery);
@@ -520,8 +521,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
520 case RECV_UI_FRAME: 521 case RECV_UI_FRAME:
521 /* Only accept broadcast frames in NDM mode */ 522 /* Only accept broadcast frames in NDM mode */
522 if (info->caddr != CBROADCAST) { 523 if (info->caddr != CBROADCAST) {
523 IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", 524 pr_debug("%s(), not a broadcast frame!\n",
524 __func__); 525 __func__);
525 } else 526 } else
526 irlap_unitdata_indication(self, skb); 527 irlap_unitdata_indication(self, skb);
527 break; 528 break;
@@ -537,11 +538,11 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
537 irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); 538 irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
538 break; 539 break;
539 case RECV_TEST_RSP: 540 case RECV_TEST_RSP:
540 IRDA_DEBUG(0, "%s() not implemented!\n", __func__); 541 pr_debug("%s() not implemented!\n", __func__);
541 break; 542 break;
542 default: 543 default:
543 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, 544 pr_debug("%s(), Unknown event %s\n", __func__,
544 irlap_event[event]); 545 irlap_event[event]);
545 546
546 ret = -1; 547 ret = -1;
547 break; 548 break;
@@ -568,8 +569,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
568 IRDA_ASSERT(info != NULL, return -1;); 569 IRDA_ASSERT(info != NULL, return -1;);
569 IRDA_ASSERT(info->discovery != NULL, return -1;); 570 IRDA_ASSERT(info->discovery != NULL, return -1;);
570 571
571 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__, 572 pr_debug("%s(), daddr=%08x\n", __func__,
572 info->discovery->data.daddr); 573 info->discovery->data.daddr);
573 574
574 if (!self->discovery_log) { 575 if (!self->discovery_log) {
575 net_warn_ratelimited("%s: discovery log is gone! maybe the discovery timeout has been set too short?\n", 576 net_warn_ratelimited("%s: discovery log is gone! maybe the discovery timeout has been set too short?\n",
@@ -598,7 +599,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
598 599
599 IRDA_ASSERT(info != NULL, return -1;); 600 IRDA_ASSERT(info != NULL, return -1;);
600 601
601 IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s); 602 pr_debug("%s(), Receiving discovery request (s = %d) while performing discovery :-(\n",
603 __func__, info->s);
602 604
603 /* Last discovery request ? */ 605 /* Last discovery request ? */
604 if (info->s == 0xff) 606 if (info->s == 0xff)
@@ -612,8 +614,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
612 * timing requirements. 614 * timing requirements.
613 */ 615 */
614 if (irda_device_is_receiving(self->netdev) && !self->add_wait) { 616 if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
615 IRDA_DEBUG(2, "%s(), device is slow to answer, " 617 pr_debug("%s(), device is slow to answer, waiting some more!\n",
616 "waiting some more!\n", __func__); 618 __func__);
617 irlap_start_slot_timer(self, msecs_to_jiffies(10)); 619 irlap_start_slot_timer(self, msecs_to_jiffies(10));
618 self->add_wait = TRUE; 620 self->add_wait = TRUE;
619 return ret; 621 return ret;
@@ -649,8 +651,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
649 } 651 }
650 break; 652 break;
651 default: 653 default:
652 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, 654 pr_debug("%s(), Unknown event %s\n", __func__,
653 irlap_event[event]); 655 irlap_event[event]);
654 656
655 ret = -1; 657 ret = -1;
656 break; 658 break;
@@ -671,15 +673,13 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
671 discovery_t *discovery_rsp; 673 discovery_t *discovery_rsp;
672 int ret=0; 674 int ret=0;
673 675
674 IRDA_DEBUG(4, "%s()\n", __func__);
675
676 IRDA_ASSERT(self != NULL, return -1;); 676 IRDA_ASSERT(self != NULL, return -1;);
677 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 677 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
678 678
679 switch (event) { 679 switch (event) {
680 case QUERY_TIMER_EXPIRED: 680 case QUERY_TIMER_EXPIRED:
681 IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", 681 pr_debug("%s(), QUERY_TIMER_EXPIRED <%ld>\n",
682 __func__, jiffies); 682 __func__, jiffies);
683 irlap_next_state(self, LAP_NDM); 683 irlap_next_state(self, LAP_NDM);
684 break; 684 break;
685 case RECV_DISCOVERY_XID_CMD: 685 case RECV_DISCOVERY_XID_CMD:
@@ -717,8 +717,8 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
717 } 717 }
718 break; 718 break;
719 default: 719 default:
720 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, 720 pr_debug("%s(), Unknown event %d, %s\n", __func__,
721 event, irlap_event[event]); 721 event, irlap_event[event]);
722 722
723 ret = -1; 723 ret = -1;
724 break; 724 break;
@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
738{ 738{
739 int ret = 0; 739 int ret = 0;
740 740
741 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); 741 pr_debug("%s(), event=%s\n", __func__, irlap_event[event]);
742 742
743 IRDA_ASSERT(self != NULL, return -1;); 743 IRDA_ASSERT(self != NULL, return -1;);
744 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 744 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -798,20 +798,20 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
798 798
799 break; 799 break;
800 case RECV_DISCOVERY_XID_CMD: 800 case RECV_DISCOVERY_XID_CMD:
801 IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", 801 pr_debug("%s(), event RECV_DISCOVER_XID_CMD!\n",
802 __func__); 802 __func__);
803 irlap_next_state(self, LAP_NDM); 803 irlap_next_state(self, LAP_NDM);
804 804
805 break; 805 break;
806 case DISCONNECT_REQUEST: 806 case DISCONNECT_REQUEST:
807 IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__); 807 pr_debug("%s(), Disconnect request!\n", __func__);
808 irlap_send_dm_frame(self); 808 irlap_send_dm_frame(self);
809 irlap_next_state( self, LAP_NDM); 809 irlap_next_state( self, LAP_NDM);
810 irlap_disconnect_indication(self, LAP_DISC_INDICATION); 810 irlap_disconnect_indication(self, LAP_DISC_INDICATION);
811 break; 811 break;
812 default: 812 default:
813 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, 813 pr_debug("%s(), Unknown event %d, %s\n", __func__,
814 event, irlap_event[event]); 814 event, irlap_event[event]);
815 815
816 ret = -1; 816 ret = -1;
817 break; 817 break;
@@ -832,8 +832,6 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
832{ 832{
833 int ret = 0; 833 int ret = 0;
834 834
835 IRDA_DEBUG(4, "%s()\n", __func__);
836
837 IRDA_ASSERT(self != NULL, return -1;); 835 IRDA_ASSERT(self != NULL, return -1;);
838 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 836 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
839 837
@@ -861,7 +859,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
861 self->retry_count++; 859 self->retry_count++;
862 break; 860 break;
863 case RECV_SNRM_CMD: 861 case RECV_SNRM_CMD:
864 IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__); 862 pr_debug("%s(), SNRM battle!\n", __func__);
865 863
866 IRDA_ASSERT(skb != NULL, return 0;); 864 IRDA_ASSERT(skb != NULL, return 0;);
867 IRDA_ASSERT(info != NULL, return 0;); 865 IRDA_ASSERT(info != NULL, return 0;);
@@ -948,8 +946,8 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
948 irlap_disconnect_indication(self, LAP_DISC_INDICATION); 946 irlap_disconnect_indication(self, LAP_DISC_INDICATION);
949 break; 947 break;
950 default: 948 default:
951 IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, 949 pr_debug("%s(), Unknown event %d, %s\n", __func__,
952 event, irlap_event[event]); 950 event, irlap_event[event]);
953 951
954 ret = -1; 952 ret = -1;
955 break; 953 break;
@@ -966,7 +964,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
966static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, 964static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
967 struct sk_buff *skb, struct irlap_info *info) 965 struct sk_buff *skb, struct irlap_info *info)
968{ 966{
969 IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__); 967 pr_debug("%s(), Unknown event\n", __func__);
970 968
971 return -1; 969 return -1;
972} 970}
@@ -1029,8 +1027,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1029 * speed and turn-around-time. 1027 * speed and turn-around-time.
1030 */ 1028 */
1031 if((!nextfit) && (skb->len > self->bytes_left)) { 1029 if((!nextfit) && (skb->len > self->bytes_left)) {
1032 IRDA_DEBUG(0, "%s(), Not allowed to transmit" 1030 pr_debug("%s(), Not allowed to transmit more bytes!\n",
1033 " more bytes!\n", __func__); 1031 __func__);
1034 /* Requeue the skb */ 1032 /* Requeue the skb */
1035 skb_queue_head(&self->txq, skb_get(skb)); 1033 skb_queue_head(&self->txq, skb_get(skb));
1036 /* 1034 /*
@@ -1081,8 +1079,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1081 self->fast_RR = FALSE; 1079 self->fast_RR = FALSE;
1082#endif /* CONFIG_IRDA_FAST_RR */ 1080#endif /* CONFIG_IRDA_FAST_RR */
1083 } else { 1081 } else {
1084 IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", 1082 pr_debug("%s(), Unable to send! remote busy?\n",
1085 __func__); 1083 __func__);
1086 skb_queue_head(&self->txq, skb_get(skb)); 1084 skb_queue_head(&self->txq, skb_get(skb));
1087 1085
1088 /* 1086 /*
@@ -1093,8 +1091,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1093 } 1091 }
1094 break; 1092 break;
1095 case POLL_TIMER_EXPIRED: 1093 case POLL_TIMER_EXPIRED:
1096 IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", 1094 pr_debug("%s(), POLL_TIMER_EXPIRED <%ld>\n",
1097 __func__, jiffies); 1095 __func__, jiffies);
1098 irlap_send_rr_frame(self, CMD_FRAME); 1096 irlap_send_rr_frame(self, CMD_FRAME);
1099 /* Return to NRM properly - Jean II */ 1097 /* Return to NRM properly - Jean II */
1100 self->window = self->window_size; 1098 self->window = self->window_size;
@@ -1119,8 +1117,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
1119 * when we return... - Jean II */ 1117 * when we return... - Jean II */
1120 break; 1118 break;
1121 default: 1119 default:
1122 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 1120 pr_debug("%s(), Unknown event %s\n",
1123 __func__, irlap_event[event]); 1121 __func__, irlap_event[event]);
1124 1122
1125 ret = -EINVAL; 1123 ret = -EINVAL;
1126 break; 1124 break;
@@ -1138,8 +1136,6 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
1138{ 1136{
1139 int ret = 0; 1137 int ret = 0;
1140 1138
1141 IRDA_DEBUG(1, "%s()\n", __func__);
1142
1143 IRDA_ASSERT(self != NULL, return -1;); 1139 IRDA_ASSERT(self != NULL, return -1;);
1144 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1140 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
1145 1141
@@ -1173,7 +1169,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
1173 } 1169 }
1174 break; 1170 break;
1175 default: 1171 default:
1176 IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event); 1172 pr_debug("%s(), Unknown event %d\n", __func__, event);
1177 1173
1178 ret = -1; 1174 ret = -1;
1179 break; 1175 break;
@@ -1295,9 +1291,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1295 /* Keep state */ 1291 /* Keep state */
1296 irlap_next_state(self, LAP_NRM_P); 1292 irlap_next_state(self, LAP_NRM_P);
1297 } else { 1293 } else {
1298 IRDA_DEBUG(4, 1294 pr_debug("%s(), missing or duplicate frame!\n",
1299 "%s(), missing or duplicate frame!\n", 1295 __func__);
1300 __func__);
1301 1296
1302 /* Update Nr received */ 1297 /* Update Nr received */
1303 irlap_update_nr_received(self, info->nr); 1298 irlap_update_nr_received(self, info->nr);
@@ -1366,8 +1361,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1366 if ((ns_status == NS_UNEXPECTED) && 1361 if ((ns_status == NS_UNEXPECTED) &&
1367 (nr_status == NR_UNEXPECTED)) 1362 (nr_status == NR_UNEXPECTED))
1368 { 1363 {
1369 IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", 1364 pr_debug("%s(), unexpected nr and ns!\n",
1370 __func__); 1365 __func__);
1371 if (info->pf) { 1366 if (info->pf) {
1372 /* Resend rejected frames */ 1367 /* Resend rejected frames */
1373 irlap_resend_rejected_frames(self, CMD_FRAME); 1368 irlap_resend_rejected_frames(self, CMD_FRAME);
@@ -1407,9 +1402,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1407 } 1402 }
1408 break; 1403 break;
1409 } 1404 }
1410 IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__); 1405 pr_debug("%s(), Not implemented!\n", __func__);
1411 IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", 1406 pr_debug("%s(), event=%s, ns_status=%d, nr_status=%d\n",
1412 __func__, irlap_event[event], ns_status, nr_status); 1407 __func__, irlap_event[event], ns_status, nr_status);
1413 break; 1408 break;
1414 case RECV_UI_FRAME: 1409 case RECV_UI_FRAME:
1415 /* Poll bit cleared? */ 1410 /* Poll bit cleared? */
@@ -1420,7 +1415,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1420 del_timer(&self->final_timer); 1415 del_timer(&self->final_timer);
1421 irlap_data_indication(self, skb, TRUE); 1416 irlap_data_indication(self, skb, TRUE);
1422 irlap_next_state(self, LAP_XMIT_P); 1417 irlap_next_state(self, LAP_XMIT_P);
1423 IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]); 1418 pr_debug("%s: RECV_UI_FRAME: next state %s\n",
1419 __func__, irlap_state[self->state]);
1424 irlap_start_poll_timer(self, self->poll_timeout); 1420 irlap_start_poll_timer(self, self->poll_timeout);
1425 } 1421 }
1426 break; 1422 break;
@@ -1463,10 +1459,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1463 /* Update Nr received */ 1459 /* Update Nr received */
1464 irlap_update_nr_received(self, info->nr); 1460 irlap_update_nr_received(self, info->nr);
1465 1461
1466 IRDA_DEBUG(4, "RECV_RR_FRAME: Retrans:%d, nr=%d, va=%d, " 1462 pr_debug("RECV_RR_FRAME: Retrans:%d, nr=%d, va=%d, vs=%d, vr=%d\n",
1467 "vs=%d, vr=%d\n", 1463 self->retry_count, info->nr, self->va,
1468 self->retry_count, info->nr, self->va, 1464 self->vs, self->vr);
1469 self->vs, self->vr);
1470 1465
1471 /* Resend rejected frames */ 1466 /* Resend rejected frames */
1472 irlap_resend_rejected_frames(self, CMD_FRAME); 1467 irlap_resend_rejected_frames(self, CMD_FRAME);
@@ -1474,8 +1469,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1474 1469
1475 irlap_next_state(self, LAP_NRM_P); 1470 irlap_next_state(self, LAP_NRM_P);
1476 } else if (ret == NR_INVALID) { 1471 } else if (ret == NR_INVALID) {
1477 IRDA_DEBUG(1, "%s(), Received RR with " 1472 pr_debug("%s(), Received RR with invalid nr !\n",
1478 "invalid nr !\n", __func__); 1473 __func__);
1479 1474
1480 irlap_next_state(self, LAP_RESET_WAIT); 1475 irlap_next_state(self, LAP_RESET_WAIT);
1481 1476
@@ -1511,8 +1506,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1511 * we only do this once for each frame. 1506 * we only do this once for each frame.
1512 */ 1507 */
1513 if (irda_device_is_receiving(self->netdev) && !self->add_wait) { 1508 if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
1514 IRDA_DEBUG(1, "FINAL_TIMER_EXPIRED when receiving a " 1509 pr_debug("FINAL_TIMER_EXPIRED when receiving a frame! Waiting a little bit more!\n");
1515 "frame! Waiting a little bit more!\n");
1516 irlap_start_final_timer(self, msecs_to_jiffies(300)); 1510 irlap_start_final_timer(self, msecs_to_jiffies(300));
1517 1511
1518 /* 1512 /*
@@ -1529,18 +1523,18 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1529 if (self->retry_count < self->N2) { 1523 if (self->retry_count < self->N2) {
1530 if (skb_peek(&self->wx_list) == NULL) { 1524 if (skb_peek(&self->wx_list) == NULL) {
1531 /* Retry sending the pf bit to the secondary */ 1525 /* Retry sending the pf bit to the secondary */
1532 IRDA_DEBUG(4, "nrm_p: resending rr"); 1526 pr_debug("nrm_p: resending rr");
1533 irlap_wait_min_turn_around(self, &self->qos_tx); 1527 irlap_wait_min_turn_around(self, &self->qos_tx);
1534 irlap_send_rr_frame(self, CMD_FRAME); 1528 irlap_send_rr_frame(self, CMD_FRAME);
1535 } else { 1529 } else {
1536 IRDA_DEBUG(4, "nrm_p: resend frames"); 1530 pr_debug("nrm_p: resend frames");
1537 irlap_resend_rejected_frames(self, CMD_FRAME); 1531 irlap_resend_rejected_frames(self, CMD_FRAME);
1538 } 1532 }
1539 1533
1540 irlap_start_final_timer(self, self->final_timeout); 1534 irlap_start_final_timer(self, self->final_timeout);
1541 self->retry_count++; 1535 self->retry_count++;
1542 IRDA_DEBUG(4, "irlap_state_nrm_p: FINAL_TIMER_EXPIRED:" 1536 pr_debug("irlap_state_nrm_p: FINAL_TIMER_EXPIRED: retry_count=%d\n",
1543 " retry_count=%d\n", self->retry_count); 1537 self->retry_count);
1544 1538
1545 /* Early warning event. I'm using a pretty liberal 1539 /* Early warning event. I'm using a pretty liberal
1546 * interpretation of the spec and generate an event 1540 * interpretation of the spec and generate an event
@@ -1580,7 +1574,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1580 irlap_start_final_timer(self, 2 * self->final_timeout); 1574 irlap_start_final_timer(self, 2 * self->final_timeout);
1581 break; 1575 break;
1582 case RECV_RD_RSP: 1576 case RECV_RD_RSP:
1583 IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__); 1577 pr_debug("%s(), RECV_RD_RSP\n", __func__);
1584 1578
1585 irlap_flush_all_queues(self); 1579 irlap_flush_all_queues(self);
1586 irlap_next_state(self, LAP_XMIT_P); 1580 irlap_next_state(self, LAP_XMIT_P);
@@ -1588,8 +1582,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
1588 irlap_disconnect_request(self); 1582 irlap_disconnect_request(self);
1589 break; 1583 break;
1590 default: 1584 default:
1591 IRDA_DEBUG(1, "%s(), Unknown event %s\n", 1585 pr_debug("%s(), Unknown event %s\n",
1592 __func__, irlap_event[event]); 1586 __func__, irlap_event[event]);
1593 1587
1594 ret = -1; 1588 ret = -1;
1595 break; 1589 break;
@@ -1609,7 +1603,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
1609{ 1603{
1610 int ret = 0; 1604 int ret = 0;
1611 1605
1612 IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); 1606 pr_debug("%s(), event = %s\n", __func__, irlap_event[event]);
1613 1607
1614 IRDA_ASSERT(self != NULL, return -1;); 1608 IRDA_ASSERT(self != NULL, return -1;);
1615 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1609 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1635,8 +1629,8 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
1635 irlap_next_state( self, LAP_PCLOSE); 1629 irlap_next_state( self, LAP_PCLOSE);
1636 break; 1630 break;
1637 default: 1631 default:
1638 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, 1632 pr_debug("%s(), Unknown event %s\n", __func__,
1639 irlap_event[event]); 1633 irlap_event[event]);
1640 1634
1641 ret = -1; 1635 ret = -1;
1642 break; 1636 break;
@@ -1656,7 +1650,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1656{ 1650{
1657 int ret = 0; 1651 int ret = 0;
1658 1652
1659 IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); 1653 pr_debug("%s(), event = %s\n", __func__, irlap_event[event]);
1660 1654
1661 IRDA_ASSERT(self != NULL, return -1;); 1655 IRDA_ASSERT(self != NULL, return -1;);
1662 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1656 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1714,7 +1708,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1714 * state 1708 * state
1715 */ 1709 */
1716 if (!info) { 1710 if (!info) {
1717 IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__); 1711 pr_debug("%s(), RECV_SNRM_CMD\n", __func__);
1718 irlap_initiate_connection_state(self); 1712 irlap_initiate_connection_state(self);
1719 irlap_wait_min_turn_around(self, &self->qos_tx); 1713 irlap_wait_min_turn_around(self, &self->qos_tx);
1720 irlap_send_ua_response_frame(self, &self->qos_rx); 1714 irlap_send_ua_response_frame(self, &self->qos_rx);
@@ -1722,14 +1716,13 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
1722 irlap_start_wd_timer(self, self->wd_timeout); 1716 irlap_start_wd_timer(self, self->wd_timeout);
1723 irlap_next_state(self, LAP_NDM); 1717 irlap_next_state(self, LAP_NDM);
1724 } else { 1718 } else {
1725 IRDA_DEBUG(0, 1719 pr_debug("%s(), SNRM frame contained an I field!\n",
1726 "%s(), SNRM frame contained an I field!\n", 1720 __func__);
1727 __func__);
1728 } 1721 }
1729 break; 1722 break;
1730 default: 1723 default:
1731 IRDA_DEBUG(1, "%s(), Unknown event %s\n", 1724 pr_debug("%s(), Unknown event %s\n",
1732 __func__, irlap_event[event]); 1725 __func__, irlap_event[event]);
1733 1726
1734 ret = -1; 1727 ret = -1;
1735 break; 1728 break;
@@ -1749,7 +1742,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1749{ 1742{
1750 int ret = 0; 1743 int ret = 0;
1751 1744
1752 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]); 1745 pr_debug("%s(), event=%s\n", __func__, irlap_event[event]);
1753 1746
1754 IRDA_ASSERT(self != NULL, return -ENODEV;); 1747 IRDA_ASSERT(self != NULL, return -ENODEV;);
1755 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 1748 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -1785,8 +1778,8 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1785 * speed and turn-around-time. 1778 * speed and turn-around-time.
1786 */ 1779 */
1787 if((!nextfit) && (skb->len > self->bytes_left)) { 1780 if((!nextfit) && (skb->len > self->bytes_left)) {
1788 IRDA_DEBUG(0, "%s(), Not allowed to transmit" 1781 pr_debug("%s(), Not allowed to transmit more bytes!\n",
1789 " more bytes!\n", __func__); 1782 __func__);
1790 /* Requeue the skb */ 1783 /* Requeue the skb */
1791 skb_queue_head(&self->txq, skb_get(skb)); 1784 skb_queue_head(&self->txq, skb_get(skb));
1792 1785
@@ -1832,7 +1825,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1832 ret = -EPROTO; 1825 ret = -EPROTO;
1833 } 1826 }
1834 } else { 1827 } else {
1835 IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__); 1828 pr_debug("%s(), Unable to send!\n", __func__);
1836 skb_queue_head(&self->txq, skb_get(skb)); 1829 skb_queue_head(&self->txq, skb_get(skb));
1837 ret = -EPROTO; 1830 ret = -EPROTO;
1838 } 1831 }
@@ -1848,8 +1841,8 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
1848 * when we return... - Jean II */ 1841 * when we return... - Jean II */
1849 break; 1842 break;
1850 default: 1843 default:
1851 IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, 1844 pr_debug("%s(), Unknown event %s\n", __func__,
1852 irlap_event[event]); 1845 irlap_event[event]);
1853 1846
1854 ret = -EINVAL; 1847 ret = -EINVAL;
1855 break; 1848 break;
@@ -1871,7 +1864,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
1871 int nr_status; 1864 int nr_status;
1872 int ret = 0; 1865 int ret = 0;
1873 1866
1874 IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); 1867 pr_debug("%s(), event=%s\n", __func__, irlap_event[event]);
1875 1868
1876 IRDA_ASSERT(self != NULL, return -1;); 1869 IRDA_ASSERT(self != NULL, return -1;);
1877 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); 1870 IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;);
@@ -1879,10 +1872,9 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
1879 switch (event) { 1872 switch (event) {
1880 case RECV_I_CMD: /* Optimize for the common case */ 1873 case RECV_I_CMD: /* Optimize for the common case */
1881 /* FIXME: must check for remote_busy below */ 1874 /* FIXME: must check for remote_busy below */
1882 IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " 1875 pr_debug("%s(), event=%s nr=%d, vs=%d, ns=%d, vr=%d, pf=%d\n",
1883 "vr=%d, pf=%d\n", __func__, 1876 __func__, irlap_event[event], info->nr,
1884 irlap_event[event], info->nr, 1877 self->vs, info->ns, self->vr, info->pf);
1885 self->vs, info->ns, self->vr, info->pf);
1886 1878
1887 self->retry_count = 0; 1879 self->retry_count = 0;
1888 1880
@@ -1982,7 +1974,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
1982 if ((ns_status == NS_EXPECTED) && (nr_status == NR_UNEXPECTED)) 1974 if ((ns_status == NS_EXPECTED) && (nr_status == NR_UNEXPECTED))
1983 { 1975 {
1984 if (info->pf) { 1976 if (info->pf) {
1985 IRDA_DEBUG(4, "RECV_I_RSP: frame(s) lost\n"); 1977 pr_debug("RECV_I_RSP: frame(s) lost\n");
1986 1978
1987 self->vr = (self->vr + 1) % 8; 1979 self->vr = (self->vr + 1) % 8;
1988 1980
@@ -2019,10 +2011,10 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2019 } 2011 }
2020 2012
2021 if (ret == NR_INVALID) { 2013 if (ret == NR_INVALID) {
2022 IRDA_DEBUG(0, "NRM_S, NR_INVALID not implemented!\n"); 2014 pr_debug("NRM_S, NR_INVALID not implemented!\n");
2023 } 2015 }
2024 if (ret == NS_INVALID) { 2016 if (ret == NS_INVALID) {
2025 IRDA_DEBUG(0, "NRM_S, NS_INVALID not implemented!\n"); 2017 pr_debug("NRM_S, NS_INVALID not implemented!\n");
2026 } 2018 }
2027 break; 2019 break;
2028 case RECV_UI_FRAME: 2020 case RECV_UI_FRAME:
@@ -2111,22 +2103,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2111 /* Keep state */ 2103 /* Keep state */
2112 irlap_next_state(self, LAP_NRM_S); 2104 irlap_next_state(self, LAP_NRM_S);
2113 } else { 2105 } else {
2114 IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", 2106 pr_debug("%s(), invalid nr not implemented!\n",
2115 __func__); 2107 __func__);
2116 } 2108 }
2117 break; 2109 break;
2118 case RECV_SNRM_CMD: 2110 case RECV_SNRM_CMD:
2119 /* SNRM frame is not allowed to contain an I-field */ 2111 /* SNRM frame is not allowed to contain an I-field */
2120 if (!info) { 2112 if (!info) {
2121 del_timer(&self->wd_timer); 2113 del_timer(&self->wd_timer);
2122 IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__); 2114 pr_debug("%s(), received SNRM cmd\n", __func__);
2123 irlap_next_state(self, LAP_RESET_CHECK); 2115 irlap_next_state(self, LAP_RESET_CHECK);
2124 2116
2125 irlap_reset_indication(self); 2117 irlap_reset_indication(self);
2126 } else { 2118 } else {
2127 IRDA_DEBUG(0, 2119 pr_debug("%s(), SNRM frame contained an I-field!\n",
2128 "%s(), SNRM frame contained an I-field!\n", 2120 __func__);
2129 __func__);
2130 2121
2131 } 2122 }
2132 break; 2123 break;
@@ -2158,8 +2149,8 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2158 * which explain why we use (self->N2 / 2) here !!! 2149 * which explain why we use (self->N2 / 2) here !!!
2159 * Jean II 2150 * Jean II
2160 */ 2151 */
2161 IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__, 2152 pr_debug("%s(), retry_count = %d\n", __func__,
2162 self->retry_count); 2153 self->retry_count);
2163 2154
2164 if (self->retry_count < (self->N2 / 2)) { 2155 if (self->retry_count < (self->N2 / 2)) {
2165 /* No retry, just wait for primary */ 2156 /* No retry, just wait for primary */
@@ -2211,8 +2202,8 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2211 irlap_send_test_frame(self, self->caddr, info->daddr, skb); 2202 irlap_send_test_frame(self, self->caddr, info->daddr, skb);
2212 break; 2203 break;
2213 default: 2204 default:
2214 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, 2205 pr_debug("%s(), Unknown event %d, (%s)\n", __func__,
2215 event, irlap_event[event]); 2206 event, irlap_event[event]);
2216 2207
2217 ret = -EINVAL; 2208 ret = -EINVAL;
2218 break; 2209 break;
@@ -2226,8 +2217,6 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
2226static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, 2217static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
2227 struct sk_buff *skb, struct irlap_info *info) 2218 struct sk_buff *skb, struct irlap_info *info)
2228{ 2219{
2229 IRDA_DEBUG(1, "%s()\n", __func__);
2230
2231 IRDA_ASSERT(self != NULL, return -ENODEV;); 2220 IRDA_ASSERT(self != NULL, return -ENODEV;);
2232 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 2221 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
2233 2222
@@ -2283,8 +2272,8 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
2283 break; /* stay in SCLOSE */ 2272 break; /* stay in SCLOSE */
2284 } 2273 }
2285 2274
2286 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, 2275 pr_debug("%s(), Unknown event %d, (%s)\n", __func__,
2287 event, irlap_event[event]); 2276 event, irlap_event[event]);
2288 2277
2289 break; 2278 break;
2290 } 2279 }
@@ -2298,7 +2287,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
2298{ 2287{
2299 int ret = 0; 2288 int ret = 0;
2300 2289
2301 IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]); 2290 pr_debug("%s(), event=%s\n", __func__, irlap_event[event]);
2302 2291
2303 IRDA_ASSERT(self != NULL, return -ENODEV;); 2292 IRDA_ASSERT(self != NULL, return -ENODEV;);
2304 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); 2293 IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
@@ -2319,8 +2308,8 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
2319 irlap_next_state(self, LAP_SCLOSE); 2308 irlap_next_state(self, LAP_SCLOSE);
2320 break; 2309 break;
2321 default: 2310 default:
2322 IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, 2311 pr_debug("%s(), Unknown event %d, (%s)\n", __func__,
2323 event, irlap_event[event]); 2312 event, irlap_event[event]);
2324 2313
2325 ret = -EINVAL; 2314 ret = -EINVAL;
2326 break; 2315 break;
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 90ef03658a74..b936b1251a66 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -103,8 +103,8 @@ void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb)
103 irlap_insert_info(self, skb); 103 irlap_insert_info(self, skb);
104 104
105 if (unlikely(self->mode & IRDA_MODE_MONITOR)) { 105 if (unlikely(self->mode & IRDA_MODE_MONITOR)) {
106 IRDA_DEBUG(3, "%s(): %s is in monitor mode\n", __func__, 106 pr_debug("%s(): %s is in monitor mode\n", __func__,
107 self->netdev->name); 107 self->netdev->name);
108 dev_kfree_skb(skb); 108 dev_kfree_skb(skb);
109 return; 109 return;
110 } 110 }
@@ -182,8 +182,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
182 182
183 /* Check if the new connection address is valid */ 183 /* Check if the new connection address is valid */
184 if ((info->caddr == 0x00) || (info->caddr == 0xfe)) { 184 if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
185 IRDA_DEBUG(3, "%s(), invalid connection address!\n", 185 pr_debug("%s(), invalid connection address!\n",
186 __func__); 186 __func__);
187 return; 187 return;
188 } 188 }
189 189
@@ -193,8 +193,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
193 193
194 /* Only accept if addressed directly to us */ 194 /* Only accept if addressed directly to us */
195 if (info->saddr != self->saddr) { 195 if (info->saddr != self->saddr) {
196 IRDA_DEBUG(2, "%s(), not addressed to us!\n", 196 pr_debug("%s(), not addressed to us!\n",
197 __func__); 197 __func__);
198 return; 198 return;
199 } 199 }
200 irlap_do_event(self, RECV_SNRM_CMD, skb, info); 200 irlap_do_event(self, RECV_SNRM_CMD, skb, info);
@@ -216,7 +216,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos)
216 struct ua_frame *frame; 216 struct ua_frame *frame;
217 int ret; 217 int ret;
218 218
219 IRDA_DEBUG(2, "%s() <%ld>\n", __func__, jiffies); 219 pr_debug("%s() <%ld>\n", __func__, jiffies);
220 220
221 IRDA_ASSERT(self != NULL, return;); 221 IRDA_ASSERT(self != NULL, return;);
222 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 222 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -291,8 +291,6 @@ void irlap_send_disc_frame(struct irlap_cb *self)
291 struct sk_buff *tx_skb = NULL; 291 struct sk_buff *tx_skb = NULL;
292 struct disc_frame *frame; 292 struct disc_frame *frame;
293 293
294 IRDA_DEBUG(3, "%s()\n", __func__);
295
296 IRDA_ASSERT(self != NULL, return;); 294 IRDA_ASSERT(self != NULL, return;);
297 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 295 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
298 296
@@ -322,8 +320,8 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s,
322 __u32 bcast = BROADCAST; 320 __u32 bcast = BROADCAST;
323 __u8 *info; 321 __u8 *info;
324 322
325 IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __func__, 323 pr_debug("%s(), s=%d, S=%d, command=%d\n", __func__,
326 s, S, command); 324 s, S, command);
327 325
328 IRDA_ASSERT(self != NULL, return;); 326 IRDA_ASSERT(self != NULL, return;);
329 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 327 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
@@ -415,8 +413,6 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
415 __u8 *discovery_info; 413 __u8 *discovery_info;
416 char *text; 414 char *text;
417 415
418 IRDA_DEBUG(4, "%s()\n", __func__);
419
420 IRDA_ASSERT(self != NULL, return;); 416 IRDA_ASSERT(self != NULL, return;);
421 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 417 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
422 418
@@ -432,8 +428,8 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
432 428
433 /* Make sure frame is addressed to us */ 429 /* Make sure frame is addressed to us */
434 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { 430 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
435 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", 431 pr_debug("%s(), frame is not addressed to us!\n",
436 __func__); 432 __func__);
437 return; 433 return;
438 } 434 }
439 435
@@ -446,15 +442,15 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
446 discovery->data.saddr = self->saddr; 442 discovery->data.saddr = self->saddr;
447 discovery->timestamp = jiffies; 443 discovery->timestamp = jiffies;
448 444
449 IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__, 445 pr_debug("%s(), daddr=%08x\n", __func__,
450 discovery->data.daddr); 446 discovery->data.daddr);
451 447
452 discovery_info = skb_pull(skb, sizeof(struct xid_frame)); 448 discovery_info = skb_pull(skb, sizeof(struct xid_frame));
453 449
454 /* Get info returned from peer */ 450 /* Get info returned from peer */
455 discovery->data.hints[0] = discovery_info[0]; 451 discovery->data.hints[0] = discovery_info[0];
456 if (discovery_info[0] & HINT_EXTENSION) { 452 if (discovery_info[0] & HINT_EXTENSION) {
457 IRDA_DEBUG(4, "EXTENSION\n"); 453 pr_debug("EXTENSION\n");
458 discovery->data.hints[1] = discovery_info[1]; 454 discovery->data.hints[1] = discovery_info[1];
459 discovery->data.charset = discovery_info[2]; 455 discovery->data.charset = discovery_info[2];
460 text = (char *) &discovery_info[3]; 456 text = (char *) &discovery_info[3];
@@ -503,8 +499,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
503 499
504 /* Make sure frame is addressed to us */ 500 /* Make sure frame is addressed to us */
505 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { 501 if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
506 IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n", 502 pr_debug("%s(), frame is not addressed to us!\n",
507 __func__); 503 __func__);
508 return; 504 return;
509 } 505 }
510 506
@@ -656,7 +652,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
656{ 652{
657 info->nr = skb->data[1] >> 5; 653 info->nr = skb->data[1] >> 5;
658 654
659 IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __func__, info->nr, jiffies); 655 pr_debug("%s(), nr=%d, %ld\n", __func__, info->nr, jiffies);
660 656
661 if (command) 657 if (command)
662 irlap_do_event(self, RECV_RNR_CMD, skb, info); 658 irlap_do_event(self, RECV_RNR_CMD, skb, info);
@@ -667,8 +663,6 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
667static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, 663static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
668 struct irlap_info *info, int command) 664 struct irlap_info *info, int command)
669{ 665{
670 IRDA_DEBUG(0, "%s()\n", __func__);
671
672 info->nr = skb->data[1] >> 5; 666 info->nr = skb->data[1] >> 5;
673 667
674 /* Check if this is a command or a response frame */ 668 /* Check if this is a command or a response frame */
@@ -681,8 +675,6 @@ static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
681static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, 675static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
682 struct irlap_info *info, int command) 676 struct irlap_info *info, int command)
683{ 677{
684 IRDA_DEBUG(0, "%s()\n", __func__);
685
686 info->nr = skb->data[1] >> 5; 678 info->nr = skb->data[1] >> 5;
687 679
688 /* Check if this is a command or a response frame */ 680 /* Check if this is a command or a response frame */
@@ -695,8 +687,6 @@ static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
695static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb, 687static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb,
696 struct irlap_info *info, int command) 688 struct irlap_info *info, int command)
697{ 689{
698 IRDA_DEBUG(2, "%s()\n", __func__);
699
700 /* Check if this is a command or a response frame */ 690 /* Check if this is a command or a response frame */
701 if (command) 691 if (command)
702 irlap_do_event(self, RECV_DISC_CMD, skb, info); 692 irlap_do_event(self, RECV_DISC_CMD, skb, info);
@@ -754,7 +744,7 @@ void irlap_send_data_primary(struct irlap_cb *self, struct sk_buff *skb)
754 744
755 irlap_send_i_frame( self, tx_skb, CMD_FRAME); 745 irlap_send_i_frame( self, tx_skb, CMD_FRAME);
756 } else { 746 } else {
757 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__); 747 pr_debug("%s(), sending unreliable frame\n", __func__);
758 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); 748 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
759 self->window -= 1; 749 self->window -= 1;
760 } 750 }
@@ -807,7 +797,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
807 irlap_next_state(self, LAP_NRM_P); 797 irlap_next_state(self, LAP_NRM_P);
808 irlap_send_i_frame(self, tx_skb, CMD_FRAME); 798 irlap_send_i_frame(self, tx_skb, CMD_FRAME);
809 } else { 799 } else {
810 IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __func__); 800 pr_debug("%s(), sending unreliable frame\n", __func__);
811 801
812 if (self->ack_required) { 802 if (self->ack_required) {
813 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); 803 irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
@@ -834,7 +824,9 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
834 * See max_line_capacities[][] in qos.c for details. Jean II */ 824 * See max_line_capacities[][] in qos.c for details. Jean II */
835 transmission_time -= (self->final_timeout * self->bytes_left 825 transmission_time -= (self->final_timeout * self->bytes_left
836 / self->line_capacity); 826 / self->line_capacity);
837 IRDA_DEBUG(4, "%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n", __func__, self->final_timeout, self->bytes_left, self->line_capacity, transmission_time); 827 pr_debug("%s() adjusting transmission_time : ft=%d, bl=%d, lc=%d -> tt=%d\n",
828 __func__, self->final_timeout, self->bytes_left,
829 self->line_capacity, transmission_time);
838 830
839 /* We are allowed to transmit a maximum number of bytes again. */ 831 /* We are allowed to transmit a maximum number of bytes again. */
840 self->bytes_left = self->line_capacity; 832 self->bytes_left = self->line_capacity;
@@ -995,7 +987,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
995 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ 987 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
996 tx_skb = skb_copy(skb, GFP_ATOMIC); 988 tx_skb = skb_copy(skb, GFP_ATOMIC);
997 if (!tx_skb) { 989 if (!tx_skb) {
998 IRDA_DEBUG(0, "%s(), unable to copy\n", __func__); 990 pr_debug("%s(), unable to copy\n", __func__);
999 return; 991 return;
1000 } 992 }
1001 993
@@ -1018,7 +1010,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
1018 */ 1010 */
1019 while (!skb_queue_empty(&self->txq)) { 1011 while (!skb_queue_empty(&self->txq)) {
1020 1012
1021 IRDA_DEBUG(0, "%s(), sending additional frames!\n", __func__); 1013 pr_debug("%s(), sending additional frames!\n", __func__);
1022 if (self->window > 0) { 1014 if (self->window > 0) {
1023 skb = skb_dequeue( &self->txq); 1015 skb = skb_dequeue( &self->txq);
1024 IRDA_ASSERT(skb != NULL, return;); 1016 IRDA_ASSERT(skb != NULL, return;);
@@ -1058,7 +1050,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
1058 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */ 1050 /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
1059 tx_skb = skb_copy(skb, GFP_ATOMIC); 1051 tx_skb = skb_copy(skb, GFP_ATOMIC);
1060 if (!tx_skb) { 1052 if (!tx_skb) {
1061 IRDA_DEBUG(0, "%s(), unable to copy\n", __func__); 1053 pr_debug("%s(), unable to copy\n", __func__);
1062 return; 1054 return;
1063 } 1055 }
1064 1056
@@ -1081,8 +1073,6 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
1081void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb, 1073void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
1082 __u8 caddr, int command) 1074 __u8 caddr, int command)
1083{ 1075{
1084 IRDA_DEBUG(4, "%s()\n", __func__);
1085
1086 IRDA_ASSERT(self != NULL, return;); 1076 IRDA_ASSERT(self != NULL, return;);
1087 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 1077 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
1088 IRDA_ASSERT(skb != NULL, return;); 1078 IRDA_ASSERT(skb != NULL, return;);
@@ -1141,8 +1131,6 @@ static inline void irlap_recv_i_frame(struct irlap_cb *self,
1141static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb, 1131static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
1142 struct irlap_info *info) 1132 struct irlap_info *info)
1143{ 1133{
1144 IRDA_DEBUG( 4, "%s()\n", __func__);
1145
1146 info->pf = skb->data[1] & PF_BIT; /* Final bit */ 1134 info->pf = skb->data[1] & PF_BIT; /* Final bit */
1147 1135
1148 irlap_do_event(self, RECV_UI_FRAME, skb, info); 1136 irlap_do_event(self, RECV_UI_FRAME, skb, info);
@@ -1160,8 +1148,6 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
1160 __u8 *frame; 1148 __u8 *frame;
1161 int w, x, y, z; 1149 int w, x, y, z;
1162 1150
1163 IRDA_DEBUG(0, "%s()\n", __func__);
1164
1165 IRDA_ASSERT(self != NULL, return;); 1151 IRDA_ASSERT(self != NULL, return;);
1166 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 1152 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
1167 IRDA_ASSERT(skb != NULL, return;); 1153 IRDA_ASSERT(skb != NULL, return;);
@@ -1184,21 +1170,16 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
1184 z = frame[3] & 0x08; 1170 z = frame[3] & 0x08;
1185 1171
1186 if (w) { 1172 if (w) {
1187 IRDA_DEBUG(0, "Rejected control field is undefined or not " 1173 pr_debug("Rejected control field is undefined or not implemented\n");
1188 "implemented.\n");
1189 } 1174 }
1190 if (x) { 1175 if (x) {
1191 IRDA_DEBUG(0, "Rejected control field was invalid because it " 1176 pr_debug("Rejected control field was invalid because it contained a non permitted I field\n");
1192 "contained a non permitted I field.\n");
1193 } 1177 }
1194 if (y) { 1178 if (y) {
1195 IRDA_DEBUG(0, "Received I field exceeded the maximum negotiated " 1179 pr_debug("Received I field exceeded the maximum negotiated for the existing connection or exceeded the maximum this station supports if no connection exists\n");
1196 "for the existing connection or exceeded the maximum "
1197 "this station supports if no connection exists.\n");
1198 } 1180 }
1199 if (z) { 1181 if (z) {
1200 IRDA_DEBUG(0, "Rejected control field control field contained an " 1182 pr_debug("Rejected control field control field contained an invalid Nr count\n");
1201 "invalid Nr count.\n");
1202 } 1183 }
1203 irlap_do_event(self, RECV_FRMR_RSP, skb, info); 1184 irlap_do_event(self, RECV_FRMR_RSP, skb, info);
1204} 1185}
@@ -1254,8 +1235,6 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
1254{ 1235{
1255 struct test_frame *frame; 1236 struct test_frame *frame;
1256 1237
1257 IRDA_DEBUG(2, "%s()\n", __func__);
1258
1259 if (!pskb_may_pull(skb, sizeof(*frame))) { 1238 if (!pskb_may_pull(skb, sizeof(*frame))) {
1260 net_err_ratelimited("%s: frame too short!\n", __func__); 1239 net_err_ratelimited("%s: frame too short!\n", __func__);
1261 return; 1240 return;
@@ -1265,8 +1244,8 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
1265 /* Broadcast frames must carry saddr and daddr fields */ 1244 /* Broadcast frames must carry saddr and daddr fields */
1266 if (info->caddr == CBROADCAST) { 1245 if (info->caddr == CBROADCAST) {
1267 if (skb->len < sizeof(struct test_frame)) { 1246 if (skb->len < sizeof(struct test_frame)) {
1268 IRDA_DEBUG(0, "%s() test frame too short!\n", 1247 pr_debug("%s() test frame too short!\n",
1269 __func__); 1248 __func__);
1270 return; 1249 return;
1271 } 1250 }
1272 1251
@@ -1346,8 +1325,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1346 1325
1347 /* First we check if this frame has a valid connection address */ 1326 /* First we check if this frame has a valid connection address */
1348 if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) { 1327 if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) {
1349 IRDA_DEBUG(0, "%s(), wrong connection address!\n", 1328 pr_debug("%s(), wrong connection address!\n",
1350 __func__); 1329 __func__);
1351 goto out; 1330 goto out;
1352 } 1331 }
1353 /* 1332 /*
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index 6178e71f3a51..a26c401ef4a4 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -83,7 +83,6 @@ const char *irlmp_reason_str(LM_REASON reason)
83 */ 83 */
84int __init irlmp_init(void) 84int __init irlmp_init(void)
85{ 85{
86 IRDA_DEBUG(1, "%s()\n", __func__);
87 /* Initialize the irlmp structure. */ 86 /* Initialize the irlmp structure. */
88 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL); 87 irlmp = kzalloc( sizeof(struct irlmp_cb), GFP_KERNEL);
89 if (irlmp == NULL) 88 if (irlmp == NULL)
@@ -207,8 +206,6 @@ EXPORT_SYMBOL(irlmp_open_lsap);
207 */ 206 */
208static void __irlmp_close_lsap(struct lsap_cb *self) 207static void __irlmp_close_lsap(struct lsap_cb *self)
209{ 208{
210 IRDA_DEBUG(4, "%s()\n", __func__);
211
212 IRDA_ASSERT(self != NULL, return;); 209 IRDA_ASSERT(self != NULL, return;);
213 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 210 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
214 211
@@ -267,9 +264,8 @@ void irlmp_close_lsap(struct lsap_cb *self)
267 NULL); 264 NULL);
268 } 265 }
269 if (!lsap) { 266 if (!lsap) {
270 IRDA_DEBUG(0, 267 pr_debug("%s(), Looks like somebody has removed me already!\n",
271 "%s(), Looks like somebody has removed me already!\n", 268 __func__);
272 __func__);
273 return; 269 return;
274 } 270 }
275 __irlmp_close_lsap(self); 271 __irlmp_close_lsap(self);
@@ -340,8 +336,6 @@ void irlmp_unregister_link(__u32 saddr)
340{ 336{
341 struct lap_cb *link; 337 struct lap_cb *link;
342 338
343 IRDA_DEBUG(4, "%s()\n", __func__);
344
345 /* We must remove ourselves from the hashbin *first*. This ensure 339 /* We must remove ourselves from the hashbin *first*. This ensure
346 * that no more LSAPs will be open on this link and no discovery 340 * that no more LSAPs will be open on this link and no discovery
347 * will be triggered anymore. Jean II */ 341 * will be triggered anymore. Jean II */
@@ -383,9 +377,8 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
383 IRDA_ASSERT(self != NULL, return -EBADR;); 377 IRDA_ASSERT(self != NULL, return -EBADR;);
384 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); 378 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;);
385 379
386 IRDA_DEBUG(2, 380 pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n",
387 "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", 381 __func__, self->slsap_sel, dlsap_sel, saddr, daddr);
388 __func__, self->slsap_sel, dlsap_sel, saddr, daddr);
389 382
390 if (test_bit(0, &self->connected)) { 383 if (test_bit(0, &self->connected)) {
391 ret = -EISCONN; 384 ret = -EISCONN;
@@ -429,7 +422,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
429 if (daddr != DEV_ADDR_ANY) 422 if (daddr != DEV_ADDR_ANY)
430 discovery = hashbin_find(irlmp->cachelog, daddr, NULL); 423 discovery = hashbin_find(irlmp->cachelog, daddr, NULL);
431 else { 424 else {
432 IRDA_DEBUG(2, "%s(), no daddr\n", __func__); 425 pr_debug("%s(), no daddr\n", __func__);
433 discovery = (discovery_t *) 426 discovery = (discovery_t *)
434 hashbin_get_first(irlmp->cachelog); 427 hashbin_get_first(irlmp->cachelog);
435 } 428 }
@@ -442,7 +435,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
442 } 435 }
443 lap = hashbin_lock_find(irlmp->links, saddr, NULL); 436 lap = hashbin_lock_find(irlmp->links, saddr, NULL);
444 if (lap == NULL) { 437 if (lap == NULL) {
445 IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __func__); 438 pr_debug("%s(), Unable to find a usable link!\n", __func__);
446 ret = -EHOSTUNREACH; 439 ret = -EHOSTUNREACH;
447 goto err; 440 goto err;
448 } 441 }
@@ -457,14 +450,15 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
457 * disconnected yet (waiting for timeout in LAP). 450 * disconnected yet (waiting for timeout in LAP).
458 * Maybe we could give LAP a bit of help in this case. 451 * Maybe we could give LAP a bit of help in this case.
459 */ 452 */
460 IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __func__); 453 pr_debug("%s(), sorry, but I'm waiting for LAP to timeout!\n",
454 __func__);
461 ret = -EAGAIN; 455 ret = -EAGAIN;
462 goto err; 456 goto err;
463 } 457 }
464 458
465 /* LAP is already connected to a different node, and LAP 459 /* LAP is already connected to a different node, and LAP
466 * can only talk to one node at a time */ 460 * can only talk to one node at a time */
467 IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __func__); 461 pr_debug("%s(), sorry, but link is busy!\n", __func__);
468 ret = -EBUSY; 462 ret = -EBUSY;
469 goto err; 463 goto err;
470 } 464 }
@@ -525,8 +519,8 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb)
525 IRDA_ASSERT(skb != NULL, return;); 519 IRDA_ASSERT(skb != NULL, return;);
526 IRDA_ASSERT(self->lap != NULL, return;); 520 IRDA_ASSERT(self->lap != NULL, return;);
527 521
528 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 522 pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
529 __func__, self->slsap_sel, self->dlsap_sel); 523 __func__, self->slsap_sel, self->dlsap_sel);
530 524
531 /* Note : self->lap is set in irlmp_link_data_indication(), 525 /* Note : self->lap is set in irlmp_link_data_indication(),
532 * (case CONNECT_CMD:) because we have no way to set it here. 526 * (case CONNECT_CMD:) because we have no way to set it here.
@@ -566,8 +560,8 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata)
566 /* We set the connected bit and move the lsap to the connected list 560 /* We set the connected bit and move the lsap to the connected list
567 * in the state machine itself. Jean II */ 561 * in the state machine itself. Jean II */
568 562
569 IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 563 pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
570 __func__, self->slsap_sel, self->dlsap_sel); 564 __func__, self->slsap_sel, self->dlsap_sel);
571 565
572 /* Make room for MUX control header (3 bytes) */ 566 /* Make room for MUX control header (3 bytes) */
573 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); 567 IRDA_ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;);
@@ -593,8 +587,6 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
593 int lap_header_size; 587 int lap_header_size;
594 int max_seg_size; 588 int max_seg_size;
595 589
596 IRDA_DEBUG(3, "%s()\n", __func__);
597
598 IRDA_ASSERT(skb != NULL, return;); 590 IRDA_ASSERT(skb != NULL, return;);
599 IRDA_ASSERT(self != NULL, return;); 591 IRDA_ASSERT(self != NULL, return;);
600 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 592 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
@@ -606,8 +598,8 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
606 lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap); 598 lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap);
607 max_header_size = LMP_HEADER + lap_header_size; 599 max_header_size = LMP_HEADER + lap_header_size;
608 600
609 IRDA_DEBUG(2, "%s(), max_header_size=%d\n", 601 pr_debug("%s(), max_header_size=%d\n",
610 __func__, max_header_size); 602 __func__, max_header_size);
611 603
612 /* Hide LMP_CONTROL_HEADER header from layer above */ 604 /* Hide LMP_CONTROL_HEADER header from layer above */
613 skb_pull(skb, LMP_CONTROL_HEADER); 605 skb_pull(skb, LMP_CONTROL_HEADER);
@@ -633,16 +625,14 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
633 struct lsap_cb *new; 625 struct lsap_cb *new;
634 unsigned long flags; 626 unsigned long flags;
635 627
636 IRDA_DEBUG(1, "%s()\n", __func__);
637
638 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); 628 spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags);
639 629
640 /* Only allowed to duplicate unconnected LSAP's, and only LSAPs 630 /* Only allowed to duplicate unconnected LSAP's, and only LSAPs
641 * that have received a connect indication. Jean II */ 631 * that have received a connect indication. Jean II */
642 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) || 632 if ((!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) ||
643 (orig->lap == NULL)) { 633 (orig->lap == NULL)) {
644 IRDA_DEBUG(0, "%s(), invalid LSAP (wrong state)\n", 634 pr_debug("%s(), invalid LSAP (wrong state)\n",
645 __func__); 635 __func__);
646 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 636 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
647 flags); 637 flags);
648 return NULL; 638 return NULL;
@@ -651,7 +641,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
651 /* Allocate a new instance */ 641 /* Allocate a new instance */
652 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC); 642 new = kmemdup(orig, sizeof(*new), GFP_ATOMIC);
653 if (!new) { 643 if (!new) {
654 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__); 644 pr_debug("%s(), unable to kmalloc\n", __func__);
655 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, 645 spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
656 flags); 646 flags);
657 return NULL; 647 return NULL;
@@ -697,7 +687,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata)
697 * and us that might mess up the hashbins below. This fixes it. 687 * and us that might mess up the hashbins below. This fixes it.
698 * Jean II */ 688 * Jean II */
699 if (! test_and_clear_bit(0, &self->connected)) { 689 if (! test_and_clear_bit(0, &self->connected)) {
700 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__); 690 pr_debug("%s(), already disconnected!\n", __func__);
701 dev_kfree_skb(userdata); 691 dev_kfree_skb(userdata);
702 return -1; 692 return -1;
703 } 693 }
@@ -751,20 +741,20 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
751{ 741{
752 struct lsap_cb *lsap; 742 struct lsap_cb *lsap;
753 743
754 IRDA_DEBUG(1, "%s(), reason=%s [%d]\n", __func__, 744 pr_debug("%s(), reason=%s [%d]\n", __func__,
755 irlmp_reason_str(reason), reason); 745 irlmp_reason_str(reason), reason);
756 IRDA_ASSERT(self != NULL, return;); 746 IRDA_ASSERT(self != NULL, return;);
757 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 747 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
758 748
759 IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n", 749 pr_debug("%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
760 __func__, self->slsap_sel, self->dlsap_sel); 750 __func__, self->slsap_sel, self->dlsap_sel);
761 751
762 /* Already disconnected ? 752 /* Already disconnected ?
763 * There is a race condition between irlmp_disconnect_request() 753 * There is a race condition between irlmp_disconnect_request()
764 * and us that might mess up the hashbins below. This fixes it. 754 * and us that might mess up the hashbins below. This fixes it.
765 * Jean II */ 755 * Jean II */
766 if (! test_and_clear_bit(0, &self->connected)) { 756 if (! test_and_clear_bit(0, &self->connected)) {
767 IRDA_DEBUG(0, "%s(), already disconnected!\n", __func__); 757 pr_debug("%s(), already disconnected!\n", __func__);
768 return; 758 return;
769 } 759 }
770 760
@@ -797,7 +787,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
797 self->notify.disconnect_indication(self->notify.instance, 787 self->notify.disconnect_indication(self->notify.instance,
798 self, reason, skb); 788 self, reason, skb);
799 } else { 789 } else {
800 IRDA_DEBUG(0, "%s(), no handler\n", __func__); 790 pr_debug("%s(), no handler\n", __func__);
801 } 791 }
802} 792}
803 793
@@ -968,8 +958,6 @@ irlmp_notify_client(irlmp_client_t *client,
968 int number; /* Number of nodes in the log */ 958 int number; /* Number of nodes in the log */
969 int i; 959 int i;
970 960
971 IRDA_DEBUG(3, "%s()\n", __func__);
972
973 /* Check if client wants or not partial/selective log (optimisation) */ 961 /* Check if client wants or not partial/selective log (optimisation) */
974 if (!client->disco_callback) 962 if (!client->disco_callback)
975 return; 963 return;
@@ -1019,8 +1007,6 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode)
1019 irlmp_client_t *client; 1007 irlmp_client_t *client;
1020 irlmp_client_t *client_next; 1008 irlmp_client_t *client_next;
1021 1009
1022 IRDA_DEBUG(3, "%s()\n", __func__);
1023
1024 IRDA_ASSERT(log != NULL, return;); 1010 IRDA_ASSERT(log != NULL, return;);
1025 1011
1026 if (!(HASHBIN_GET_SIZE(log))) 1012 if (!(HASHBIN_GET_SIZE(log)))
@@ -1054,8 +1040,6 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1054 irlmp_client_t *client_next; 1040 irlmp_client_t *client_next;
1055 int i; 1041 int i;
1056 1042
1057 IRDA_DEBUG(3, "%s()\n", __func__);
1058
1059 IRDA_ASSERT(expiries != NULL, return;); 1043 IRDA_ASSERT(expiries != NULL, return;);
1060 1044
1061 /* For each client - notify callback may touch client list */ 1045 /* For each client - notify callback may touch client list */
@@ -1088,8 +1072,6 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
1088 */ 1072 */
1089discovery_t *irlmp_get_discovery_response(void) 1073discovery_t *irlmp_get_discovery_response(void)
1090{ 1074{
1091 IRDA_DEBUG(4, "%s()\n", __func__);
1092
1093 IRDA_ASSERT(irlmp != NULL, return NULL;); 1075 IRDA_ASSERT(irlmp != NULL, return NULL;);
1094 1076
1095 put_unaligned(irlmp->hints.word, (__u16 *)irlmp->discovery_rsp.data.hints); 1077 put_unaligned(irlmp->hints.word, (__u16 *)irlmp->discovery_rsp.data.hints);
@@ -1166,8 +1148,6 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1166{ 1148{
1167 int ret; 1149 int ret;
1168 1150
1169 IRDA_DEBUG(4, "%s()\n", __func__);
1170
1171 IRDA_ASSERT(userdata != NULL, return -1;); 1151 IRDA_ASSERT(userdata != NULL, return -1;);
1172 1152
1173 /* Make room for MUX header */ 1153 /* Make room for MUX header */
@@ -1190,8 +1170,6 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *userdata)
1190 */ 1170 */
1191void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) 1171void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb)
1192{ 1172{
1193 IRDA_DEBUG(4, "%s()\n", __func__);
1194
1195 IRDA_ASSERT(self != NULL, return;); 1173 IRDA_ASSERT(self != NULL, return;);
1196 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1174 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
1197 IRDA_ASSERT(skb != NULL, return;); 1175 IRDA_ASSERT(skb != NULL, return;);
@@ -1217,8 +1195,6 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1217 struct sk_buff *clone_skb; 1195 struct sk_buff *clone_skb;
1218 struct lap_cb *lap; 1196 struct lap_cb *lap;
1219 1197
1220 IRDA_DEBUG(4, "%s()\n", __func__);
1221
1222 IRDA_ASSERT(userdata != NULL, return -1;); 1198 IRDA_ASSERT(userdata != NULL, return -1;);
1223 1199
1224 /* Make room for MUX and PID header */ 1200 /* Make room for MUX and PID header */
@@ -1268,8 +1244,6 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *userdata,
1268#ifdef CONFIG_IRDA_ULTRA 1244#ifdef CONFIG_IRDA_ULTRA
1269void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) 1245void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb)
1270{ 1246{
1271 IRDA_DEBUG(4, "%s()\n", __func__);
1272
1273 IRDA_ASSERT(self != NULL, return;); 1247 IRDA_ASSERT(self != NULL, return;);
1274 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 1248 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
1275 IRDA_ASSERT(skb != NULL, return;); 1249 IRDA_ASSERT(skb != NULL, return;);
@@ -1311,7 +1285,7 @@ void irlmp_status_indication(struct lap_cb *self,
1311 curr->notify.status_indication(curr->notify.instance, 1285 curr->notify.status_indication(curr->notify.instance,
1312 link, lock); 1286 link, lock);
1313 else 1287 else
1314 IRDA_DEBUG(2, "%s(), no handler\n", __func__); 1288 pr_debug("%s(), no handler\n", __func__);
1315 1289
1316 curr = next; 1290 curr = next;
1317 } 1291 }
@@ -1339,7 +1313,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1339 /* Get the number of lsap. That's the only safe way to know 1313 /* Get the number of lsap. That's the only safe way to know
1340 * that we have looped around... - Jean II */ 1314 * that we have looped around... - Jean II */
1341 lsap_todo = HASHBIN_GET_SIZE(self->lsaps); 1315 lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
1342 IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __func__, lsap_todo); 1316 pr_debug("%s() : %d lsaps to scan\n", __func__, lsap_todo);
1343 1317
1344 /* Poll lsap in order until the queue is full or until we 1318 /* Poll lsap in order until the queue is full or until we
1345 * tried them all. 1319 * tried them all.
@@ -1358,14 +1332,16 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
1358 /* Uh-oh... Paranoia */ 1332 /* Uh-oh... Paranoia */
1359 if(curr == NULL) 1333 if(curr == NULL)
1360 break; 1334 break;
1361 IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __func__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap)); 1335 pr_debug("%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n",
1336 __func__, curr, next, self->flow_next, lsap_todo,
1337 IRLAP_GET_TX_QUEUE_LEN(self->irlap));
1362 1338
1363 /* Inform lsap user that it can send one more packet. */ 1339 /* Inform lsap user that it can send one more packet. */
1364 if (curr->notify.flow_indication != NULL) 1340 if (curr->notify.flow_indication != NULL)
1365 curr->notify.flow_indication(curr->notify.instance, 1341 curr->notify.flow_indication(curr->notify.instance,
1366 curr, flow); 1342 curr, flow);
1367 else 1343 else
1368 IRDA_DEBUG(1, "%s(), no handler\n", __func__); 1344 pr_debug("%s(), no handler\n", __func__);
1369 } 1345 }
1370} 1346}
1371 1347
@@ -1386,32 +1362,30 @@ __u8 *irlmp_hint_to_service(__u8 *hint)
1386 * since we currently only support 2 hint bytes 1362 * since we currently only support 2 hint bytes
1387 */ 1363 */
1388 service = kmalloc(16, GFP_ATOMIC); 1364 service = kmalloc(16, GFP_ATOMIC);
1389 if (!service) { 1365 if (!service)
1390 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1391 return NULL; 1366 return NULL;
1392 }
1393 1367
1394 if (!hint[0]) { 1368 if (!hint[0]) {
1395 IRDA_DEBUG(1, "<None>\n"); 1369 pr_debug("<None>\n");
1396 kfree(service); 1370 kfree(service);
1397 return NULL; 1371 return NULL;
1398 } 1372 }
1399 if (hint[0] & HINT_PNP) 1373 if (hint[0] & HINT_PNP)
1400 IRDA_DEBUG(1, "PnP Compatible "); 1374 pr_debug("PnP Compatible ");
1401 if (hint[0] & HINT_PDA) 1375 if (hint[0] & HINT_PDA)
1402 IRDA_DEBUG(1, "PDA/Palmtop "); 1376 pr_debug("PDA/Palmtop ");
1403 if (hint[0] & HINT_COMPUTER) 1377 if (hint[0] & HINT_COMPUTER)
1404 IRDA_DEBUG(1, "Computer "); 1378 pr_debug("Computer ");
1405 if (hint[0] & HINT_PRINTER) { 1379 if (hint[0] & HINT_PRINTER) {
1406 IRDA_DEBUG(1, "Printer "); 1380 pr_debug("Printer ");
1407 service[i++] = S_PRINTER; 1381 service[i++] = S_PRINTER;
1408 } 1382 }
1409 if (hint[0] & HINT_MODEM) 1383 if (hint[0] & HINT_MODEM)
1410 IRDA_DEBUG(1, "Modem "); 1384 pr_debug("Modem ");
1411 if (hint[0] & HINT_FAX) 1385 if (hint[0] & HINT_FAX)
1412 IRDA_DEBUG(1, "Fax "); 1386 pr_debug("Fax ");
1413 if (hint[0] & HINT_LAN) { 1387 if (hint[0] & HINT_LAN) {
1414 IRDA_DEBUG(1, "LAN Access "); 1388 pr_debug("LAN Access ");
1415 service[i++] = S_LAN; 1389 service[i++] = S_LAN;
1416 } 1390 }
1417 /* 1391 /*
@@ -1421,22 +1395,22 @@ __u8 *irlmp_hint_to_service(__u8 *hint)
1421 */ 1395 */
1422 if (hint[0] & HINT_EXTENSION) { 1396 if (hint[0] & HINT_EXTENSION) {
1423 if (hint[1] & HINT_TELEPHONY) { 1397 if (hint[1] & HINT_TELEPHONY) {
1424 IRDA_DEBUG(1, "Telephony "); 1398 pr_debug("Telephony ");
1425 service[i++] = S_TELEPHONY; 1399 service[i++] = S_TELEPHONY;
1426 } 1400 }
1427 if (hint[1] & HINT_FILE_SERVER) 1401 if (hint[1] & HINT_FILE_SERVER)
1428 IRDA_DEBUG(1, "File Server "); 1402 pr_debug("File Server ");
1429 1403
1430 if (hint[1] & HINT_COMM) { 1404 if (hint[1] & HINT_COMM) {
1431 IRDA_DEBUG(1, "IrCOMM "); 1405 pr_debug("IrCOMM ");
1432 service[i++] = S_COMM; 1406 service[i++] = S_COMM;
1433 } 1407 }
1434 if (hint[1] & HINT_OBEX) { 1408 if (hint[1] & HINT_OBEX) {
1435 IRDA_DEBUG(1, "IrOBEX "); 1409 pr_debug("IrOBEX ");
1436 service[i++] = S_OBEX; 1410 service[i++] = S_OBEX;
1437 } 1411 }
1438 } 1412 }
1439 IRDA_DEBUG(1, "\n"); 1413 pr_debug("\n");
1440 1414
1441 /* So that client can be notified about any discovery */ 1415 /* So that client can be notified about any discovery */
1442 service[i++] = S_ANY; 1416 service[i++] = S_ANY;
@@ -1489,14 +1463,13 @@ void *irlmp_register_service(__u16 hints)
1489{ 1463{
1490 irlmp_service_t *service; 1464 irlmp_service_t *service;
1491 1465
1492 IRDA_DEBUG(4, "%s(), hints = %04x\n", __func__, hints); 1466 pr_debug("%s(), hints = %04x\n", __func__, hints);
1493 1467
1494 /* Make a new registration */ 1468 /* Make a new registration */
1495 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); 1469 service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
1496 if (!service) { 1470 if (!service)
1497 IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __func__);
1498 return NULL; 1471 return NULL;
1499 } 1472
1500 service->hints.word = hints; 1473 service->hints.word = hints;
1501 hashbin_insert(irlmp->services, (irda_queue_t *) service, 1474 hashbin_insert(irlmp->services, (irda_queue_t *) service,
1502 (long) service, NULL); 1475 (long) service, NULL);
@@ -1519,15 +1492,13 @@ int irlmp_unregister_service(void *handle)
1519 irlmp_service_t *service; 1492 irlmp_service_t *service;
1520 unsigned long flags; 1493 unsigned long flags;
1521 1494
1522 IRDA_DEBUG(4, "%s()\n", __func__);
1523
1524 if (!handle) 1495 if (!handle)
1525 return -1; 1496 return -1;
1526 1497
1527 /* Caller may call with invalid handle (it's legal) - Jean II */ 1498 /* Caller may call with invalid handle (it's legal) - Jean II */
1528 service = hashbin_lock_find(irlmp->services, (long) handle, NULL); 1499 service = hashbin_lock_find(irlmp->services, (long) handle, NULL);
1529 if (!service) { 1500 if (!service) {
1530 IRDA_DEBUG(1, "%s(), Unknown service!\n", __func__); 1501 pr_debug("%s(), Unknown service!\n", __func__);
1531 return -1; 1502 return -1;
1532 } 1503 }
1533 1504
@@ -1564,15 +1535,12 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb,
1564{ 1535{
1565 irlmp_client_t *client; 1536 irlmp_client_t *client;
1566 1537
1567 IRDA_DEBUG(1, "%s()\n", __func__);
1568 IRDA_ASSERT(irlmp != NULL, return NULL;); 1538 IRDA_ASSERT(irlmp != NULL, return NULL;);
1569 1539
1570 /* Make a new registration */ 1540 /* Make a new registration */
1571 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); 1541 client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
1572 if (!client) { 1542 if (!client)
1573 IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __func__);
1574 return NULL; 1543 return NULL;
1575 }
1576 1544
1577 /* Register the details */ 1545 /* Register the details */
1578 client->hint_mask.word = hint_mask; 1546 client->hint_mask.word = hint_mask;
@@ -1606,7 +1574,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask,
1606 1574
1607 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1575 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1608 if (!client) { 1576 if (!client) {
1609 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__); 1577 pr_debug("%s(), Unknown client!\n", __func__);
1610 return -1; 1578 return -1;
1611 } 1579 }
1612 1580
@@ -1629,19 +1597,17 @@ int irlmp_unregister_client(void *handle)
1629{ 1597{
1630 struct irlmp_client *client; 1598 struct irlmp_client *client;
1631 1599
1632 IRDA_DEBUG(4, "%s()\n", __func__);
1633
1634 if (!handle) 1600 if (!handle)
1635 return -1; 1601 return -1;
1636 1602
1637 /* Caller may call with invalid handle (it's legal) - Jean II */ 1603 /* Caller may call with invalid handle (it's legal) - Jean II */
1638 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); 1604 client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
1639 if (!client) { 1605 if (!client) {
1640 IRDA_DEBUG(1, "%s(), Unknown client!\n", __func__); 1606 pr_debug("%s(), Unknown client!\n", __func__);
1641 return -1; 1607 return -1;
1642 } 1608 }
1643 1609
1644 IRDA_DEBUG(4, "%s(), removing client!\n", __func__); 1610 pr_debug("%s(), removing client!\n", __func__);
1645 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); 1611 hashbin_remove_this(irlmp->clients, (irda_queue_t *) client);
1646 kfree(client); 1612 kfree(client);
1647 1613
@@ -1670,8 +1636,6 @@ static int irlmp_slsap_inuse(__u8 slsap_sel)
1670 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); 1636 IRDA_ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;);
1671 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;); 1637 IRDA_ASSERT(slsap_sel != LSAP_ANY, return TRUE;);
1672 1638
1673 IRDA_DEBUG(4, "%s()\n", __func__);
1674
1675#ifdef CONFIG_IRDA_ULTRA 1639#ifdef CONFIG_IRDA_ULTRA
1676 /* Accept all bindings to the connectionless LSAP */ 1640 /* Accept all bindings to the connectionless LSAP */
1677 if (slsap_sel == LSAP_CONNLESS) 1641 if (slsap_sel == LSAP_CONNLESS)
@@ -1705,8 +1669,8 @@ static int irlmp_slsap_inuse(__u8 slsap_sel)
1705 goto errlsap;); 1669 goto errlsap;);
1706 1670
1707 if ((self->slsap_sel == slsap_sel)) { 1671 if ((self->slsap_sel == slsap_sel)) {
1708 IRDA_DEBUG(4, "Source LSAP selector=%02x in use\n", 1672 pr_debug("Source LSAP selector=%02x in use\n",
1709 self->slsap_sel); 1673 self->slsap_sel);
1710 goto errlsap; 1674 goto errlsap;
1711 } 1675 }
1712 self = (struct lsap_cb*) hashbin_get_next(lap->lsaps); 1676 self = (struct lsap_cb*) hashbin_get_next(lap->lsaps);
@@ -1730,8 +1694,8 @@ static int irlmp_slsap_inuse(__u8 slsap_sel)
1730 while (self != NULL) { 1694 while (self != NULL) {
1731 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;); 1695 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, goto erruncon;);
1732 if ((self->slsap_sel == slsap_sel)) { 1696 if ((self->slsap_sel == slsap_sel)) {
1733 IRDA_DEBUG(4, "Source LSAP selector=%02x in use (unconnected)\n", 1697 pr_debug("Source LSAP selector=%02x in use (unconnected)\n",
1734 self->slsap_sel); 1698 self->slsap_sel);
1735 goto erruncon; 1699 goto erruncon;
1736 } 1700 }
1737 self = (struct lsap_cb*) hashbin_get_next(irlmp->unconnected_lsaps); 1701 self = (struct lsap_cb*) hashbin_get_next(irlmp->unconnected_lsaps);
@@ -1811,8 +1775,8 @@ static __u8 irlmp_find_free_slsap(void)
1811 1775
1812 /* Got it ! */ 1776 /* Got it ! */
1813 lsap_sel = irlmp->last_lsap_sel; 1777 lsap_sel = irlmp->last_lsap_sel;
1814 IRDA_DEBUG(4, "%s(), found free lsap_sel=%02x\n", 1778 pr_debug("%s(), found free lsap_sel=%02x\n",
1815 __func__, lsap_sel); 1779 __func__, lsap_sel);
1816 1780
1817 return lsap_sel; 1781 return lsap_sel;
1818} 1782}
@@ -1830,26 +1794,27 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason)
1830 1794
1831 switch (lap_reason) { 1795 switch (lap_reason) {
1832 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ 1796 case LAP_DISC_INDICATION: /* Received a disconnect request from peer */
1833 IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __func__); 1797 pr_debug("%s(), LAP_DISC_INDICATION\n", __func__);
1834 reason = LM_USER_REQUEST; 1798 reason = LM_USER_REQUEST;
1835 break; 1799 break;
1836 case LAP_NO_RESPONSE: /* To many retransmits without response */ 1800 case LAP_NO_RESPONSE: /* To many retransmits without response */
1837 IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __func__); 1801 pr_debug("%s(), LAP_NO_RESPONSE\n", __func__);
1838 reason = LM_LAP_DISCONNECT; 1802 reason = LM_LAP_DISCONNECT;
1839 break; 1803 break;
1840 case LAP_RESET_INDICATION: 1804 case LAP_RESET_INDICATION:
1841 IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __func__); 1805 pr_debug("%s(), LAP_RESET_INDICATION\n", __func__);
1842 reason = LM_LAP_RESET; 1806 reason = LM_LAP_RESET;
1843 break; 1807 break;
1844 case LAP_FOUND_NONE: 1808 case LAP_FOUND_NONE:
1845 case LAP_MEDIA_BUSY: 1809 case LAP_MEDIA_BUSY:
1846 case LAP_PRIMARY_CONFLICT: 1810 case LAP_PRIMARY_CONFLICT:
1847 IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __func__); 1811 pr_debug("%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n",
1812 __func__);
1848 reason = LM_CONNECT_FAILURE; 1813 reason = LM_CONNECT_FAILURE;
1849 break; 1814 break;
1850 default: 1815 default:
1851 IRDA_DEBUG(1, "%s(), Unknown IrLAP disconnect reason %d!\n", 1816 pr_debug("%s(), Unknown IrLAP disconnect reason %d!\n",
1852 __func__, lap_reason); 1817 __func__, lap_reason);
1853 reason = LM_LAP_DISCONNECT; 1818 reason = LM_LAP_DISCONNECT;
1854 break; 1819 break;
1855 } 1820 }
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 30e51f9f4baf..22c019ccd4af 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -120,7 +120,7 @@ static inline void irlmp_next_lap_state(struct lap_cb *self,
120 IRLMP_STATE state) 120 IRLMP_STATE state)
121{ 121{
122 /* 122 /*
123 IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __func__, irlmp_state[state]); 123 pr_debug("%s(), LMP LAP = %s\n", __func__, irlmp_state[state]);
124 */ 124 */
125 self->lap_state = state; 125 self->lap_state = state;
126} 126}
@@ -130,7 +130,7 @@ static inline void irlmp_next_lsap_state(struct lsap_cb *self,
130{ 130{
131 /* 131 /*
132 IRDA_ASSERT(self != NULL, return;); 132 IRDA_ASSERT(self != NULL, return;);
133 IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]); 133 pr_debug("%s(), LMP LSAP = %s\n", __func__, irlsap_state[state]);
134 */ 134 */
135 self->lsap_state = state; 135 self->lsap_state = state;
136} 136}
@@ -142,8 +142,8 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event,
142 IRDA_ASSERT(self != NULL, return -1;); 142 IRDA_ASSERT(self != NULL, return -1;);
143 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 143 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
144 144
145 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", 145 pr_debug("%s(), EVENT = %s, STATE = %s\n",
146 __func__, irlmp_event[event], irlsap_state[ self->lsap_state]); 146 __func__, irlmp_event[event], irlsap_state[self->lsap_state]);
147 147
148 return (*lsap_state[self->lsap_state]) (self, event, skb); 148 return (*lsap_state[self->lsap_state]) (self, event, skb);
149} 149}
@@ -160,17 +160,15 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
160 IRDA_ASSERT(self != NULL, return;); 160 IRDA_ASSERT(self != NULL, return;);
161 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 161 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
162 162
163 IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __func__, 163 pr_debug("%s(), EVENT = %s, STATE = %s\n", __func__,
164 irlmp_event[event], 164 irlmp_event[event],
165 irlmp_state[self->lap_state]); 165 irlmp_state[self->lap_state]);
166 166
167 (*lap_state[self->lap_state]) (self, event, skb); 167 (*lap_state[self->lap_state]) (self, event, skb);
168} 168}
169 169
170void irlmp_discovery_timer_expired(void *data) 170void irlmp_discovery_timer_expired(void *data)
171{ 171{
172 IRDA_DEBUG(4, "%s()\n", __func__);
173
174 /* We always cleanup the log (active & passive discovery) */ 172 /* We always cleanup the log (active & passive discovery) */
175 irlmp_do_expiry(); 173 irlmp_do_expiry();
176 174
@@ -184,8 +182,6 @@ void irlmp_watchdog_timer_expired(void *data)
184{ 182{
185 struct lsap_cb *self = (struct lsap_cb *) data; 183 struct lsap_cb *self = (struct lsap_cb *) data;
186 184
187 IRDA_DEBUG(2, "%s()\n", __func__);
188
189 IRDA_ASSERT(self != NULL, return;); 185 IRDA_ASSERT(self != NULL, return;);
190 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;); 186 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
191 187
@@ -196,8 +192,6 @@ void irlmp_idle_timer_expired(void *data)
196{ 192{
197 struct lap_cb *self = (struct lap_cb *) data; 193 struct lap_cb *self = (struct lap_cb *) data;
198 194
199 IRDA_DEBUG(2, "%s()\n", __func__);
200
201 IRDA_ASSERT(self != NULL, return;); 195 IRDA_ASSERT(self != NULL, return;);
202 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 196 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
203 197
@@ -256,7 +250,6 @@ irlmp_do_all_lsap_event(hashbin_t * lsap_hashbin,
256static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, 250static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
257 struct sk_buff *skb) 251 struct sk_buff *skb)
258{ 252{
259 IRDA_DEBUG(4, "%s()\n", __func__);
260 IRDA_ASSERT(self->irlap != NULL, return;); 253 IRDA_ASSERT(self->irlap != NULL, return;);
261 254
262 switch (event) { 255 switch (event) {
@@ -276,7 +269,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
276 irlap_connect_response(self->irlap, skb); 269 irlap_connect_response(self->irlap, skb);
277 break; 270 break;
278 case LM_LAP_CONNECT_REQUEST: 271 case LM_LAP_CONNECT_REQUEST:
279 IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __func__); 272 pr_debug("%s() LS_CONNECT_REQUEST\n", __func__);
280 273
281 irlmp_next_lap_state(self, LAP_U_CONNECT); 274 irlmp_next_lap_state(self, LAP_U_CONNECT);
282 275
@@ -284,14 +277,14 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
284 irlap_connect_request(self->irlap, self->daddr, NULL, 0); 277 irlap_connect_request(self->irlap, self->daddr, NULL, 0);
285 break; 278 break;
286 case LM_LAP_DISCONNECT_INDICATION: 279 case LM_LAP_DISCONNECT_INDICATION:
287 IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n", 280 pr_debug("%s(), Error LM_LAP_DISCONNECT_INDICATION\n",
288 __func__); 281 __func__);
289 282
290 irlmp_next_lap_state(self, LAP_STANDBY); 283 irlmp_next_lap_state(self, LAP_STANDBY);
291 break; 284 break;
292 default: 285 default:
293 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 286 pr_debug("%s(), Unknown event %s\n",
294 __func__, irlmp_event[event]); 287 __func__, irlmp_event[event]);
295 break; 288 break;
296 } 289 }
297} 290}
@@ -306,7 +299,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
306static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, 299static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
307 struct sk_buff *skb) 300 struct sk_buff *skb)
308{ 301{
309 IRDA_DEBUG(2, "%s(), event=%s\n", __func__, irlmp_event[event]); 302 pr_debug("%s(), event=%s\n", __func__, irlmp_event[event]);
310 303
311 switch (event) { 304 switch (event) {
312 case LM_LAP_CONNECT_INDICATION: 305 case LM_LAP_CONNECT_INDICATION:
@@ -326,7 +319,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
326 * the lsaps may already have gone. This avoid getting stuck 319 * the lsaps may already have gone. This avoid getting stuck
327 * forever in LAP_ACTIVE state - Jean II */ 320 * forever in LAP_ACTIVE state - Jean II */
328 if (HASHBIN_GET_SIZE(self->lsaps) == 0) { 321 if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
329 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__); 322 pr_debug("%s() NO LSAPs !\n", __func__);
330 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); 323 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
331 } 324 }
332 break; 325 break;
@@ -344,12 +337,12 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
344 * the lsaps may already have gone. This avoid getting stuck 337 * the lsaps may already have gone. This avoid getting stuck
345 * forever in LAP_ACTIVE state - Jean II */ 338 * forever in LAP_ACTIVE state - Jean II */
346 if (HASHBIN_GET_SIZE(self->lsaps) == 0) { 339 if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
347 IRDA_DEBUG(0, "%s() NO LSAPs !\n", __func__); 340 pr_debug("%s() NO LSAPs !\n", __func__);
348 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); 341 irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
349 } 342 }
350 break; 343 break;
351 case LM_LAP_DISCONNECT_INDICATION: 344 case LM_LAP_DISCONNECT_INDICATION:
352 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__); 345 pr_debug("%s(), LM_LAP_DISCONNECT_INDICATION\n", __func__);
353 irlmp_next_lap_state(self, LAP_STANDBY); 346 irlmp_next_lap_state(self, LAP_STANDBY);
354 347
355 /* Send disconnect event to all LSAPs using this link */ 348 /* Send disconnect event to all LSAPs using this link */
@@ -357,7 +350,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
357 LM_LAP_DISCONNECT_INDICATION); 350 LM_LAP_DISCONNECT_INDICATION);
358 break; 351 break;
359 case LM_LAP_DISCONNECT_REQUEST: 352 case LM_LAP_DISCONNECT_REQUEST:
360 IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__); 353 pr_debug("%s(), LM_LAP_DISCONNECT_REQUEST\n", __func__);
361 354
362 /* One of the LSAP did timeout or was closed, if it was 355 /* One of the LSAP did timeout or was closed, if it was
363 * the last one, try to get out of here - Jean II */ 356 * the last one, try to get out of here - Jean II */
@@ -366,7 +359,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
366 } 359 }
367 break; 360 break;
368 default: 361 default:
369 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 362 pr_debug("%s(), Unknown event %s\n",
370 __func__, irlmp_event[event]); 363 __func__, irlmp_event[event]);
371 break; 364 break;
372 } 365 }
@@ -381,11 +374,9 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
381static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, 374static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
382 struct sk_buff *skb) 375 struct sk_buff *skb)
383{ 376{
384 IRDA_DEBUG(4, "%s()\n", __func__);
385
386 switch (event) { 377 switch (event) {
387 case LM_LAP_CONNECT_REQUEST: 378 case LM_LAP_CONNECT_REQUEST:
388 IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __func__); 379 pr_debug("%s(), LS_CONNECT_REQUEST\n", __func__);
389 380
390 /* 381 /*
391 * IrLAP may have a pending disconnect. We tried to close 382 * IrLAP may have a pending disconnect. We tried to close
@@ -467,7 +458,7 @@ static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
467 irlmp_do_expiry(); 458 irlmp_do_expiry();
468 break; 459 break;
469 default: 460 default:
470 IRDA_DEBUG(0, "%s(), Unknown event %s\n", 461 pr_debug("%s(), Unknown event %s\n",
471 __func__, irlmp_event[event]); 462 __func__, irlmp_event[event]);
472 break; 463 break;
473 } 464 }
@@ -490,8 +481,6 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
490{ 481{
491 int ret = 0; 482 int ret = 0;
492 483
493 IRDA_DEBUG(4, "%s()\n", __func__);
494
495 IRDA_ASSERT(self != NULL, return -1;); 484 IRDA_ASSERT(self != NULL, return -1;);
496 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 485 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
497 486
@@ -505,7 +494,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
505 break; 494 break;
506#endif /* CONFIG_IRDA_ULTRA */ 495#endif /* CONFIG_IRDA_ULTRA */
507 case LM_CONNECT_REQUEST: 496 case LM_CONNECT_REQUEST:
508 IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__); 497 pr_debug("%s(), LM_CONNECT_REQUEST\n", __func__);
509 498
510 if (self->conn_skb) { 499 if (self->conn_skb) {
511 net_warn_ratelimited("%s: busy with another request!\n", 500 net_warn_ratelimited("%s: busy with another request!\n",
@@ -551,8 +540,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
551 irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL); 540 irlmp_do_lap_event(self->lap, LM_LAP_CONNECT_REQUEST, NULL);
552 break; 541 break;
553 default: 542 default:
554 IRDA_DEBUG(1, "%s(), Unknown event %s on LSAP %#02x\n", 543 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
555 __func__, irlmp_event[event], self->slsap_sel); 544 __func__, irlmp_event[event], self->slsap_sel);
556 break; 545 break;
557 } 546 }
558 return ret; 547 return ret;
@@ -570,8 +559,6 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
570 struct lsap_cb *lsap; 559 struct lsap_cb *lsap;
571 int ret = 0; 560 int ret = 0;
572 561
573 IRDA_DEBUG(4, "%s()\n", __func__);
574
575 IRDA_ASSERT(self != NULL, return -1;); 562 IRDA_ASSERT(self != NULL, return -1;);
576 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 563 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
577 564
@@ -603,7 +590,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
603 case LM_WATCHDOG_TIMEOUT: 590 case LM_WATCHDOG_TIMEOUT:
604 /* May happen, who knows... 591 /* May happen, who knows...
605 * Jean II */ 592 * Jean II */
606 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); 593 pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__);
607 594
608 /* Disconnect, get out... - Jean II */ 595 /* Disconnect, get out... - Jean II */
609 self->lap = NULL; 596 self->lap = NULL;
@@ -613,8 +600,8 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
613 default: 600 default:
614 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we 601 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
615 * are *not* yet bound to the IrLAP link. Jean II */ 602 * are *not* yet bound to the IrLAP link. Jean II */
616 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 603 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
617 __func__, irlmp_event[event], self->slsap_sel); 604 __func__, irlmp_event[event], self->slsap_sel);
618 break; 605 break;
619 } 606 }
620 return ret; 607 return ret;
@@ -632,8 +619,6 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
632 struct sk_buff *tx_skb; 619 struct sk_buff *tx_skb;
633 int ret = 0; 620 int ret = 0;
634 621
635 IRDA_DEBUG(4, "%s()\n", __func__);
636
637 IRDA_ASSERT(self != NULL, return -1;); 622 IRDA_ASSERT(self != NULL, return -1;);
638 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 623 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
639 624
@@ -642,17 +627,17 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
642 /* Keep state */ 627 /* Keep state */
643 break; 628 break;
644 case LM_CONNECT_RESPONSE: 629 case LM_CONNECT_RESPONSE:
645 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " 630 pr_debug("%s(), LM_CONNECT_RESPONSE, no indication issued yet\n",
646 "no indication issued yet\n", __func__); 631 __func__);
647 /* Keep state */ 632 /* Keep state */
648 break; 633 break;
649 case LM_DISCONNECT_REQUEST: 634 case LM_DISCONNECT_REQUEST:
650 IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, " 635 pr_debug("%s(), LM_DISCONNECT_REQUEST, not yet bound to IrLAP connection\n",
651 "not yet bound to IrLAP connection\n", __func__); 636 __func__);
652 /* Keep state */ 637 /* Keep state */
653 break; 638 break;
654 case LM_LAP_CONNECT_CONFIRM: 639 case LM_LAP_CONNECT_CONFIRM:
655 IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __func__); 640 pr_debug("%s(), LS_CONNECT_CONFIRM\n", __func__);
656 irlmp_next_lsap_state(self, LSAP_CONNECT); 641 irlmp_next_lsap_state(self, LSAP_CONNECT);
657 642
658 tx_skb = self->conn_skb; 643 tx_skb = self->conn_skb;
@@ -666,7 +651,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
666 /* Will happen in some rare cases because of a race condition. 651 /* Will happen in some rare cases because of a race condition.
667 * Just make sure we don't stay there forever... 652 * Just make sure we don't stay there forever...
668 * Jean II */ 653 * Jean II */
669 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); 654 pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__);
670 655
671 /* Go back to disconnected mode, keep the socket waiting */ 656 /* Go back to disconnected mode, keep the socket waiting */
672 self->lap = NULL; 657 self->lap = NULL;
@@ -679,8 +664,8 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
679 default: 664 default:
680 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we 665 /* LM_LAP_DISCONNECT_INDICATION : Should never happen, we
681 * are *not* yet bound to the IrLAP link. Jean II */ 666 * are *not* yet bound to the IrLAP link. Jean II */
682 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 667 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
683 __func__, irlmp_event[event], self->slsap_sel); 668 __func__, irlmp_event[event], self->slsap_sel);
684 break; 669 break;
685 } 670 }
686 return ret; 671 return ret;
@@ -698,8 +683,6 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
698 LM_REASON reason; 683 LM_REASON reason;
699 int ret = 0; 684 int ret = 0;
700 685
701 IRDA_DEBUG(4, "%s()\n", __func__);
702
703 IRDA_ASSERT(self != NULL, return -1;); 686 IRDA_ASSERT(self != NULL, return -1;);
704 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 687 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
705 IRDA_ASSERT(self->lap != NULL, return -1;); 688 IRDA_ASSERT(self->lap != NULL, return -1;);
@@ -721,13 +704,13 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
721 irlmp_udata_indication(self, skb); 704 irlmp_udata_indication(self, skb);
722 break; 705 break;
723 case LM_CONNECT_REQUEST: 706 case LM_CONNECT_REQUEST:
724 IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, " 707 pr_debug("%s(), LM_CONNECT_REQUEST, error, LSAP already connected\n",
725 "error, LSAP already connected\n", __func__); 708 __func__);
726 /* Keep state */ 709 /* Keep state */
727 break; 710 break;
728 case LM_CONNECT_RESPONSE: 711 case LM_CONNECT_RESPONSE:
729 IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, " 712 pr_debug("%s(), LM_CONNECT_RESPONSE, error, LSAP already connected\n",
730 "error, LSAP already connected\n", __func__); 713 __func__);
731 /* Keep state */ 714 /* Keep state */
732 break; 715 break;
733 case LM_DISCONNECT_REQUEST: 716 case LM_DISCONNECT_REQUEST:
@@ -739,8 +722,8 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
739 722
740 /* Try to close the LAP connection if its still there */ 723 /* Try to close the LAP connection if its still there */
741 if (self->lap) { 724 if (self->lap) {
742 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", 725 pr_debug("%s(), trying to close IrLAP\n",
743 __func__); 726 __func__);
744 irlmp_do_lap_event(self->lap, 727 irlmp_do_lap_event(self->lap,
745 LM_LAP_DISCONNECT_REQUEST, 728 LM_LAP_DISCONNECT_REQUEST,
746 NULL); 729 NULL);
@@ -764,14 +747,14 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
764 reason = skb->data[3]; 747 reason = skb->data[3];
765 748
766 /* Try to close the LAP connection */ 749 /* Try to close the LAP connection */
767 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__); 750 pr_debug("%s(), trying to close IrLAP\n", __func__);
768 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 751 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
769 752
770 irlmp_disconnect_indication(self, reason, skb); 753 irlmp_disconnect_indication(self, reason, skb);
771 break; 754 break;
772 default: 755 default:
773 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 756 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
774 __func__, irlmp_event[event], self->slsap_sel); 757 __func__, irlmp_event[event], self->slsap_sel);
775 break; 758 break;
776 } 759 }
777 return ret; 760 return ret;
@@ -793,8 +776,6 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
793 IRDA_ASSERT(self != NULL, return -1;); 776 IRDA_ASSERT(self != NULL, return -1;);
794 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); 777 IRDA_ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
795 778
796 IRDA_DEBUG(4, "%s()\n", __func__);
797
798 switch (event) { 779 switch (event) {
799 case LM_CONNECT_CONFIRM: 780 case LM_CONNECT_CONFIRM:
800 irlmp_next_lsap_state(self, LSAP_DATA_TRANSFER_READY); 781 irlmp_next_lsap_state(self, LSAP_DATA_TRANSFER_READY);
@@ -814,7 +795,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
814 reason = skb->data[3]; 795 reason = skb->data[3];
815 796
816 /* Try to close the LAP connection */ 797 /* Try to close the LAP connection */
817 IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __func__); 798 pr_debug("%s(), trying to close IrLAP\n", __func__);
818 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 799 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
819 800
820 irlmp_disconnect_indication(self, reason, skb); 801 irlmp_disconnect_indication(self, reason, skb);
@@ -832,7 +813,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
832 irlmp_disconnect_indication(self, reason, skb); 813 irlmp_disconnect_indication(self, reason, skb);
833 break; 814 break;
834 case LM_WATCHDOG_TIMEOUT: 815 case LM_WATCHDOG_TIMEOUT:
835 IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __func__); 816 pr_debug("%s() WATCHDOG_TIMEOUT!\n", __func__);
836 817
837 IRDA_ASSERT(self->lap != NULL, return -1;); 818 IRDA_ASSERT(self->lap != NULL, return -1;);
838 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 819 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -841,8 +822,8 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
841 irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL); 822 irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL);
842 break; 823 break;
843 default: 824 default:
844 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 825 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
845 __func__, irlmp_event[event], self->slsap_sel); 826 __func__, irlmp_event[event], self->slsap_sel);
846 break; 827 break;
847 } 828 }
848 return ret; 829 return ret;
@@ -863,8 +844,6 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
863 LM_REASON reason; 844 LM_REASON reason;
864 int ret = 0; 845 int ret = 0;
865 846
866 IRDA_DEBUG(4, "%s()\n", __func__);
867
868 IRDA_ASSERT(self != NULL, return -1;); 847 IRDA_ASSERT(self != NULL, return -1;);
869 IRDA_ASSERT(irlmp != NULL, return -1;); 848 IRDA_ASSERT(irlmp != NULL, return -1;);
870 849
@@ -883,7 +862,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
883 irlmp_next_lsap_state(self, LSAP_SETUP); 862 irlmp_next_lsap_state(self, LSAP_SETUP);
884 break; 863 break;
885 case LM_WATCHDOG_TIMEOUT: 864 case LM_WATCHDOG_TIMEOUT:
886 IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __func__); 865 pr_debug("%s() : WATCHDOG_TIMEOUT !\n", __func__);
887 866
888 IRDA_ASSERT(self->lap != NULL, return -1;); 867 IRDA_ASSERT(self->lap != NULL, return -1;);
889 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); 868 irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
@@ -901,8 +880,8 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
901 irlmp_disconnect_indication(self, reason, NULL); 880 irlmp_disconnect_indication(self, reason, NULL);
902 break; 881 break;
903 default: 882 default:
904 IRDA_DEBUG(0, "%s(), Unknown event %s on LSAP %#02x\n", 883 pr_debug("%s(), Unknown event %s on LSAP %#02x\n",
905 __func__, irlmp_event[event], self->slsap_sel); 884 __func__, irlmp_event[event], self->slsap_sel);
906 break; 885 break;
907 } 886 }
908 return ret; 887 return ret;
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c
index 062e63b1c5c4..38b0f994bc7b 100644
--- a/net/irda/irlmp_frame.c
+++ b/net/irda/irlmp_frame.c
@@ -44,7 +44,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
44 skb->data[1] = slsap; 44 skb->data[1] = slsap;
45 45
46 if (expedited) { 46 if (expedited) {
47 IRDA_DEBUG(4, "%s(), sending expedited data\n", __func__); 47 pr_debug("%s(), sending expedited data\n", __func__);
48 irlap_data_request(self->irlap, skb, TRUE); 48 irlap_data_request(self->irlap, skb, TRUE);
49 } else 49 } else
50 irlap_data_request(self->irlap, skb, FALSE); 50 irlap_data_request(self->irlap, skb, FALSE);
@@ -60,8 +60,6 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
60{ 60{
61 __u8 *frame; 61 __u8 *frame;
62 62
63 IRDA_DEBUG(2, "%s()\n", __func__);
64
65 IRDA_ASSERT(self != NULL, return;); 63 IRDA_ASSERT(self != NULL, return;);
66 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 64 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
67 IRDA_ASSERT(skb != NULL, return;); 65 IRDA_ASSERT(skb != NULL, return;);
@@ -95,8 +93,6 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
95 __u8 dlsap_sel; /* Destination LSAP address */ 93 __u8 dlsap_sel; /* Destination LSAP address */
96 __u8 *fp; 94 __u8 *fp;
97 95
98 IRDA_DEBUG(4, "%s()\n", __func__);
99
100 IRDA_ASSERT(self != NULL, return;); 96 IRDA_ASSERT(self != NULL, return;);
101 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 97 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
102 IRDA_ASSERT(skb->len > 2, return;); 98 IRDA_ASSERT(skb->len > 2, return;);
@@ -115,9 +111,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
115 * it in a different way than other established connections. 111 * it in a different way than other established connections.
116 */ 112 */
117 if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { 113 if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) {
118 IRDA_DEBUG(3, "%s(), incoming connection, " 114 pr_debug("%s(), incoming connection, source LSAP=%d, dest LSAP=%d\n",
119 "source LSAP=%d, dest LSAP=%d\n", 115 __func__, slsap_sel, dlsap_sel);
120 __func__, slsap_sel, dlsap_sel);
121 116
122 /* Try to find LSAP among the unconnected LSAPs */ 117 /* Try to find LSAP among the unconnected LSAPs */
123 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, 118 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD,
@@ -125,7 +120,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
125 120
126 /* Maybe LSAP was already connected, so try one more time */ 121 /* Maybe LSAP was already connected, so try one more time */
127 if (!lsap) { 122 if (!lsap) {
128 IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __func__); 123 pr_debug("%s(), incoming connection for LSAP already connected\n",
124 __func__);
129 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, 125 lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0,
130 self->lsaps); 126 self->lsaps);
131 } 127 }
@@ -134,14 +130,14 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
134 self->lsaps); 130 self->lsaps);
135 131
136 if (lsap == NULL) { 132 if (lsap == NULL) {
137 IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n"); 133 pr_debug("IrLMP, Sorry, no LSAP for received frame!\n");
138 IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n", 134 pr_debug("%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
139 __func__, slsap_sel, dlsap_sel); 135 __func__, slsap_sel, dlsap_sel);
140 if (fp[0] & CONTROL_BIT) { 136 if (fp[0] & CONTROL_BIT) {
141 IRDA_DEBUG(2, "%s(), received control frame %02x\n", 137 pr_debug("%s(), received control frame %02x\n",
142 __func__, fp[2]); 138 __func__, fp[2]);
143 } else { 139 } else {
144 IRDA_DEBUG(2, "%s(), received data frame\n", __func__); 140 pr_debug("%s(), received data frame\n", __func__);
145 } 141 }
146 return; 142 return;
147 } 143 }
@@ -159,20 +155,20 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
159 irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb); 155 irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb);
160 break; 156 break;
161 case DISCONNECT: 157 case DISCONNECT:
162 IRDA_DEBUG(4, "%s(), Disconnect indication!\n", 158 pr_debug("%s(), Disconnect indication!\n",
163 __func__); 159 __func__);
164 irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, 160 irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
165 skb); 161 skb);
166 break; 162 break;
167 case ACCESSMODE_CMD: 163 case ACCESSMODE_CMD:
168 IRDA_DEBUG(0, "Access mode cmd not implemented!\n"); 164 pr_debug("Access mode cmd not implemented!\n");
169 break; 165 break;
170 case ACCESSMODE_CNF: 166 case ACCESSMODE_CNF:
171 IRDA_DEBUG(0, "Access mode cnf not implemented!\n"); 167 pr_debug("Access mode cnf not implemented!\n");
172 break; 168 break;
173 default: 169 default:
174 IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n", 170 pr_debug("%s(), Unknown control frame %02x\n",
175 __func__, fp[2]); 171 __func__, fp[2]);
176 break; 172 break;
177 } 173 }
178 } else if (unreliable) { 174 } else if (unreliable) {
@@ -206,8 +202,6 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
206 __u8 *fp; 202 __u8 *fp;
207 unsigned long flags; 203 unsigned long flags;
208 204
209 IRDA_DEBUG(4, "%s()\n", __func__);
210
211 IRDA_ASSERT(self != NULL, return;); 205 IRDA_ASSERT(self != NULL, return;);
212 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 206 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
213 IRDA_ASSERT(skb->len > 2, return;); 207 IRDA_ASSERT(skb->len > 2, return;);
@@ -223,14 +217,14 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
223 pid = fp[2]; 217 pid = fp[2];
224 218
225 if (pid & 0x80) { 219 if (pid & 0x80) {
226 IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", 220 pr_debug("%s(), extension in PID not supp!\n",
227 __func__); 221 __func__);
228 return; 222 return;
229 } 223 }
230 224
231 /* Check if frame is addressed to the connectionless LSAP */ 225 /* Check if frame is addressed to the connectionless LSAP */
232 if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { 226 if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) {
233 IRDA_DEBUG(0, "%s(), dropping frame!\n", __func__); 227 pr_debug("%s(), dropping frame!\n", __func__);
234 return; 228 return;
235 } 229 }
236 230
@@ -254,7 +248,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
254 if (lsap) 248 if (lsap)
255 irlmp_connless_data_indication(lsap, skb); 249 irlmp_connless_data_indication(lsap, skb);
256 else { 250 else {
257 IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __func__); 251 pr_debug("%s(), found no matching LSAP!\n", __func__);
258 } 252 }
259} 253}
260#endif /* CONFIG_IRDA_ULTRA */ 254#endif /* CONFIG_IRDA_ULTRA */
@@ -270,8 +264,6 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
270 LAP_REASON reason, 264 LAP_REASON reason,
271 struct sk_buff *skb) 265 struct sk_buff *skb)
272{ 266{
273 IRDA_DEBUG(2, "%s()\n", __func__);
274
275 IRDA_ASSERT(lap != NULL, return;); 267 IRDA_ASSERT(lap != NULL, return;);
276 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;); 268 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
277 269
@@ -296,8 +288,6 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
296 __u32 daddr, struct qos_info *qos, 288 __u32 daddr, struct qos_info *qos,
297 struct sk_buff *skb) 289 struct sk_buff *skb)
298{ 290{
299 IRDA_DEBUG(4, "%s()\n", __func__);
300
301 /* Copy QoS settings for this session */ 291 /* Copy QoS settings for this session */
302 self->qos = qos; 292 self->qos = qos;
303 293
@@ -317,8 +307,6 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
317void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, 307void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos,
318 struct sk_buff *skb) 308 struct sk_buff *skb)
319{ 309{
320 IRDA_DEBUG(4, "%s()\n", __func__);
321
322 IRDA_ASSERT(self != NULL, return;); 310 IRDA_ASSERT(self != NULL, return;);
323 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 311 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
324 IRDA_ASSERT(qos != NULL, return;); 312 IRDA_ASSERT(qos != NULL, return;);
@@ -383,8 +371,6 @@ void irlmp_link_discovery_indication(struct lap_cb *self,
383 */ 371 */
384void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) 372void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log)
385{ 373{
386 IRDA_DEBUG(4, "%s()\n", __func__);
387
388 IRDA_ASSERT(self != NULL, return;); 374 IRDA_ASSERT(self != NULL, return;);
389 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;); 375 IRDA_ASSERT(self->magic == LMP_LAP_MAGIC, return;);
390 376
diff --git a/net/irda/irmod.c b/net/irda/irmod.c
index 303a68d92731..c5e35b85c477 100644
--- a/net/irda/irmod.c
+++ b/net/irda/irmod.c
@@ -42,16 +42,6 @@
42#include <net/irda/irttp.h> /* irttp_init */ 42#include <net/irda/irttp.h> /* irttp_init */
43#include <net/irda/irda_device.h> /* irda_device_init */ 43#include <net/irda/irda_device.h> /* irda_device_init */
44 44
45/*
46 * Module parameters
47 */
48#ifdef CONFIG_IRDA_DEBUG
49unsigned int irda_debug = IRDA_DEBUG_LEVEL;
50module_param_named(debug, irda_debug, uint, 0);
51MODULE_PARM_DESC(debug, "IRDA debugging level");
52EXPORT_SYMBOL(irda_debug);
53#endif
54
55/* Packet type handler. 45/* Packet type handler.
56 * Tell the kernel how IrDA packets should be handled. 46 * Tell the kernel how IrDA packets should be handled.
57 */ 47 */
@@ -90,8 +80,6 @@ static int __init irda_init(void)
90{ 80{
91 int ret = 0; 81 int ret = 0;
92 82
93 IRDA_DEBUG(0, "%s()\n", __func__);
94
95 /* Lower layer of the stack */ 83 /* Lower layer of the stack */
96 irlmp_init(); 84 irlmp_init();
97 irlap_init(); 85 irlap_init();
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c
index a37b81fe0479..e15c40e86660 100644
--- a/net/irda/irnetlink.c
+++ b/net/irda/irnetlink.c
@@ -41,7 +41,7 @@ static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *i
41 41
42 ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]); 42 ifname = nla_data(info->attrs[IRDA_NL_ATTR_IFNAME]);
43 43
44 IRDA_DEBUG(5, "%s(): Looking for %s\n", __func__, ifname); 44 pr_debug("%s(): Looking for %s\n", __func__, ifname);
45 45
46 return dev_get_by_name(net, ifname); 46 return dev_get_by_name(net, ifname);
47} 47}
@@ -57,7 +57,7 @@ static int irda_nl_set_mode(struct sk_buff *skb, struct genl_info *info)
57 57
58 mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]); 58 mode = nla_get_u32(info->attrs[IRDA_NL_ATTR_MODE]);
59 59
60 IRDA_DEBUG(5, "%s(): Switching to mode: %d\n", __func__, mode); 60 pr_debug("%s(): Switching to mode: %d\n", __func__, mode);
61 61
62 dev = ifname_to_netdev(&init_net, info); 62 dev = ifname_to_netdev(&init_net, info);
63 if (!dev) 63 if (!dev)
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c
index 7152624ed5f1..acbe61c7e683 100644
--- a/net/irda/irqueue.c
+++ b/net/irda/irqueue.c
@@ -233,8 +233,6 @@ static __u32 hash( const char* name)
233static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) 233static void enqueue_first(irda_queue_t **queue, irda_queue_t* element)
234{ 234{
235 235
236 IRDA_DEBUG( 4, "%s()\n", __func__);
237
238 /* 236 /*
239 * Check if queue is empty. 237 * Check if queue is empty.
240 */ 238 */
@@ -267,7 +265,7 @@ static irda_queue_t *dequeue_first(irda_queue_t **queue)
267{ 265{
268 irda_queue_t *ret; 266 irda_queue_t *ret;
269 267
270 IRDA_DEBUG( 4, "dequeue_first()\n"); 268 pr_debug("dequeue_first()\n");
271 269
272 /* 270 /*
273 * Set return value 271 * Set return value
@@ -308,7 +306,7 @@ static irda_queue_t *dequeue_general(irda_queue_t **queue, irda_queue_t* element
308{ 306{
309 irda_queue_t *ret; 307 irda_queue_t *ret;
310 308
311 IRDA_DEBUG( 4, "dequeue_general()\n"); 309 pr_debug("dequeue_general()\n");
312 310
313 /* 311 /*
314 * Set return value 312 * Set return value
@@ -452,8 +450,6 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv,
452 unsigned long flags = 0; 450 unsigned long flags = 0;
453 int bin; 451 int bin;
454 452
455 IRDA_DEBUG( 4, "%s()\n", __func__);
456
457 IRDA_ASSERT( hashbin != NULL, return;); 453 IRDA_ASSERT( hashbin != NULL, return;);
458 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;); 454 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return;);
459 455
@@ -565,8 +561,6 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, const char* name)
565 unsigned long flags = 0; 561 unsigned long flags = 0;
566 irda_queue_t* entry; 562 irda_queue_t* entry;
567 563
568 IRDA_DEBUG( 4, "%s()\n", __func__);
569
570 IRDA_ASSERT( hashbin != NULL, return NULL;); 564 IRDA_ASSERT( hashbin != NULL, return NULL;);
571 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); 565 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
572 566
@@ -658,8 +652,6 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry)
658 int bin; 652 int bin;
659 long hashv; 653 long hashv;
660 654
661 IRDA_DEBUG( 4, "%s()\n", __func__);
662
663 IRDA_ASSERT( hashbin != NULL, return NULL;); 655 IRDA_ASSERT( hashbin != NULL, return NULL;);
664 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); 656 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
665 IRDA_ASSERT( entry != NULL, return NULL;); 657 IRDA_ASSERT( entry != NULL, return NULL;);
@@ -719,7 +711,7 @@ void* hashbin_find( hashbin_t* hashbin, long hashv, const char* name )
719 int bin; 711 int bin;
720 irda_queue_t* entry; 712 irda_queue_t* entry;
721 713
722 IRDA_DEBUG( 4, "hashbin_find()\n"); 714 pr_debug("hashbin_find()\n");
723 715
724 IRDA_ASSERT( hashbin != NULL, return NULL;); 716 IRDA_ASSERT( hashbin != NULL, return NULL;);
725 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;); 717 IRDA_ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index d6a59651767a..873da5e7d428 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -126,15 +126,6 @@ static struct ctl_table irda_table[] = {
126 .mode = 0644, 126 .mode = 0644,
127 .proc_handler = do_devname, 127 .proc_handler = do_devname,
128 }, 128 },
129#ifdef CONFIG_IRDA_DEBUG
130 {
131 .procname = "debug",
132 .data = &irda_debug,
133 .maxlen = sizeof(int),
134 .mode = 0644,
135 .proc_handler = proc_dointvec
136 },
137#endif
138#ifdef CONFIG_IRDA_FAST_RR 129#ifdef CONFIG_IRDA_FAST_RR
139 { 130 {
140 .procname = "fast_poll_increase", 131 .procname = "fast_poll_increase",
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index e0b2b0d9af14..3ef0b08b6bf5 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -166,7 +166,7 @@ static void irttp_todo_expired(unsigned long data)
166 if (!self || self->magic != TTP_TSAP_MAGIC) 166 if (!self || self->magic != TTP_TSAP_MAGIC)
167 return; 167 return;
168 168
169 IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self); 169 pr_debug("%s(instance=%p)\n", __func__, self);
170 170
171 /* Try to make some progress, especially on Tx side - Jean II */ 171 /* Try to make some progress, especially on Tx side - Jean II */
172 irttp_run_rx_queue(self); 172 irttp_run_rx_queue(self);
@@ -207,8 +207,6 @@ static void irttp_flush_queues(struct tsap_cb *self)
207{ 207{
208 struct sk_buff *skb; 208 struct sk_buff *skb;
209 209
210 IRDA_DEBUG(4, "%s()\n", __func__);
211
212 IRDA_ASSERT(self != NULL, return;); 210 IRDA_ASSERT(self != NULL, return;);
213 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 211 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
214 212
@@ -240,8 +238,8 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
240 IRDA_ASSERT(self != NULL, return NULL;); 238 IRDA_ASSERT(self != NULL, return NULL;);
241 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); 239 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;);
242 240
243 IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __func__, 241 pr_debug("%s(), self->rx_sdu_size=%d\n", __func__,
244 self->rx_sdu_size); 242 self->rx_sdu_size);
245 243
246 skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size); 244 skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size);
247 if (!skb) 245 if (!skb)
@@ -264,9 +262,8 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
264 dev_kfree_skb(frag); 262 dev_kfree_skb(frag);
265 } 263 }
266 264
267 IRDA_DEBUG(2, 265 pr_debug("%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n",
268 "%s(), frame len=%d, rx_sdu_size=%d, rx_max_sdu_size=%d\n", 266 __func__, n, self->rx_sdu_size, self->rx_max_sdu_size);
269 __func__, n, self->rx_sdu_size, self->rx_max_sdu_size);
270 /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size 267 /* Note : irttp_run_rx_queue() calculate self->rx_sdu_size
271 * by summing the size of all fragments, so we should always 268 * by summing the size of all fragments, so we should always
272 * have n == self->rx_sdu_size, except in cases where we 269 * have n == self->rx_sdu_size, except in cases where we
@@ -295,8 +292,6 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
295 struct sk_buff *frag; 292 struct sk_buff *frag;
296 __u8 *frame; 293 __u8 *frame;
297 294
298 IRDA_DEBUG(2, "%s()\n", __func__);
299
300 IRDA_ASSERT(self != NULL, return;); 295 IRDA_ASSERT(self != NULL, return;);
301 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 296 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
302 IRDA_ASSERT(skb != NULL, return;); 297 IRDA_ASSERT(skb != NULL, return;);
@@ -305,7 +300,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
305 * Split frame into a number of segments 300 * Split frame into a number of segments
306 */ 301 */
307 while (skb->len > self->max_seg_size) { 302 while (skb->len > self->max_seg_size) {
308 IRDA_DEBUG(2, "%s(), fragmenting ...\n", __func__); 303 pr_debug("%s(), fragmenting ...\n", __func__);
309 304
310 /* Make new segment */ 305 /* Make new segment */
311 frag = alloc_skb(self->max_seg_size+self->max_header_size, 306 frag = alloc_skb(self->max_seg_size+self->max_header_size,
@@ -330,7 +325,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
330 skb_queue_tail(&self->tx_queue, frag); 325 skb_queue_tail(&self->tx_queue, frag);
331 } 326 }
332 /* Queue what is left of the original skb */ 327 /* Queue what is left of the original skb */
333 IRDA_DEBUG(2, "%s(), queuing last segment\n", __func__); 328 pr_debug("%s(), queuing last segment\n", __func__);
334 329
335 frame = skb_push(skb, TTP_HEADER); 330 frame = skb_push(skb, TTP_HEADER);
336 frame[0] = 0x00; /* Clear more bit */ 331 frame[0] = 0x00; /* Clear more bit */
@@ -361,7 +356,7 @@ static int irttp_param_max_sdu_size(void *instance, irda_param_t *param,
361 else 356 else
362 self->tx_max_sdu_size = param->pv.i; 357 self->tx_max_sdu_size = param->pv.i;
363 358
364 IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __func__, param->pv.i); 359 pr_debug("%s(), MaxSduSize=%d\n", __func__, param->pv.i);
365 360
366 return 0; 361 return 0;
367} 362}
@@ -402,15 +397,13 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
402 * JeanII */ 397 * JeanII */
403 if ((stsap_sel != LSAP_ANY) && 398 if ((stsap_sel != LSAP_ANY) &&
404 ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) { 399 ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) {
405 IRDA_DEBUG(0, "%s(), invalid tsap!\n", __func__); 400 pr_debug("%s(), invalid tsap!\n", __func__);
406 return NULL; 401 return NULL;
407 } 402 }
408 403
409 self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC); 404 self = kzalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
410 if (self == NULL) { 405 if (self == NULL)
411 IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __func__);
412 return NULL; 406 return NULL;
413 }
414 407
415 /* Initialize internal objects */ 408 /* Initialize internal objects */
416 irttp_init_tsap(self); 409 irttp_init_tsap(self);
@@ -440,7 +433,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
440 */ 433 */
441 lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0); 434 lsap = irlmp_open_lsap(stsap_sel, &ttp_notify, 0);
442 if (lsap == NULL) { 435 if (lsap == NULL) {
443 IRDA_DEBUG(0, "%s: unable to allocate LSAP!!\n", __func__); 436 pr_debug("%s: unable to allocate LSAP!!\n", __func__);
444 __irttp_close_tsap(self); 437 __irttp_close_tsap(self);
445 return NULL; 438 return NULL;
446 } 439 }
@@ -451,7 +444,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
451 * the stsap_sel we have might not be valid anymore 444 * the stsap_sel we have might not be valid anymore
452 */ 445 */
453 self->stsap_sel = lsap->slsap_sel; 446 self->stsap_sel = lsap->slsap_sel;
454 IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __func__, self->stsap_sel); 447 pr_debug("%s(), stsap_sel=%02x\n", __func__, self->stsap_sel);
455 448
456 self->notify = *notify; 449 self->notify = *notify;
457 self->lsap = lsap; 450 self->lsap = lsap;
@@ -509,8 +502,6 @@ int irttp_close_tsap(struct tsap_cb *self)
509{ 502{
510 struct tsap_cb *tsap; 503 struct tsap_cb *tsap;
511 504
512 IRDA_DEBUG(4, "%s()\n", __func__);
513
514 IRDA_ASSERT(self != NULL, return -1;); 505 IRDA_ASSERT(self != NULL, return -1;);
515 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 506 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
516 507
@@ -558,8 +549,6 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
558 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 549 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
559 IRDA_ASSERT(skb != NULL, return -1;); 550 IRDA_ASSERT(skb != NULL, return -1;);
560 551
561 IRDA_DEBUG(4, "%s()\n", __func__);
562
563 /* Take shortcut on zero byte packets */ 552 /* Take shortcut on zero byte packets */
564 if (skb->len == 0) { 553 if (skb->len == 0) {
565 ret = 0; 554 ret = 0;
@@ -607,8 +596,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
607 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 596 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
608 IRDA_ASSERT(skb != NULL, return -1;); 597 IRDA_ASSERT(skb != NULL, return -1;);
609 598
610 IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, 599 pr_debug("%s() : queue len = %d\n", __func__,
611 skb_queue_len(&self->tx_queue)); 600 skb_queue_len(&self->tx_queue));
612 601
613 /* Take shortcut on zero byte packets */ 602 /* Take shortcut on zero byte packets */
614 if (skb->len == 0) { 603 if (skb->len == 0) {
@@ -720,9 +709,9 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
720 unsigned long flags; 709 unsigned long flags;
721 int n; 710 int n;
722 711
723 IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n", 712 pr_debug("%s() : send_credit = %d, queue_len = %d\n",
724 __func__, 713 __func__,
725 self->send_credit, skb_queue_len(&self->tx_queue)); 714 self->send_credit, skb_queue_len(&self->tx_queue));
726 715
727 /* Get exclusive access to the tx queue, otherwise don't touch it */ 716 /* Get exclusive access to the tx queue, otherwise don't touch it */
728 if (irda_lock(&self->tx_queue_lock) == FALSE) 717 if (irda_lock(&self->tx_queue_lock) == FALSE)
@@ -827,9 +816,9 @@ static inline void irttp_give_credit(struct tsap_cb *self)
827 IRDA_ASSERT(self != NULL, return;); 816 IRDA_ASSERT(self != NULL, return;);
828 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 817 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
829 818
830 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", 819 pr_debug("%s() send=%d,avail=%d,remote=%d\n",
831 __func__, 820 __func__,
832 self->send_credit, self->avail_credit, self->remote_credit); 821 self->send_credit, self->avail_credit, self->remote_credit);
833 822
834 /* Give credit to peer */ 823 /* Give credit to peer */
835 tx_skb = alloc_skb(TTP_MAX_HEADER, GFP_ATOMIC); 824 tx_skb = alloc_skb(TTP_MAX_HEADER, GFP_ATOMIC);
@@ -877,8 +866,6 @@ static int irttp_udata_indication(void *instance, void *sap,
877 struct tsap_cb *self; 866 struct tsap_cb *self;
878 int err; 867 int err;
879 868
880 IRDA_DEBUG(4, "%s()\n", __func__);
881
882 self = instance; 869 self = instance;
883 870
884 IRDA_ASSERT(self != NULL, return -1;); 871 IRDA_ASSERT(self != NULL, return -1;);
@@ -994,8 +981,6 @@ static void irttp_status_indication(void *instance,
994{ 981{
995 struct tsap_cb *self; 982 struct tsap_cb *self;
996 983
997 IRDA_DEBUG(4, "%s()\n", __func__);
998
999 self = instance; 984 self = instance;
1000 985
1001 IRDA_ASSERT(self != NULL, return;); 986 IRDA_ASSERT(self != NULL, return;);
@@ -1012,7 +997,7 @@ static void irttp_status_indication(void *instance,
1012 self->notify.status_indication(self->notify.instance, 997 self->notify.status_indication(self->notify.instance,
1013 link, lock); 998 link, lock);
1014 else 999 else
1015 IRDA_DEBUG(2, "%s(), no handler\n", __func__); 1000 pr_debug("%s(), no handler\n", __func__);
1016} 1001}
1017 1002
1018/* 1003/*
@@ -1030,7 +1015,7 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
1030 IRDA_ASSERT(self != NULL, return;); 1015 IRDA_ASSERT(self != NULL, return;);
1031 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 1016 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
1032 1017
1033 IRDA_DEBUG(4, "%s(instance=%p)\n", __func__, self); 1018 pr_debug("%s(instance=%p)\n", __func__, self);
1034 1019
1035 /* We are "polled" directly from LAP, and the LAP want to fill 1020 /* We are "polled" directly from LAP, and the LAP want to fill
1036 * its Tx window. We want to do our best to send it data, so that 1021 * its Tx window. We want to do our best to send it data, so that
@@ -1068,18 +1053,16 @@ static void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
1068 */ 1053 */
1069void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) 1054void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
1070{ 1055{
1071 IRDA_DEBUG(1, "%s()\n", __func__);
1072
1073 IRDA_ASSERT(self != NULL, return;); 1056 IRDA_ASSERT(self != NULL, return;);
1074 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;); 1057 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
1075 1058
1076 switch (flow) { 1059 switch (flow) {
1077 case FLOW_STOP: 1060 case FLOW_STOP:
1078 IRDA_DEBUG(1, "%s(), flow stop\n", __func__); 1061 pr_debug("%s(), flow stop\n", __func__);
1079 self->rx_sdu_busy = TRUE; 1062 self->rx_sdu_busy = TRUE;
1080 break; 1063 break;
1081 case FLOW_START: 1064 case FLOW_START:
1082 IRDA_DEBUG(1, "%s(), flow start\n", __func__); 1065 pr_debug("%s(), flow start\n", __func__);
1083 self->rx_sdu_busy = FALSE; 1066 self->rx_sdu_busy = FALSE;
1084 1067
1085 /* Client say he can accept more data, try to free our 1068 /* Client say he can accept more data, try to free our
@@ -1088,7 +1071,7 @@ void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
1088 1071
1089 break; 1072 break;
1090 default: 1073 default:
1091 IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __func__); 1074 pr_debug("%s(), Unknown flow command!\n", __func__);
1092 } 1075 }
1093} 1076}
1094EXPORT_SYMBOL(irttp_flow_request); 1077EXPORT_SYMBOL(irttp_flow_request);
@@ -1108,7 +1091,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
1108 __u8 *frame; 1091 __u8 *frame;
1109 __u8 n; 1092 __u8 n;
1110 1093
1111 IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __func__, max_sdu_size); 1094 pr_debug("%s(), max_sdu_size=%d\n", __func__, max_sdu_size);
1112 1095
1113 IRDA_ASSERT(self != NULL, return -EBADR;); 1096 IRDA_ASSERT(self != NULL, return -EBADR;);
1114 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); 1097 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;);
@@ -1206,8 +1189,6 @@ static void irttp_connect_confirm(void *instance, void *sap,
1206 __u8 plen; 1189 __u8 plen;
1207 __u8 n; 1190 __u8 n;
1208 1191
1209 IRDA_DEBUG(4, "%s()\n", __func__);
1210
1211 self = instance; 1192 self = instance;
1212 1193
1213 IRDA_ASSERT(self != NULL, return;); 1194 IRDA_ASSERT(self != NULL, return;);
@@ -1222,15 +1203,15 @@ static void irttp_connect_confirm(void *instance, void *sap,
1222 * negotiated QoS for the link. 1203 * negotiated QoS for the link.
1223 */ 1204 */
1224 if (qos) { 1205 if (qos) {
1225 IRDA_DEBUG(4, "IrTTP, Negotiated BAUD_RATE: %02x\n", 1206 pr_debug("IrTTP, Negotiated BAUD_RATE: %02x\n",
1226 qos->baud_rate.bits); 1207 qos->baud_rate.bits);
1227 IRDA_DEBUG(4, "IrTTP, Negotiated BAUD_RATE: %d bps.\n", 1208 pr_debug("IrTTP, Negotiated BAUD_RATE: %d bps.\n",
1228 qos->baud_rate.value); 1209 qos->baud_rate.value);
1229 } 1210 }
1230 1211
1231 n = skb->data[0] & 0x7f; 1212 n = skb->data[0] & 0x7f;
1232 1213
1233 IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __func__, n); 1214 pr_debug("%s(), Initial send_credit=%d\n", __func__, n);
1234 1215
1235 self->send_credit = n; 1216 self->send_credit = n;
1236 self->tx_max_sdu_size = 0; 1217 self->tx_max_sdu_size = 0;
@@ -1261,11 +1242,11 @@ static void irttp_connect_confirm(void *instance, void *sap,
1261 skb_pull(skb, IRDA_MIN(skb->len, plen+1)); 1242 skb_pull(skb, IRDA_MIN(skb->len, plen+1));
1262 } 1243 }
1263 1244
1264 IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __func__, 1245 pr_debug("%s() send=%d,avail=%d,remote=%d\n", __func__,
1265 self->send_credit, self->avail_credit, self->remote_credit); 1246 self->send_credit, self->avail_credit, self->remote_credit);
1266 1247
1267 IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __func__, 1248 pr_debug("%s(), MaxSduSize=%d\n", __func__,
1268 self->tx_max_sdu_size); 1249 self->tx_max_sdu_size);
1269 1250
1270 if (self->notify.connect_confirm) { 1251 if (self->notify.connect_confirm) {
1271 self->notify.connect_confirm(self->notify.instance, self, qos, 1252 self->notify.connect_confirm(self->notify.instance, self, qos,
@@ -1303,7 +1284,7 @@ static void irttp_connect_indication(void *instance, void *sap,
1303 self->max_seg_size = max_seg_size - TTP_HEADER; 1284 self->max_seg_size = max_seg_size - TTP_HEADER;
1304 self->max_header_size = max_header_size+TTP_HEADER; 1285 self->max_header_size = max_header_size+TTP_HEADER;
1305 1286
1306 IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __func__, self->stsap_sel); 1287 pr_debug("%s(), TSAP sel=%02x\n", __func__, self->stsap_sel);
1307 1288
1308 /* Need to update dtsap_sel if its equal to LSAP_ANY */ 1289 /* Need to update dtsap_sel if its equal to LSAP_ANY */
1309 self->dtsap_sel = lsap->dlsap_sel; 1290 self->dtsap_sel = lsap->dlsap_sel;
@@ -1365,8 +1346,8 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
1365 IRDA_ASSERT(self != NULL, return -1;); 1346 IRDA_ASSERT(self != NULL, return -1;);
1366 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); 1347 IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
1367 1348
1368 IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __func__, 1349 pr_debug("%s(), Source TSAP selector=%02x\n", __func__,
1369 self->stsap_sel); 1350 self->stsap_sel);
1370 1351
1371 /* Any userdata supplied? */ 1352 /* Any userdata supplied? */
1372 if (userdata == NULL) { 1353 if (userdata == NULL) {
@@ -1447,14 +1428,12 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1447 struct tsap_cb *new; 1428 struct tsap_cb *new;
1448 unsigned long flags; 1429 unsigned long flags;
1449 1430
1450 IRDA_DEBUG(1, "%s()\n", __func__);
1451
1452 /* Protect our access to the old tsap instance */ 1431 /* Protect our access to the old tsap instance */
1453 spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags); 1432 spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags);
1454 1433
1455 /* Find the old instance */ 1434 /* Find the old instance */
1456 if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) { 1435 if (!hashbin_find(irttp->tsaps, (long) orig, NULL)) {
1457 IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __func__); 1436 pr_debug("%s(), unable to find TSAP\n", __func__);
1458 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); 1437 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
1459 return NULL; 1438 return NULL;
1460 } 1439 }
@@ -1462,7 +1441,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1462 /* Allocate a new instance */ 1441 /* Allocate a new instance */
1463 new = kmemdup(orig, sizeof(struct tsap_cb), GFP_ATOMIC); 1442 new = kmemdup(orig, sizeof(struct tsap_cb), GFP_ATOMIC);
1464 if (!new) { 1443 if (!new) {
1465 IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __func__); 1444 pr_debug("%s(), unable to kmalloc\n", __func__);
1466 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); 1445 spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
1467 return NULL; 1446 return NULL;
1468 } 1447 }
@@ -1474,7 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
1474 /* Try to dup the LSAP (may fail if we were too slow) */ 1453 /* Try to dup the LSAP (may fail if we were too slow) */
1475 new->lsap = irlmp_dup(orig->lsap, new); 1454 new->lsap = irlmp_dup(orig->lsap, new);
1476 if (!new->lsap) { 1455 if (!new->lsap) {
1477 IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); 1456 pr_debug("%s(), dup failed!\n", __func__);
1478 kfree(new); 1457 kfree(new);
1479 return NULL; 1458 return NULL;
1480 } 1459 }
@@ -1509,7 +1488,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1509 1488
1510 /* Already disconnected? */ 1489 /* Already disconnected? */
1511 if (!self->connected) { 1490 if (!self->connected) {
1512 IRDA_DEBUG(4, "%s(), already disconnected!\n", __func__); 1491 pr_debug("%s(), already disconnected!\n", __func__);
1513 if (userdata) 1492 if (userdata)
1514 dev_kfree_skb(userdata); 1493 dev_kfree_skb(userdata);
1515 return -1; 1494 return -1;
@@ -1521,8 +1500,8 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1521 * for following a disconnect_indication() (i.e. net_bh). 1500 * for following a disconnect_indication() (i.e. net_bh).
1522 * Jean II */ 1501 * Jean II */
1523 if (test_and_set_bit(0, &self->disconnect_pend)) { 1502 if (test_and_set_bit(0, &self->disconnect_pend)) {
1524 IRDA_DEBUG(0, "%s(), disconnect already pending\n", 1503 pr_debug("%s(), disconnect already pending\n",
1525 __func__); 1504 __func__);
1526 if (userdata) 1505 if (userdata)
1527 dev_kfree_skb(userdata); 1506 dev_kfree_skb(userdata);
1528 1507
@@ -1541,7 +1520,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1541 * disconnecting right now since the data will 1520 * disconnecting right now since the data will
1542 * not have any usable connection to be sent on 1521 * not have any usable connection to be sent on
1543 */ 1522 */
1544 IRDA_DEBUG(1, "%s(): High priority!!()\n", __func__); 1523 pr_debug("%s(): High priority!!()\n", __func__);
1545 irttp_flush_queues(self); 1524 irttp_flush_queues(self);
1546 } else if (priority == P_NORMAL) { 1525 } else if (priority == P_NORMAL) {
1547 /* 1526 /*
@@ -1562,7 +1541,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
1562 * be sent at the LMP level (so even if the peer has its Tx queue 1541 * be sent at the LMP level (so even if the peer has its Tx queue
1563 * full of data). - Jean II */ 1542 * full of data). - Jean II */
1564 1543
1565 IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __func__); 1544 pr_debug("%s(), Disconnecting ...\n", __func__);
1566 self->connected = FALSE; 1545 self->connected = FALSE;
1567 1546
1568 if (!userdata) { 1547 if (!userdata) {
@@ -1598,8 +1577,6 @@ static void irttp_disconnect_indication(void *instance, void *sap,
1598{ 1577{
1599 struct tsap_cb *self; 1578 struct tsap_cb *self;
1600 1579
1601 IRDA_DEBUG(4, "%s()\n", __func__);
1602
1603 self = instance; 1580 self = instance;
1604 1581
1605 IRDA_ASSERT(self != NULL, return;); 1582 IRDA_ASSERT(self != NULL, return;);
@@ -1658,7 +1635,7 @@ static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
1658 * give an error back 1635 * give an error back
1659 */ 1636 */
1660 if (err) { 1637 if (err) {
1661 IRDA_DEBUG(0, "%s() requeueing skb!\n", __func__); 1638 pr_debug("%s() requeueing skb!\n", __func__);
1662 1639
1663 /* Make sure we take a break */ 1640 /* Make sure we take a break */
1664 self->rx_sdu_busy = TRUE; 1641 self->rx_sdu_busy = TRUE;
@@ -1683,8 +1660,8 @@ static void irttp_run_rx_queue(struct tsap_cb *self)
1683 struct sk_buff *skb; 1660 struct sk_buff *skb;
1684 int more = 0; 1661 int more = 0;
1685 1662
1686 IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __func__, 1663 pr_debug("%s() send=%d,avail=%d,remote=%d\n", __func__,
1687 self->send_credit, self->avail_credit, self->remote_credit); 1664 self->send_credit, self->avail_credit, self->remote_credit);
1688 1665
1689 /* Get exclusive access to the rx queue, otherwise don't touch it */ 1666 /* Get exclusive access to the rx queue, otherwise don't touch it */
1690 if (irda_lock(&self->rx_queue_lock) == FALSE) 1667 if (irda_lock(&self->rx_queue_lock) == FALSE)
@@ -1723,8 +1700,8 @@ static void irttp_run_rx_queue(struct tsap_cb *self)
1723 * limits of the maximum size of the rx_sdu 1700 * limits of the maximum size of the rx_sdu
1724 */ 1701 */
1725 if (self->rx_sdu_size <= self->rx_max_sdu_size) { 1702 if (self->rx_sdu_size <= self->rx_max_sdu_size) {
1726 IRDA_DEBUG(4, "%s(), queueing frag\n", 1703 pr_debug("%s(), queueing frag\n",
1727 __func__); 1704 __func__);
1728 skb_queue_tail(&self->rx_fragments, skb); 1705 skb_queue_tail(&self->rx_fragments, skb);
1729 } else { 1706 } else {
1730 /* Free the part of the SDU that is too big */ 1707 /* Free the part of the SDU that is too big */
@@ -1753,7 +1730,7 @@ static void irttp_run_rx_queue(struct tsap_cb *self)
1753 /* Now we can deliver the reassembled skb */ 1730 /* Now we can deliver the reassembled skb */
1754 irttp_do_data_indication(self, skb); 1731 irttp_do_data_indication(self, skb);
1755 } else { 1732 } else {
1756 IRDA_DEBUG(1, "%s(), Truncated frame\n", __func__); 1733 pr_debug("%s(), Truncated frame\n", __func__);
1757 1734
1758 /* Free the part of the SDU that is too big */ 1735 /* Free the part of the SDU that is too big */
1759 dev_kfree_skb(skb); 1736 dev_kfree_skb(skb);
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index d7a5778262ef..006786bfdd65 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -146,13 +146,13 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
146 */ 146 */
147 if (p.pl == 0) { 147 if (p.pl == 0) {
148 if (p.pv.i < 0xff) { 148 if (p.pv.i < 0xff) {
149 IRDA_DEBUG(2, "%s(), using 1 byte\n", __func__); 149 pr_debug("%s(), using 1 byte\n", __func__);
150 p.pl = 1; 150 p.pl = 1;
151 } else if (p.pv.i < 0xffff) { 151 } else if (p.pv.i < 0xffff) {
152 IRDA_DEBUG(2, "%s(), using 2 bytes\n", __func__); 152 pr_debug("%s(), using 2 bytes\n", __func__);
153 p.pl = 2; 153 p.pl = 2;
154 } else { 154 } else {
155 IRDA_DEBUG(2, "%s(), using 4 bytes\n", __func__); 155 pr_debug("%s(), using 4 bytes\n", __func__);
156 p.pl = 4; /* Default length */ 156 p.pl = 4; /* Default length */
157 } 157 }
158 } 158 }
@@ -162,8 +162,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
162 __func__); 162 __func__);
163 return -1; 163 return -1;
164 } 164 }
165 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__, 165 pr_debug("%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
166 p.pi, p.pl, p.pv.i); 166 p.pi, p.pl, p.pv.i);
167 switch (p.pl) { 167 switch (p.pl) {
168 case 1: 168 case 1:
169 n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i); 169 n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i);
@@ -270,8 +270,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
270 return p.pl+2; 270 return p.pl+2;
271 } 271 }
272 272
273 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__, 273 pr_debug("%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
274 p.pi, p.pl, p.pv.i); 274 p.pi, p.pl, p.pv.i);
275 /* Call handler for this parameter */ 275 /* Call handler for this parameter */
276 err = (*func)(self, &p, PV_PUT); 276 err = (*func)(self, &p, PV_PUT);
277 if (err < 0) 277 if (err < 0)
@@ -290,15 +290,13 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
290 irda_param_t p; 290 irda_param_t p;
291 int err; 291 int err;
292 292
293 IRDA_DEBUG(2, "%s()\n", __func__);
294
295 p.pi = pi; /* In case handler needs to know */ 293 p.pi = pi; /* In case handler needs to know */
296 p.pl = buf[1]; /* Extract length of value */ 294 p.pl = buf[1]; /* Extract length of value */
297 if (p.pl > 32) 295 if (p.pl > 32)
298 p.pl = 32; 296 p.pl = 32;
299 297
300 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __func__, 298 pr_debug("%s(), pi=%#x, pl=%d\n", __func__,
301 p.pi, p.pl); 299 p.pi, p.pl);
302 300
303 /* Check if buffer is long enough for parsing */ 301 /* Check if buffer is long enough for parsing */
304 if (len < (2+p.pl)) { 302 if (len < (2+p.pl)) {
@@ -311,8 +309,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
311 * checked that the buffer is long enough */ 309 * checked that the buffer is long enough */
312 strncpy(str, buf+2, p.pl); 310 strncpy(str, buf+2, p.pl);
313 311
314 IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __func__, 312 pr_debug("%s(), str=0x%02x 0x%02x\n",
315 (__u8) str[0], (__u8) str[1]); 313 __func__, (__u8)str[0], (__u8)str[1]);
316 314
317 /* Null terminate string */ 315 /* Null terminate string */
318 str[p.pl] = '\0'; 316 str[p.pl] = '\0';
@@ -345,7 +343,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
345 return -1; 343 return -1;
346 } 344 }
347 345
348 IRDA_DEBUG(0, "%s(), not impl\n", __func__); 346 pr_debug("%s(), not impl\n", __func__);
349 347
350 return p.pl+2; /* Extracted pl+2 bytes */ 348 return p.pl+2; /* Extracted pl+2 bytes */
351} 349}
@@ -468,8 +466,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
468 if ((pi_major > info->len-1) || 466 if ((pi_major > info->len-1) ||
469 (pi_minor > info->tables[pi_major].len-1)) 467 (pi_minor > info->tables[pi_major].len-1))
470 { 468 {
471 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 469 pr_debug("%s(), no handler for parameter=0x%02x\n",
472 __func__, pi); 470 __func__, pi);
473 471
474 /* Skip this parameter */ 472 /* Skip this parameter */
475 return -1; 473 return -1;
@@ -523,8 +521,8 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
523 if ((pi_major > info->len-1) || 521 if ((pi_major > info->len-1) ||
524 (pi_minor > info->tables[pi_major].len-1)) 522 (pi_minor > info->tables[pi_major].len-1))
525 { 523 {
526 IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n", 524 pr_debug("%s(), no handler for parameter=0x%02x\n",
527 __func__, buf[0]); 525 __func__, buf[0]);
528 526
529 /* Skip this parameter */ 527 /* Skip this parameter */
530 return 2 + buf[n + 1]; /* Continue */ 528 return 2 + buf[n + 1]; /* Continue */
@@ -536,8 +534,8 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
536 /* Find expected data type for this parameter identifier (pi)*/ 534 /* Find expected data type for this parameter identifier (pi)*/
537 type = pi_minor_info->type; 535 type = pi_minor_info->type;
538 536
539 IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __func__, 537 pr_debug("%s(), pi=[%d,%d], type=%d\n", __func__,
540 pi_major, pi_minor, type); 538 pi_major, pi_minor, type);
541 539
542 /* Check if handler has been implemented */ 540 /* Check if handler has been implemented */
543 if (!pi_minor_info->func) { 541 if (!pi_minor_info->func) {
diff --git a/net/irda/qos.c b/net/irda/qos.c
index f3b588c17d3b..5ed6c9a7baee 100644
--- a/net/irda/qos.c
+++ b/net/irda/qos.c
@@ -342,8 +342,6 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
342 __u32 line_capacity; 342 __u32 line_capacity;
343 int index; 343 int index;
344 344
345 IRDA_DEBUG(2, "%s()\n", __func__);
346
347 /* 345 /*
348 * Make sure the mintt is sensible. 346 * Make sure the mintt is sensible.
349 * Main culprit : Ericsson T39. - Jean II 347 * Main culprit : Ericsson T39. - Jean II
@@ -368,9 +366,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
368 if ((qos->baud_rate.value < 115200) && 366 if ((qos->baud_rate.value < 115200) &&
369 (qos->max_turn_time.value < 500)) 367 (qos->max_turn_time.value < 500))
370 { 368 {
371 IRDA_DEBUG(0, 369 pr_debug("%s(), adjusting max turn time from %d to 500 ms\n",
372 "%s(), adjusting max turn time from %d to 500 ms\n", 370 __func__, qos->max_turn_time.value);
373 __func__, qos->max_turn_time.value);
374 qos->max_turn_time.value = 500; 371 qos->max_turn_time.value = 500;
375 } 372 }
376 373
@@ -385,8 +382,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
385#ifdef CONFIG_IRDA_DYNAMIC_WINDOW 382#ifdef CONFIG_IRDA_DYNAMIC_WINDOW
386 while ((qos->data_size.value > line_capacity) && (index > 0)) { 383 while ((qos->data_size.value > line_capacity) && (index > 0)) {
387 qos->data_size.value = data_sizes[index--]; 384 qos->data_size.value = data_sizes[index--];
388 IRDA_DEBUG(2, "%s(), reducing data size to %d\n", 385 pr_debug("%s(), reducing data size to %d\n",
389 __func__, qos->data_size.value); 386 __func__, qos->data_size.value);
390 } 387 }
391#else /* Use method described in section 6.6.11 of IrLAP */ 388#else /* Use method described in section 6.6.11 of IrLAP */
392 while (irlap_requested_line_capacity(qos) > line_capacity) { 389 while (irlap_requested_line_capacity(qos) > line_capacity) {
@@ -395,12 +392,12 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
395 /* Must be able to send at least one frame */ 392 /* Must be able to send at least one frame */
396 if (qos->window_size.value > 1) { 393 if (qos->window_size.value > 1) {
397 qos->window_size.value--; 394 qos->window_size.value--;
398 IRDA_DEBUG(2, "%s(), reducing window size to %d\n", 395 pr_debug("%s(), reducing window size to %d\n",
399 __func__, qos->window_size.value); 396 __func__, qos->window_size.value);
400 } else if (index > 1) { 397 } else if (index > 1) {
401 qos->data_size.value = data_sizes[index--]; 398 qos->data_size.value = data_sizes[index--];
402 IRDA_DEBUG(2, "%s(), reducing data size to %d\n", 399 pr_debug("%s(), reducing data size to %d\n",
403 __func__, qos->data_size.value); 400 __func__, qos->data_size.value);
404 } else { 401 } else {
405 net_warn_ratelimited("%s(), nothing more we can do!\n", 402 net_warn_ratelimited("%s(), nothing more we can do!\n",
406 __func__); 403 __func__);
@@ -440,20 +437,20 @@ int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb)
440 437
441 irlap_adjust_qos_settings(&self->qos_tx); 438 irlap_adjust_qos_settings(&self->qos_tx);
442 439
443 IRDA_DEBUG(2, "Setting BAUD_RATE to %d bps.\n", 440 pr_debug("Setting BAUD_RATE to %d bps.\n",
444 self->qos_tx.baud_rate.value); 441 self->qos_tx.baud_rate.value);
445 IRDA_DEBUG(2, "Setting DATA_SIZE to %d bytes\n", 442 pr_debug("Setting DATA_SIZE to %d bytes\n",
446 self->qos_tx.data_size.value); 443 self->qos_tx.data_size.value);
447 IRDA_DEBUG(2, "Setting WINDOW_SIZE to %d\n", 444 pr_debug("Setting WINDOW_SIZE to %d\n",
448 self->qos_tx.window_size.value); 445 self->qos_tx.window_size.value);
449 IRDA_DEBUG(2, "Setting XBOFS to %d\n", 446 pr_debug("Setting XBOFS to %d\n",
450 self->qos_tx.additional_bofs.value); 447 self->qos_tx.additional_bofs.value);
451 IRDA_DEBUG(2, "Setting MAX_TURN_TIME to %d ms.\n", 448 pr_debug("Setting MAX_TURN_TIME to %d ms.\n",
452 self->qos_tx.max_turn_time.value); 449 self->qos_tx.max_turn_time.value);
453 IRDA_DEBUG(2, "Setting MIN_TURN_TIME to %d usecs.\n", 450 pr_debug("Setting MIN_TURN_TIME to %d usecs.\n",
454 self->qos_tx.min_turn_time.value); 451 self->qos_tx.min_turn_time.value);
455 IRDA_DEBUG(2, "Setting LINK_DISC to %d secs.\n", 452 pr_debug("Setting LINK_DISC to %d secs.\n",
456 self->qos_tx.link_disc_time.value); 453 self->qos_tx.link_disc_time.value);
457 return ret; 454 return ret;
458} 455}
459 456
@@ -537,17 +534,17 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get)
537 534
538 if (get) { 535 if (get) {
539 param->pv.i = self->qos_rx.baud_rate.bits; 536 param->pv.i = self->qos_rx.baud_rate.bits;
540 IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n", 537 pr_debug("%s(), baud rate = 0x%02x\n",
541 __func__, param->pv.i); 538 __func__, param->pv.i);
542 } else { 539 } else {
543 /* 540 /*
544 * Stations must agree on baud rate, so calculate 541 * Stations must agree on baud rate, so calculate
545 * intersection 542 * intersection
546 */ 543 */
547 IRDA_DEBUG(2, "Requested BAUD_RATE: 0x%04x\n", (__u16) param->pv.i); 544 pr_debug("Requested BAUD_RATE: 0x%04x\n", (__u16)param->pv.i);
548 final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits; 545 final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits;
549 546
550 IRDA_DEBUG(2, "Final BAUD_RATE: 0x%04x\n", final); 547 pr_debug("Final BAUD_RATE: 0x%04x\n", final);
551 self->qos_tx.baud_rate.bits = final; 548 self->qos_tx.baud_rate.bits = final;
552 self->qos_rx.baud_rate.bits = final; 549 self->qos_rx.baud_rate.bits = final;
553 } 550 }
@@ -578,10 +575,10 @@ static int irlap_param_link_disconnect(void *instance, irda_param_t *param,
578 * Stations must agree on link disconnect/threshold 575 * Stations must agree on link disconnect/threshold
579 * time. 576 * time.
580 */ 577 */
581 IRDA_DEBUG(2, "LINK_DISC: %02x\n", (__u8) param->pv.i); 578 pr_debug("LINK_DISC: %02x\n", (__u8)param->pv.i);
582 final = (__u8) param->pv.i & self->qos_rx.link_disc_time.bits; 579 final = (__u8) param->pv.i & self->qos_rx.link_disc_time.bits;
583 580
584 IRDA_DEBUG(2, "Final LINK_DISC: %02x\n", final); 581 pr_debug("Final LINK_DISC: %02x\n", final);
585 self->qos_tx.link_disc_time.bits = final; 582 self->qos_tx.link_disc_time.bits = final;
586 self->qos_rx.link_disc_time.bits = final; 583 self->qos_rx.link_disc_time.bits = final;
587 } 584 }
@@ -710,8 +707,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
710 __u32 line_capacity; 707 __u32 line_capacity;
711 int i,j; 708 int i,j;
712 709
713 IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n", 710 pr_debug("%s(), speed=%d, max_turn_time=%d\n",
714 __func__, speed, max_turn_time); 711 __func__, speed, max_turn_time);
715 712
716 i = value_index(speed, baud_rates, 10); 713 i = value_index(speed, baud_rates, 10);
717 j = value_index(max_turn_time, max_turn_times, 4); 714 j = value_index(max_turn_time, max_turn_times, 4);
@@ -721,8 +718,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
721 718
722 line_capacity = max_line_capacities[i][j]; 719 line_capacity = max_line_capacities[i][j];
723 720
724 IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n", 721 pr_debug("%s(), line capacity=%d bytes\n",
725 __func__, line_capacity); 722 __func__, line_capacity);
726 723
727 return line_capacity; 724 return line_capacity;
728} 725}
@@ -737,8 +734,8 @@ static __u32 irlap_requested_line_capacity(struct qos_info *qos)
737 irlap_min_turn_time_in_bytes(qos->baud_rate.value, 734 irlap_min_turn_time_in_bytes(qos->baud_rate.value,
738 qos->min_turn_time.value); 735 qos->min_turn_time.value);
739 736
740 IRDA_DEBUG(2, "%s(), requested line capacity=%d\n", 737 pr_debug("%s(), requested line capacity=%d\n",
741 __func__, line_capacity); 738 __func__, line_capacity);
742 739
743 return line_capacity; 740 return line_capacity;
744} 741}
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c
index 9efffeb8d0f1..40a0f993bf13 100644
--- a/net/irda/wrapper.c
+++ b/net/irda/wrapper.c
@@ -106,17 +106,17 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
106 * Nothing to worry about, but we set the default number of 106 * Nothing to worry about, but we set the default number of
107 * BOF's 107 * BOF's
108 */ 108 */
109 IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __func__); 109 pr_debug("%s(), wrong magic in skb!\n", __func__);
110 xbofs = 10; 110 xbofs = 10;
111 } else 111 } else
112 xbofs = cb->xbofs + cb->xbofs_delay; 112 xbofs = cb->xbofs + cb->xbofs_delay;
113 113
114 IRDA_DEBUG(4, "%s(), xbofs=%d\n", __func__, xbofs); 114 pr_debug("%s(), xbofs=%d\n", __func__, xbofs);
115 115
116 /* Check that we never use more than 115 + 48 xbofs */ 116 /* Check that we never use more than 115 + 48 xbofs */
117 if (xbofs > 163) { 117 if (xbofs > 163) {
118 IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __func__, 118 pr_debug("%s(), too many xbofs (%d)\n", __func__,
119 xbofs); 119 xbofs);
120 xbofs = 163; 120 xbofs = 163;
121 } 121 }
122 122
@@ -286,8 +286,8 @@ async_unwrap_bof(struct net_device *dev,
286 case INSIDE_FRAME: 286 case INSIDE_FRAME:
287 /* Not supposed to happen, the previous frame is not 287 /* Not supposed to happen, the previous frame is not
288 * finished - Jean II */ 288 * finished - Jean II */
289 IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n", 289 pr_debug("%s(), Discarding incomplete frame\n",
290 __func__); 290 __func__);
291 stats->rx_errors++; 291 stats->rx_errors++;
292 stats->rx_missed_errors++; 292 stats->rx_missed_errors++;
293 irda_device_set_media_busy(dev, TRUE); 293 irda_device_set_media_busy(dev, TRUE);
@@ -360,7 +360,7 @@ async_unwrap_eof(struct net_device *dev,
360 /* Wrong CRC, discard frame! */ 360 /* Wrong CRC, discard frame! */
361 irda_device_set_media_busy(dev, TRUE); 361 irda_device_set_media_busy(dev, TRUE);
362 362
363 IRDA_DEBUG(1, "%s(), crc error\n", __func__); 363 pr_debug("%s(), crc error\n", __func__);
364 stats->rx_errors++; 364 stats->rx_errors++;
365 stats->rx_crc_errors++; 365 stats->rx_crc_errors++;
366 } 366 }
@@ -420,8 +420,8 @@ async_unwrap_other(struct net_device *dev,
420 rx_buff->fcs = irda_fcs(rx_buff->fcs, byte); 420 rx_buff->fcs = irda_fcs(rx_buff->fcs, byte);
421#endif 421#endif
422 } else { 422 } else {
423 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", 423 pr_debug("%s(), Rx buffer overflow, aborting\n",
424 __func__); 424 __func__);
425 rx_buff->state = OUTSIDE_FRAME; 425 rx_buff->state = OUTSIDE_FRAME;
426 } 426 }
427 break; 427 break;
@@ -439,8 +439,8 @@ async_unwrap_other(struct net_device *dev,
439#endif 439#endif
440 rx_buff->state = INSIDE_FRAME; 440 rx_buff->state = INSIDE_FRAME;
441 } else { 441 } else {
442 IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n", 442 pr_debug("%s(), Rx buffer overflow, aborting\n",
443 __func__); 443 __func__);
444 rx_buff->state = OUTSIDE_FRAME; 444 rx_buff->state = OUTSIDE_FRAME;
445 } 445 }
446 break; 446 break;