diff options
author | Nikola Diklic-Perin <diklic.perin.nikola@gmail.com> | 2011-09-23 04:59:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 19:38:44 -0400 |
commit | cf16807b61d15e42b20407c954a01a3774520ea7 (patch) | |
tree | 93a60da8ed0cc30094e381ce6dd954c568fdc741 /drivers/tty/n_gsm.c | |
parent | fd01a7a1bf6722e32efa679f15507148784af1f7 (diff) |
tty/n_gsm: fix bug in tiocmset
Clear bitmask was not inverted before masking modem_tx.
Calling ioctl(fd, TIOCMBIC, TIOCM_RTS) results in:
[ 197.430000] pre_modem_tx: 0x00000006
[ 197.430000] clear: 0x00000004
[ 197.430000] set: 0x00000000
[ 197.440000] post_modem_tx: 0x00000004
which is wrong.
Signed-off-by: Nikola Diklic-Perin <diklic.perin.nikola@gmail.com>
Acked-by: Alan Cox <alan@linx.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r-- | drivers/tty/n_gsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8d7766bfef87..da3b31a98654 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -2989,7 +2989,7 @@ static int gsmtty_tiocmset(struct tty_struct *tty, | |||
2989 | struct gsm_dlci *dlci = tty->driver_data; | 2989 | struct gsm_dlci *dlci = tty->driver_data; |
2990 | unsigned int modem_tx = dlci->modem_tx; | 2990 | unsigned int modem_tx = dlci->modem_tx; |
2991 | 2991 | ||
2992 | modem_tx &= clear; | 2992 | modem_tx &= ~clear; |
2993 | modem_tx |= set; | 2993 | modem_tx |= set; |
2994 | 2994 | ||
2995 | if (modem_tx != dlci->modem_tx) { | 2995 | if (modem_tx != dlci->modem_tx) { |