aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-02-24 10:44:23 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-03-01 17:50:19 -0800
commit0c4f34ebba190619a24c012d28cea85b5aed47cb (patch)
tree8524bd1d053d9b378b27aba328076af89cee6293
parent88f271564cf0f14b1a65fbb48b9bf528bdd34ec7 (diff)
downloadbluez-hcidump-0c4f34ebba190619a24c012d28cea85b5aed47cb.tar.gz
bluez-hcidump-0c4f34ebba190619a24c012d28cea85b5aed47cb.tar.xz
bluez-hcidump-0c4f34ebba190619a24c012d28cea85b5aed47cb.zip
lib: Copy L2CAP chan policy defines from kernel
Those defines will be used by user space.
-rw-r--r--lib/bluetooth.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index 1dee6df..52606e6 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -77,6 +77,33 @@ struct bt_security {
#define BT_FLUSHABLE_OFF 0
#define BT_FLUSHABLE_ON 1
+#define BT_CHANNEL_POLICY 10
+
+/* BR/EDR only (default policy)
+ * AMP controllers cannot be used.
+ * Channel move requests from the remote device are denied.
+ * If the L2CAP channel is currently using AMP, move the channel to BR/EDR.
+ */
+#define BT_CHANNEL_POLICY_BREDR_ONLY 0
+
+/* BR/EDR Preferred
+ * Allow use of AMP controllers.
+ * If the L2CAP channel is currently on AMP, move it to BR/EDR.
+ * Channel move requests from the remote device are allowed.
+ */
+#define BT_CHANNEL_POLICY_BREDR_PREFERRED 1
+
+/* AMP Preferred
+ * Allow use of AMP controllers
+ * If the L2CAP channel is currently on BR/EDR and AMP controller
+ * resources are available, initiate a channel move to AMP.
+ * Channel move requests from the remote device are allowed.
+ * If the L2CAP socket has not been connected yet, try to create
+ * and configure the channel directly on an AMP controller rather
+ * than BR/EDR.
+ */
+#define BT_CHANNEL_POLICY_AMP_PREFERRED 2
+
/* Connection and socket states */
enum {
BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */