* [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters.
@ 2009-05-15 19:40 Mario Limonciello
2009-05-15 20:06 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2009-05-15 19:40 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]
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.
--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Add-support-for-switching-from-HCI-HID-mode-for-Del.patch --]
[-- Type: text/x-patch; name="0001-Add-support-for-switching-from-HCI-HID-mode-for-Del.patch", Size: 907 bytes --]
From 216dca63772bc976d8f58b31aa596e53e2bf36a0 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <Mario_Limonciello@Dell.com>
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(-)
diff --git a/tools/hid2hci.c b/tools/hid2hci.c
index dace0ea..f57a333 100644
--- a/tools/hid2hci.c
+++ b/tools/hid2hci.c
@@ -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;
--
1.6.0.4
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters.
2009-05-15 19:40 [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters Mario Limonciello
@ 2009-05-15 20:06 ` Marcel Holtmann
2009-05-15 22:07 ` Mario Limonciello
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2009-05-15 20:06 UTC (permalink / raw)
To: Mario Limonciello; +Cc: linux-bluetooth@vger.kernel.org
Hi Mario,
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters.
2009-05-15 20:06 ` Marcel Holtmann
@ 2009-05-15 22:07 ` Mario Limonciello
2009-05-16 13:36 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2009-05-15 22:07 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth@vger.kernel.org
[-- Attachment #1.1: Type: text/plain, Size: 427 bytes --]
Hi Marcel:
Marcel Holtmann wrote:
> 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
--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0002-Add-support-for-switching-from-HCI-HID-mode-for-Del.patch --]
[-- Type: text/x-patch; name="0002-Add-support-for-switching-from-HCI-HID-mode-for-Del.patch", Size: 1120 bytes --]
From 424c70338db22122e78e53c767c4224d2c6f2a29 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <Mario_Limonciello@Dell.com>
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(-)
diff --git a/tools/hid2hci.c b/tools/hid2hci.c
index 7692de3..bf03739 100644
--- a/tools/hid2hci.c
+++ b/tools/hid2hci.c
@@ -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);
--
1.6.0.4
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters.
2009-05-15 22:07 ` Mario Limonciello
@ 2009-05-16 13:36 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2009-05-16 13:36 UTC (permalink / raw)
To: Mario Limonciello; +Cc: linux-bluetooth@vger.kernel.org
Hi Mario,
> > 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-16 13:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 19:40 [PATCH 2/3] Add support for switching from HCI->HID mode for Dell BT adapters Mario Limonciello
2009-05-15 20:06 ` Marcel Holtmann
2009-05-15 22:07 ` Mario Limonciello
2009-05-16 13:36 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox