Bluetooth: Add BT_POWER L2CAP socket option.
authorJaikumar Ganesh <jaikumar@google.com>
Tue, 24 May 2011 01:06:04 +0000 (18:06 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:10:32 +0000 (12:10 -0800)
commit189e44974da3b27b1d6f9d24c8366acc573944b5
treeaab071d4a2c458d42504a7662ea3cecdcd453221
parent17acc4e0d065d6236cc4eacb542cf9e25bbe43c7
Bluetooth: Add BT_POWER L2CAP socket option.

Add BT_POWER socket option used to control the power
characteristics of the underlying ACL link. When the remote end
has put the link in sniff mode and the host stack wants to send
data we need need to explicitly exit sniff mode to work well with
certain devices (For example, A2DP on Plantronics Voyager 855).
However, this causes problems with HID devices.

Hence, moving into active mode when sending data, irrespective
of who set the sniff mode has been made as a socket option. By
default, we will move into active mode. HID devices can set the
L2CAP socket option to prevent this from happening.

Currently, this has been implemented for L2CAP sockets. This has been
tested with incoming and outgoing L2CAP sockets for HID and A2DP.

Based on discussions on linux-bluetooth and patches submitted by
Andrei Emeltchenko.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/bluetooth.h
include/net/bluetooth/hci_core.h
include/net/bluetooth/l2cap.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_core.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c