]> 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)
commit28428e78e8c4423b6bd7d72f9418cc2eaadd054f
tree9d1475b02d828725aeb80f0366d50c77aa5c2bb3
parent6c7ddd8f641c806e1eccb0d79d9ad4b675a34baf
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