Skip to contentSkip to conversation

Add support for switching from HCI->HID mode for Dell BT adapters.

PATCH In review Mario Limonciello 2 participants 4 messages May 15, 2009 – May 16, 2009 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 Add support for switching from HCI->HID mode for Dell BT adapters.

This allows Dell BT adapters to be able to be switched back to HID mode (if users desire to do so).

---
 tools/hid2hci.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

Attaching patch to prevent Exchange mangling.

Signature · 3 lines
Mario Limonciello
*Dell | Linux Engineering*
[email protected]

From 216dca63772bc976d8f58b31aa596e53e2bf36a0 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Fri, 15 May 2009 14:34:15 -0500
Subject: [PATCH] Add support for switching from HCI->HID mode for Dell BT adapters.

---
 tools/hid2hci.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
tools/hid2hci.c +10 -1
index dace0ea..f57a333 100644
@@ -208,7 +208,16 @@ static int switch_logitech(struct device_info *devinfo)
 
 static int switch_dell(struct device_info *devinfo)
 {
-	char report[] = { 0x7f, 0x13, 0x00, 0x00 };
+	char mode;
+	switch(devinfo->mode) {
+		case HCI:
+			mode = 0x13;
+			break;
+		case HID:
+			mode = 0x14;
+			break;
+	}
+	char report[] = { 0x7f, mode, 0x00, 0x00 };
 
 	struct usb_dev_handle *handle;
 	int err;
Signature · 1 line
1.6.0.4
maintainer
#1 lore raw

Hi Mario,

Quoted 8 lines

This allows Dell BT adapters to be able to be switched back to HID mode (if users desire to do so).

---
 tools/hid2hci.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

Attaching patch to prevent Exchange mangling.

did you ever tested this patch with --enable-debug compilation? No code before variable declaration. Please fix that.

Regards

Marcel

#2 lore raw

Hi Marcel:

Quoted 9 lines · Marcel Holtmann

Hi Mario,

did you ever tested this patch with --enable-debug compilation? No code before variable declaration. Please fix that.

Regards

Marcel

No, I didn't realize I was supposed to test with --enable-debug. I've done so now and fixed up this patch. See attached.

Regards

Signature · 3 lines
Mario Limonciello
*Dell | Linux Engineering*
[email protected]

From 424c70338db22122e78e53c767c4224d2c6f2a29 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Fri, 15 May 2009 16:54:39 -0500
Subject: [PATCH] Add support for switching from HCI->HID mode for Dell BT adapters.
This allows Dell BT adapters to be able to be switched back to HID mode if users desire to do so, such as on shutdown.

---
 tools/hid2hci.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
tools/hid2hci.c +10 -1
index 7692de3..bf03739 100644
@@ -207,11 +207,20 @@ static int switch_logitech(struct device_info *devinfo)
 
 static int switch_dell(struct device_info *devinfo)
 {
-	char report[] = { 0x7f, 0x13, 0x00, 0x00 };
+	char report[] = { 0x7f, 0x00, 0x00, 0x00 };
 
 	struct usb_dev_handle *handle;
 	int err;
 
+	switch(devinfo->mode) {
+		case HCI:
+			report[1] = 0x13;
+			break;
+		case HID:
+			report[1] = 0x14;
+			break;
+	}
+
 	handle = usb_open(devinfo->dev);
 	if (handle) {
 		usb_claim_interface(handle, 0);
Signature · 1 line
1.6.0.4
maintainer
#3 lore raw

Hi Mario,

Quoted 6 lines
Quoted 4 lines

did you ever tested this patch with --enable-debug compilation? No code before variable declaration. Please fix that.

No, I didn't realize I was supposed to test with --enable-debug. I've done so now and fixed up this patch. See attached.

patch has been applied. Thanks.

Regards

Marcel