]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Don't fail RFCOMM tty writes
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 10 Feb 2014 01:59:22 +0000 (20:59 -0500)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 14 Feb 2014 21:39:32 +0000 (13:39 -0800)
commit06e8733d7d1d297e1bcc8fb3e5335045902fa61f
tree9d1475b02d828725aeb80f0366d50c77aa5c2bb3
parentc0ff3e11308ab66bcd062295448f37356d6cbfd2
Bluetooth: Don't fail RFCOMM tty writes

The tty driver api design prefers no-fail writes if the driver
write_room() method has previously indicated space is available
to accept writes. Since this is trivially possible for the
RFCOMM tty driver, do so.

Introduce rfcomm_dlc_send_noerror(), which queues but does not
schedule the krfcomm thread if the dlc is not yet connected
(and thus does not error based on the connection state).
The mtu size test is also unnecessary since the caller already
chunks the written data into mtu size.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/rfcomm.h
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/tty.c