Bluetooth: Add BT_POWER L2CAP socket option.
authorJaikumar Ganesh <jaikumar@google.com>
Wed, 10 Nov 2010 03:07:45 +0000 (19:07 -0800)
committerJaikumar Ganesh <jaikumar@google.com>
Wed, 10 Nov 2010 23:59:50 +0000 (15:59 -0800)
commit901204dc1797ec61c066ce9afecc56d6e874c187
treeb14fbd9642c6a64b4a33594f437492122e608ac9
parentdfa196f0e99696d22a4329ea3494175740904a26
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>
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.c