diff options
Diffstat (limited to 'net/irda/irlmp_event.c')
-rw-r--r-- | net/irda/irlmp_event.c | 121 |
1 files changed, 50 insertions, 71 deletions
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 | ||
170 | void irlmp_discovery_timer_expired(void *data) | 170 | void 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, | |||
256 | static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, | 250 | static 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, | |||
306 | static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, | 299 | static 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, | |||
381 | static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, | 374 | static 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; |