]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Bluetooth: rfcomm: fix modem control handling
authorJohan Hovold <johan@kernel.org>
Thu, 23 Oct 2025 12:05:30 +0000 (14:05 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 24 Oct 2025 14:32:19 +0000 (10:32 -0400)
commit91d35ec9b3956d6b3cf789c1593467e58855b03a
treea82634c908607148ed75013b809554b4d0c8ebec
parent751463ceefc3397566d03c8b64ef4a77f5fd88ac
Bluetooth: rfcomm: fix modem control handling

The RFCOMM driver confuses the local and remote modem control signals,
which specifically means that the reported DTR and RTS state will
instead reflect the remote end (i.e. DSR and CTS).

This issue dates back to the original driver (and a follow-on update)
merged in 2002, which resulted in a non-standard implementation of
TIOCMSET that allowed controlling also the TS07.10 IC and DV signals by
mapping them to the RI and DCD input flags, while TIOCMGET failed to
return the actual state of DTR and RTS.

Note that the bogus control of input signals in tiocmset() is just
dead code as those flags will have been masked out by the tty layer
since 2003.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/rfcomm/tty.c