summaryrefslogtreecommitdiff
path: root/net/8021q
diff options
context:
space:
mode:
authorGianluca Anzolin <gianluca@sottospazio.it>2014-01-06 21:23:52 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-01-06 13:51:45 -0800
commit4a2fb3ecc7467c775b154813861f25a0ddc11aa0 (patch)
tree7673d900599d3fe9c053483d58e171d20aa55e69 /net/8021q
parente228b63390536f5b737056059a9a04ea016b1abf (diff)
Bluetooth: Always wait for a connection on RFCOMM open()
This patch fixes two regressions introduced with the recent rfcomm tty rework. The current code uses the carrier_raised() method to wait for the bluetooth connection when a process opens the tty. However processes may open the port with the O_NONBLOCK flag or set the CLOCAL termios flag: in these cases the open() syscall returns immediately without waiting for the bluetooth connection to complete. This behaviour confuses userspace which expects an established bluetooth connection. The patch restores the old behaviour by waiting for the connection in rfcomm_dev_activate() and removes carrier_raised() from the tty_port ops. As a side effect the new code also fixes the case in which the rfcomm tty device is created with the flag RFCOMM_REUSE_DLC: the old code didn't call device_move() and ModemManager skipped the detection probe. Now device_move() is always called inside rfcomm_dev_activate(). Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it> Reported-by: Andrey Vihrov <andrey.vihrov@gmail.com> Reported-by: Beson Chow <blc+bluez@mail.vanade.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/8021q')
0 files changed, 0 insertions, 0 deletions