tree 0cbd3c78723f3a66b9a35c725fa1328ebad28453 parent 85a1e930bf628700e8e9c166b1f5c1c26d3651cc author Timo Ter�s <[EMAIL PROTECTED]> Wed, 10 Aug 2005 10:28:21 -0700 committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 05:54:58 -0700
[Bluetooth]: Call tty_hangup() when DCD is de-asserted The RFCOMM layer does not handle properly the de-assertation of CD signal. It should call tty_hangup() to work properly. Signed-off-by: Timo Ter�s <[EMAIL PROTECTED]> Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> net/bluetooth/rfcomm/tty.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -528,9 +528,14 @@ static void rfcomm_dev_modem_status(stru struct rfcomm_dev *dev = dlc->owner; if (!dev) return; - + BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig); + if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV)) { + if (dev->tty && !C_CLOCAL(dev->tty)) + tty_hangup(dev->tty); + } + dev->modem_status = ((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : 0) | ((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : 0) | - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html