Skip to contentSkip to conversation

Bluetooth: Add support for setting DUT mode

PATCH New Marcel Holtmann 1 participant 1 message Oct 19, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: Add support for setting DUT mode

The Device Under Test (DUT) mode is useful for doing certification testing and so expose this as debugfs option.

This mode is actually special since you can only enter it. Restoring normal operation means that a HCI Reset is required. The current mode value gets tracked as a new device flag and when disabling it, the correct command to reset the controller is sent.

---
 include/net/bluetooth/hci.h |  3 ++
 net/bluetooth/hci_core.c    | 72 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+)
include/net/bluetooth/hci.h +3 -0
index ac9c4a7..1784c48 100644
@@ -115,6 +115,7 @@ enum {
 	HCI_PAIRABLE,
 	HCI_SERVICE_CACHE,
 	HCI_DEBUG_KEYS,
+	HCI_DUT_MODE,
 	HCI_UNREGISTER,
 	HCI_USER_CHANNEL,
 
@@ -1043,6 +1044,8 @@ struct hci_rp_write_remote_amp_assoc {
 	__u8     phy_handle;
 } __packed;
 
+#define HCI_OP_ENABLE_DUT_MODE		0x1803
+
 #define HCI_OP_WRITE_SSP_DEBUG_MODE	0x1804
 
 #define HCI_OP_LE_SET_EVENT_MASK	0x2001
net/bluetooth/hci_core.c +72 -0

84 lines not on this page · raw message

Signature · 1 line
1.8.3.1