diff -urNp 2.4.20rc1/include/net/irda/ircomm_tty.h x/include/net/irda/ircomm_tty.h --- 2.4.20rc1/include/net/irda/ircomm_tty.h Sat Nov 9 09:45:25 2002 +++ x/include/net/irda/ircomm_tty.h Sat Nov 9 17:27:08 2002 @@ -44,11 +44,6 @@ #define IRCOMM_TTY_MAJOR 161 #define IRCOMM_TTY_MINOR 0 -/* This is used as an initial value to max_header_size before the proper - * value is filled in (5 for ttp, 4 for lmp). This allow us to detect - * the state of the underlying connection. - Jean II */ -#define IRCOMM_TTY_HDR_UNITIALISED 32 - /* * IrCOMM TTY driver state */ diff -urNp 2.4.20rc1/net/irda/af_irda.c x/net/irda/af_irda.c --- 2.4.20rc1/net/irda/af_irda.c Sat Nov 2 19:45:49 2002 +++ x/net/irda/af_irda.c Sat Nov 9 17:27:08 2002 @@ -1291,9 +1291,6 @@ static int irda_sendmsg(struct socket *s /* Check if we are still connected */ if (sk->state != TCP_ESTABLISHED) return -ENOTCONN; - /* Handle signals */ - if (signal_pending(current)) - return -ERESTARTSYS; } /* Check that we don't send out to big frames */ diff -urNp 2.4.20rc1/net/irda/ircomm/ircomm_tty.c x/net/irda/ircomm/ircomm_tty.c --- 2.4.20rc1/net/irda/ircomm/ircomm_tty.c Sat Nov 2 19:45:49 2002 +++ x/net/irda/ircomm/ircomm_tty.c Sat Nov 9 17:27:08 2002 @@ -417,7 +417,7 @@ static int ircomm_tty_open(struct tty_st self->line = line; self->tqueue.routine = ircomm_tty_do_softint; self->tqueue.data = self; - self->max_header_size = IRCOMM_TTY_HDR_UNITIALISED; + self->max_header_size = 5; self->max_data_size = 64-self->max_header_size; self->close_delay = 5*HZ/10; self->closing_wait = 30*HZ; @@ -694,20 +694,6 @@ static int ircomm_tty_write(struct tty_s ASSERT(self != NULL, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); - /* We may receive packets from the TTY even before we have finished - * our setup. Not cool. - * The problem is that we would allocate a skb with bogus header and - * data size, and when adding data to it later we would get - * confused. - * Better to not accept data until we are properly setup. Use bogus - * header size to check that (safest way to detect it). - * Jean II */ - if (self->max_header_size == IRCOMM_TTY_HDR_UNITIALISED) { - /* TTY will retry */ - IRDA_DEBUG(2, __FUNCTION__ "() : not initialised\n"); - return len; - } - save_flags(flags); cli(); @@ -804,12 +790,8 @@ static int ircomm_tty_write_room(struct ASSERT(self != NULL, return -1;); ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); - /* Check if we are allowed to transmit any data. - * hw_stopped is the regular flow control. - * max_header_size tells us if the channel is initialised or not. - * Jean II */ - if ((tty->hw_stopped) || - (self->max_header_size == IRCOMM_TTY_HDR_UNITIALISED)) + /* Check if we are allowed to transmit any data */ + if (tty->hw_stopped) ret = 0; else { save_flags(flags); diff -urNp 2.4.20rc1/net/irda/ircomm/ircomm_tty_ioctl.c x/net/irda/ircomm/ircomm_tty_ioctl.c --- 2.4.20rc1/net/irda/ircomm/ircomm_tty_ioctl.c Sat Nov 2 19:45:49 2002 +++ x/net/irda/ircomm/ircomm_tty_ioctl.c Sat Nov 9 17:27:08 2002 @@ -94,9 +94,6 @@ void ircomm_tty_change_speed(struct irco if (cflag & CRTSCTS) { self->flags |= ASYNC_CTS_FLOW; self->settings.flow_control |= IRCOMM_RTS_CTS_IN; - /* This got me. Bummer. Jean II */ - if (self->service_type == IRCOMM_3_WIRE_RAW) - WARNING(__FUNCTION__ "(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n"); } else { self->flags &= ~ASYNC_CTS_FLOW; self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; diff -urNp 2.4.20rc1/net/irda/irlap_event.c x/net/irda/irlap_event.c --- 2.4.20rc1/net/irda/irlap_event.c Sat Nov 2 19:45:49 2002 +++ x/net/irda/irlap_event.c Sat Nov 9 17:27:08 2002 @@ -174,12 +174,6 @@ static void irlap_poll_timer_expired(voi irlap_do_event(self, POLL_TIMER_EXPIRED, NULL, NULL); } -/* - * Calculate and set time before we will have to send back the pf bit - * to the peer. Use in primary. - * Make sure that state is XMIT_P/XMIT_S when calling this function - * (and that nobody messed up with the state). - Jean II - */ void irlap_start_poll_timer(struct irlap_cb *self, int timeout) { ASSERT(self != NULL, return;); @@ -1169,26 +1163,15 @@ static int irlap_state_nrm_p(struct irla self->ack_required = TRUE; irlap_wait_min_turn_around(self, &self->qos_tx); - - /* Call higher layer *before* changing state - * to give them a chance to send data in the - * next LAP frame. - * Jean II */ - irlap_data_indication(self, skb, FALSE); - - /* XMIT states are the most dangerous state - * to be in, because user requests are - * processed directly and may change state. - * On the other hand, in NDM_P, those - * requests are queued and we will process - * them when we return to irlap_do_event(). - * Jean II + /* + * Important to switch state before calling + * upper layers */ irlap_next_state(self, LAP_XMIT_P); - /* This is the last frame. - * Make sure it's always called in XMIT state. - * - Jean II */ + irlap_data_indication(self, skb, FALSE); + + /* This is the last frame */ irlap_start_poll_timer(self, self->poll_timeout); } break; @@ -1326,7 +1309,6 @@ static int irlap_state_nrm_p(struct irla } else { del_timer(&self->final_timer); irlap_data_indication(self, skb, TRUE); - irlap_next_state(self, LAP_XMIT_P); printk(__FUNCTION__ "(): RECV_UI_FRAME: next state %s\n", irlap_state[self->state]); irlap_start_poll_timer(self, self->poll_timeout); }