]> git.itanic.dy.fi Git - linux-stable/commit
tty: n_gsm: fix wrong tty control line for flow control
authordaniel.starke@siemens.com <daniel.starke@siemens.com>
Fri, 18 Feb 2022 07:31:21 +0000 (23:31 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:42:57 +0000 (11:42 +0100)
commite4c8cb95d03543c721e7a1265253eda2ce1b8370
tree5628a17da0898ef6caf153bd20dcc55af40b4cca
parent1f0641dd0b6c60093825337563e1c9abec41757c
tty: n_gsm: fix wrong tty control line for flow control

commit c19d93542a6081577e6da9bf5e887979c72e80c1 upstream.

tty flow control is handled via gsmtty_throttle() and gsmtty_unthrottle().
Both functions propagate the outgoing hardware flow control state to the
remote side via MSC (modem status command) frames. The local state is taken
from the RTS (ready to send) flag of the tty. However, RTS gets mapped to
DTR (data terminal ready), which is wrong.
This patch corrects this by mapping RTS to RTS.

Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220218073123.2121-5-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c