diff options
Diffstat (limited to 'net/irda/irlap_event.c')
-rw-r--r-- | net/irda/irlap_event.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 0b02073ffdf3..a8b8873aa263 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -317,23 +317,6 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Function irlap_next_state (self, state) | ||
321 | * | ||
322 | * Switches state and provides debug information | ||
323 | * | ||
324 | */ | ||
325 | static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state) | ||
326 | { | ||
327 | /* | ||
328 | if (!self || self->magic != LAP_MAGIC) | ||
329 | return; | ||
330 | |||
331 | IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]); | ||
332 | */ | ||
333 | self->state = state; | ||
334 | } | ||
335 | |||
336 | /* | ||
337 | * Function irlap_state_ndm (event, skb, frame) | 320 | * Function irlap_state_ndm (event, skb, frame) |
338 | * | 321 | * |
339 | * NDM (Normal Disconnected Mode) state | 322 | * NDM (Normal Disconnected Mode) state |
@@ -1086,7 +1069,6 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1086 | } else { | 1069 | } else { |
1087 | /* Final packet of window */ | 1070 | /* Final packet of window */ |
1088 | irlap_send_data_primary_poll(self, skb); | 1071 | irlap_send_data_primary_poll(self, skb); |
1089 | irlap_next_state(self, LAP_NRM_P); | ||
1090 | 1072 | ||
1091 | /* | 1073 | /* |
1092 | * Make sure state machine does not try to send | 1074 | * Make sure state machine does not try to send |
@@ -1436,14 +1418,14 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1436 | */ | 1418 | */ |
1437 | self->remote_busy = FALSE; | 1419 | self->remote_busy = FALSE; |
1438 | 1420 | ||
1421 | /* Stop final timer */ | ||
1422 | del_timer(&self->final_timer); | ||
1423 | |||
1439 | /* | 1424 | /* |
1440 | * Nr as expected? | 1425 | * Nr as expected? |
1441 | */ | 1426 | */ |
1442 | ret = irlap_validate_nr_received(self, info->nr); | 1427 | ret = irlap_validate_nr_received(self, info->nr); |
1443 | if (ret == NR_EXPECTED) { | 1428 | if (ret == NR_EXPECTED) { |
1444 | /* Stop final timer */ | ||
1445 | del_timer(&self->final_timer); | ||
1446 | |||
1447 | /* Update Nr received */ | 1429 | /* Update Nr received */ |
1448 | irlap_update_nr_received(self, info->nr); | 1430 | irlap_update_nr_received(self, info->nr); |
1449 | 1431 | ||
@@ -1475,14 +1457,12 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1475 | 1457 | ||
1476 | /* Resend rejected frames */ | 1458 | /* Resend rejected frames */ |
1477 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1459 | irlap_resend_rejected_frames(self, CMD_FRAME); |
1478 | 1460 | irlap_start_final_timer(self, self->final_timeout * 2); | |
1479 | /* Final timer ??? Jean II */ | ||
1480 | 1461 | ||
1481 | irlap_next_state(self, LAP_NRM_P); | 1462 | irlap_next_state(self, LAP_NRM_P); |
1482 | } else if (ret == NR_INVALID) { | 1463 | } else if (ret == NR_INVALID) { |
1483 | IRDA_DEBUG(1, "%s(), Received RR with " | 1464 | IRDA_DEBUG(1, "%s(), Received RR with " |
1484 | "invalid nr !\n", __FUNCTION__); | 1465 | "invalid nr !\n", __FUNCTION__); |
1485 | del_timer(&self->final_timer); | ||
1486 | 1466 | ||
1487 | irlap_next_state(self, LAP_RESET_WAIT); | 1467 | irlap_next_state(self, LAP_RESET_WAIT); |
1488 | 1468 | ||