[Bluetooth] Make use of the default link policy settings

Previous thread: [Bluetooth] Track connection packet type changes by Linux Kernel Mailing List on Sunday, July 20, 2008 - 7:57 pm. (1 message)

Next thread: [Bluetooth] Some cleanups for HCI event handling by Linux Kernel Mailing List on Sunday, July 20, 2008 - 7:57 pm. (1 message)
From: Linux Kernel Mailing List
Date: Sunday, July 20, 2008 - 7:57 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e4e8e3...
Commit:     e4e8e37c42bdaaefcb84eeaef0dc1bc3f696f8f6
Parent:     a8746417e864da1ed36dd2432a399fbeb843c2a0
Author:     Marcel Holtmann <marcel@holtmann.org>
AuthorDate: Mon Jul 14 20:13:47 2008 +0200
Committer:  Marcel Holtmann <marcel@holtmann.org>
CommitDate: Mon Jul 14 20:13:47 2008 +0200

    [Bluetooth] Make use of the default link policy settings
    
    The Bluetooth specification supports the default link policy settings
    on a per host controller basis. For every new connection the link
    manager would then use these settings. It is better to use this instead
    of bothering the controller on every connection setup to overwrite the
    default settings.
    
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 include/net/bluetooth/hci.h |   11 ++++++
 net/bluetooth/hci_conn.c    |    2 +
 net/bluetooth/hci_core.c    |   35 ++++++++++++++------
 net/bluetooth/hci_event.c   |   75 ++++++++++++++++++++++++++++++++++++-------
 4 files changed, 100 insertions(+), 23 deletions(-)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index f1dc174..efc8c55 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -404,6 +404,17 @@ struct hci_rp_write_link_policy {
 	__le16   handle;
 } __attribute__ ((packed));
 
+#define HCI_OP_READ_DEF_LINK_POLICY	0x080e
+struct hci_rp_read_def_link_policy {
+	__u8     status;
+	__le16   policy;
+} __attribute__ ((packed));
+
+#define HCI_OP_WRITE_DEF_LINK_POLICY	0x080f
+struct hci_cp_write_def_link_policy {
+	__le16   policy;
+} __attribute__ ((packed));
+
 #define HCI_OP_SNIFF_SUBRATE		0x0811
 struct hci_cp_sniff_subrate {
 	__le16   handle;
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 69c64ce..6175ce8 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -65,6 +65,8 @@ void ...
Previous thread: [Bluetooth] Track connection packet type changes by Linux Kernel Mailing List on Sunday, July 20, 2008 - 7:57 pm. (1 message)

Next thread: [Bluetooth] Some cleanups for HCI event handling by Linux Kernel Mailing List on Sunday, July 20, 2008 - 7:57 pm. (1 message)