Bluetooth: Align socket option definitions with upstream kernel
The upstream kernel has acquired new BT socket options since
BT_AMP_POLICY was first defined, now BT_FLUSHABLE is option 8 and
BT_POWER is option 9. It will save us some future pain if we align
with upstream code now and make BT_AMP_POLICY be option 10.
In addition, the option values for BT_AMP_POLICY were changed during
the upstreaming process.
CRs-fixed: 313757
Change-Id: Ia31e9c8cfd5207a6dd44e40a605d3021f5ce9fd9
Signed-off-by: Mat Martineau <mathewm@codeaurora.org>
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 643a497..155c6fd 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -66,12 +66,12 @@
#define BT_DEFER_SETUP 7
-#define BT_POWER 8
+#define BT_POWER 9
struct bt_power {
__u8 force_active;
};
-#define BT_AMP_POLICY 9
+#define BT_AMP_POLICY 10
/* Require BR/EDR (default policy)
* AMP controllers cannot be used
@@ -80,6 +80,13 @@
*/
#define BT_AMP_POLICY_REQUIRE_BR_EDR 0
+/* Prefer BR/EDR
+ * 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_AMP_POLICY_PREFER_BR_EDR 1
+
/* Prefer AMP
* Allow use of AMP controllers
* If the L2CAP channel is currently on BR/EDR and AMP controller
@@ -89,14 +96,7 @@
* and configure the channel directly on an AMP controller rather
* than BR/EDR
*/
-#define BT_AMP_POLICY_PREFER_AMP 1
-
-/* Prefer BR/EDR
- * 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_AMP_POLICY_PREFER_BR_EDR 2
+#define BT_AMP_POLICY_PREFER_AMP 2
#define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)