diff options
Diffstat (limited to 'net/irda/ircomm/ircomm_tty_ioctl.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty_ioctl.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c index 75ccdbd0728e..d3687aaa23de 100644 --- a/net/irda/ircomm/ircomm_tty_ioctl.c +++ b/net/irda/ircomm/ircomm_tty_ioctl.c | |||
@@ -158,26 +158,21 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
158 | ircomm_tty_change_speed(self, tty); | 158 | ircomm_tty_change_speed(self, tty); |
159 | 159 | ||
160 | /* Handle transition to B0 status */ | 160 | /* Handle transition to B0 status */ |
161 | if ((old_termios->c_cflag & CBAUD) && | 161 | if ((old_termios->c_cflag & CBAUD) && !(cflag & CBAUD)) { |
162 | !(cflag & CBAUD)) { | ||
163 | self->settings.dte &= ~(IRCOMM_DTR|IRCOMM_RTS); | 162 | self->settings.dte &= ~(IRCOMM_DTR|IRCOMM_RTS); |
164 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 163 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
165 | } | 164 | } |
166 | 165 | ||
167 | /* Handle transition away from B0 status */ | 166 | /* Handle transition away from B0 status */ |
168 | if (!(old_termios->c_cflag & CBAUD) && | 167 | if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { |
169 | (cflag & CBAUD)) { | ||
170 | self->settings.dte |= IRCOMM_DTR; | 168 | self->settings.dte |= IRCOMM_DTR; |
171 | if (!(tty->termios.c_cflag & CRTSCTS) || | 169 | if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags)) |
172 | !test_bit(TTY_THROTTLED, &tty->flags)) { | ||
173 | self->settings.dte |= IRCOMM_RTS; | 170 | self->settings.dte |= IRCOMM_RTS; |
174 | } | ||
175 | ircomm_param_request(self, IRCOMM_DTE, TRUE); | 171 | ircomm_param_request(self, IRCOMM_DTE, TRUE); |
176 | } | 172 | } |
177 | 173 | ||
178 | /* Handle turning off CRTSCTS */ | 174 | /* Handle turning off CRTSCTS */ |
179 | if ((old_termios->c_cflag & CRTSCTS) && | 175 | if ((old_termios->c_cflag & CRTSCTS) && !C_CRTSCTS(tty)) |
180 | !(tty->termios.c_cflag & CRTSCTS)) | ||
181 | { | 176 | { |
182 | tty->hw_stopped = 0; | 177 | tty->hw_stopped = 0; |
183 | ircomm_tty_start(tty); | 178 | ircomm_tty_start(tty); |