aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-12-15 13:53:18 +0200
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-08 01:40:04 -0200
commitab81cbf99c881ca2b9a83682a8722fc84b2483d2 (patch)
tree7e9478c23bfa7e794fe31be04f317f5776bc80b7 /include/net/bluetooth/hci.h
parent7990681c409e8a31eac122342e64da6c3b77a249 (diff)
downloadkernel_samsung_smdk4412-ab81cbf99c881ca2b9a83682a8722fc84b2483d2.zip
kernel_samsung_smdk4412-ab81cbf99c881ca2b9a83682a8722fc84b2483d2.tar.gz
kernel_samsung_smdk4412-ab81cbf99c881ca2b9a83682a8722fc84b2483d2.tar.bz2
Bluetooth: Implement automatic setup procedure for local adapters
This patch implements automatic initialization of basic information about newly registered Bluetooth adapters. E.g. the address and features are always needed so it makes sense for the kernel to automatically power on adapters and read this information. A new HCI_SETUP flag is added to track this state. In order to not consume unnecessary amounts of power if there isn't a user space available that could switch the adapter back off, a timer is added to do this automatically as long as no Bluetooth user space seems to be present. A new HCI_AUTO_OFF flag is added that user space needs to clear to avoid the automatic power off. Additionally, the management interface index_added event is moved to the end of the HCI_SETUP stage so a user space supporting the managment inteface has all the necessary information available for fetching when it gets notified of a new adapter. The HCI_DEV_REG event is kept in the same place as before since existing HCI raw socket based user space versions depend on seeing the kernels initialization sequence (hci_init_req) to determine when the adapter is ready for use. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r--include/net/bluetooth/hci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 5d033dc..51c9df1 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -76,6 +76,9 @@ enum {
HCI_INQUIRY,
HCI_RAW,
+
+ HCI_SETUP,
+ HCI_AUTO_OFF,
};
/* HCI ioctl defines */