aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorTimo Teräs <ext-timo.teras@nokia.com>2005-08-09 23:28:21 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:54:58 -0400
commit7b9eb9e2099f6f4acd6a36bcd7820d27c3cf5ee3 (patch)
tree0cbd3c78723f3a66b9a35c725fa1328ebad28453 /net/bluetooth
parent85a1e930bf628700e8e9c166b1f5c1c26d3651cc (diff)
[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 <ext-timo.teras@nokia.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/rfcomm/tty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index 6304590fd36a..67d9dd6b0fac 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -528,9 +528,14 @@ static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
528 struct rfcomm_dev *dev = dlc->owner; 528 struct rfcomm_dev *dev = dlc->owner;
529 if (!dev) 529 if (!dev)
530 return; 530 return;
531 531
532 BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig); 532 BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig);
533 533
534 if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV)) {
535 if (dev->tty && !C_CLOCAL(dev->tty))
536 tty_hangup(dev->tty);
537 }
538
534 dev->modem_status = 539 dev->modem_status =
535 ((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : 0) | 540 ((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : 0) |
536 ((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : 0) | 541 ((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : 0) |