diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-02-09 20:59:01 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-14 13:39:28 -0800 |
commit | 7f717b91dd68db1fa01d396d03997ed1b748659f (patch) | |
tree | b42c968695fd90e78d098bb9a2dc317999a82261 /net/bluetooth/rfcomm | |
parent | 9b7655eafeeec9e74e97e9056e820ede8d18093e (diff) | |
download | talos-op-linux-7f717b91dd68db1fa01d396d03997ed1b748659f.tar.gz talos-op-linux-7f717b91dd68db1fa01d396d03997ed1b748659f.zip |
Revert "Bluetooth: Remove rfcomm_carrier_raised()"
This reverts commit f86772af6a0f643d3e13eb3f4f9213ae0c333ee4.
This is the first of a 3-patch revert, together with
Revert "Bluetooth: Always wait for a connection on RFCOMM open()" and
Revert "Bluetooth: Move rfcomm_get_device() before rfcomm_dev_activate()".
Commit 4a2fb3ecc7467c775b154813861f25a0ddc11aa0,
"Bluetooth: Always wait for a connection on RFCOMM open()" open-codes
blocking on tty open(), rather than using the default behavior
implemented by the tty port.
The reasons for reverting that patch are detailed in that changelog;
this patch restores required functionality for that revert.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index f9c0980abeea..aeabadeef82b 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -160,6 +160,14 @@ static int rfcomm_dev_activate(struct tty_port *port, struct tty_struct *tty) return err; } +/* we block the open until the dlc->state becomes BT_CONNECTED */ +static int rfcomm_dev_carrier_raised(struct tty_port *port) +{ + struct rfcomm_dev *dev = container_of(port, struct rfcomm_dev, port); + + return (dev->dlc->state == BT_CONNECTED); +} + /* device-specific cleanup: close the dlc */ static void rfcomm_dev_shutdown(struct tty_port *port) { |