linux/net/bluetooth
Mat Martineau 6fdf482bb3 Bluetooth: Use a stream-oriented recvmsg with SOCK_STREAM L2CAP sockets.
L2CAP ERTM sockets can be opened with the SOCK_STREAM socket type,
which is a mandatory request for ERTM mode.

However, these sockets still have SOCK_SEQPACKET read semantics when
bt_sock_recvmsg() is used to pull data from the receive queue.  If the
application is only reading part of a frame, then the unread portion
of the frame is discarded.  If the application requests more bytes
than are in the current frame, only the current frame's data is
returned.

This patch utilizes common code derived from RFCOMM's recvmsg()
function to make L2CAP SOCK_STREAM reads behave like RFCOMM reads (and
other SOCK_STREAM sockets in general).  The application may read one
byte at a time from the input stream and not lose any data, and may
also read across L2CAP frame boundaries.

Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2010-10-12 12:44:51 -03:00
..
bnep Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-07-07 15:59:38 -07:00
cmtp net: sk_sleep() helper 2010-04-20 16:37:13 -07:00
hidp net: sk_sleep() helper 2010-04-20 16:37:13 -07:00
rfcomm Bluetooth: Use common SOCK_STREAM receive code in RFCOMM 2010-10-12 12:44:51 -03:00
af_bluetooth.c Bluetooth: Add common code for stream-oriented recvmsg() 2010-10-12 12:44:51 -03:00
hci_conn.c Bluetooth: Defer SCO setup if mode change is pending 2010-07-27 12:29:04 -07:00
hci_core.c Bluetooth: Use list_head for HCI blacklist head 2010-07-31 16:06:58 -07:00
hci_event.c Bluetooth: Defer SCO setup if mode change is pending 2010-07-27 12:29:04 -07:00
hci_sock.c Bluetooth: Use list_head for HCI blacklist head 2010-07-31 16:06:58 -07:00
hci_sysfs.c Bluetooth: HCI devices are either BR/EDR or AMP radios 2010-10-12 12:44:51 -03:00
Kconfig Bluetooth: Remove L2CAP Extended Features from Kconfig 2010-07-21 10:39:04 -07:00
l2cap.c Bluetooth: Use a stream-oriented recvmsg with SOCK_STREAM L2CAP sockets. 2010-10-12 12:44:51 -03:00
lib.c [NET] BLUETOOTH: Fix whitespace errors. 2007-02-10 23:19:20 -08:00
Makefile
sco.c net: Remove unnecessary returns from void function()s 2010-05-17 23:23:14 -07:00