* [RESEND] [PATCH] Bluetooth: implement raw output for hidp
@ 2009-12-03 13:51 Jiri Kosina
2009-12-07 17:54 ` [RESEND #2] " Jiri Kosina
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2009-12-03 13:51 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, linux-kernel, Brian Gunn
Implment raw output callback which is used by hidraw to send raw data to
the underlying device.
Without this patch, the userspace hidraw-based applications can't send
output reports to HID bluetooth devices.
Reported-and-tested-by: Brian Gunn <bgunn@solekai.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
net/bluetooth/hidp/core.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 49d8495..5697500 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -280,6 +280,13 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
return hidp_queue_report(session, buf, rsize);
}
+static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count)
+{
+ if (hidp_queue_report(hid->driver_data, data, count))
+ return -ENOMEM;
+ return count;
+}
+
static void hidp_idle_timeout(unsigned long arg)
{
struct hidp_session *session = (struct hidp_session *) arg;
@@ -785,6 +792,8 @@ static int hidp_setup_hid(struct hidp_session *session,
hid->dev.parent = hidp_get_device(session);
hid->ll_driver = &hidp_hid_driver;
+ hid->hid_output_raw_report = hidp_output_raw_report;
+
err = hid_add_device(hid);
if (err < 0)
goto failed;
^ permalink raw reply related [flat|nested] 4+ messages in thread* [RESEND #2] [PATCH] Bluetooth: implement raw output for hidp
2009-12-03 13:51 [RESEND] [PATCH] Bluetooth: implement raw output for hidp Jiri Kosina
@ 2009-12-07 17:54 ` Jiri Kosina
2009-12-07 18:27 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2009-12-07 17:54 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, linux-kernel, Brian Gunn, Andrew Morton
Implment raw output callback which is used by hidraw to send raw data to
the underlying device.
Without this patch, the userspace hidraw-based applications can't send
output reports to HID bluetooth devices.
Reported-and-tested-by: Brian Gunn <bgunn@solekai.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
added akpm to CC.
net/bluetooth/hidp/core.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 49d8495..5697500 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -280,6 +280,13 @@ static int hidp_send_report(struct hidp_session *session, struct hid_report *rep
return hidp_queue_report(session, buf, rsize);
}
+static int hidp_output_raw_report(struct hid_device *hid, unsigned char *data, size_t count)
+{
+ if (hidp_queue_report(hid->driver_data, data, count))
+ return -ENOMEM;
+ return count;
+}
+
static void hidp_idle_timeout(unsigned long arg)
{
struct hidp_session *session = (struct hidp_session *) arg;
@@ -785,6 +792,8 @@ static int hidp_setup_hid(struct hidp_session *session,
hid->dev.parent = hidp_get_device(session);
hid->ll_driver = &hidp_hid_driver;
+ hid->hid_output_raw_report = hidp_output_raw_report;
+
err = hid_add_device(hid);
if (err < 0)
goto failed;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [RESEND #2] [PATCH] Bluetooth: implement raw output for hidp
2009-12-07 17:54 ` [RESEND #2] " Jiri Kosina
@ 2009-12-07 18:27 ` Marcel Holtmann
2009-12-07 19:05 ` Jiri Kosina
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2009-12-07 18:27 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-bluetooth, linux-kernel, Brian Gunn, Andrew Morton
Hi Jiri,
> Implment raw output callback which is used by hidraw to send raw data to
> the underlying device.
>
> Without this patch, the userspace hidraw-based applications can't send
> output reports to HID bluetooth devices.
that is in the bluetooth-next and net-next tree already. Linus should be
pulling it any time soon.
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RESEND #2] [PATCH] Bluetooth: implement raw output for hidp
2009-12-07 18:27 ` Marcel Holtmann
@ 2009-12-07 19:05 ` Jiri Kosina
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2009-12-07 19:05 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: linux-bluetooth, linux-kernel, Brian Gunn, Andrew Morton
On Mon, 7 Dec 2009, Marcel Holtmann wrote:
> > Implment raw output callback which is used by hidraw to send raw data to
> > the underlying device.
> >
> > Without this patch, the userspace hidraw-based applications can't send
> > output reports to HID bluetooth devices.
>
> that is in the bluetooth-next and net-next tree already. Linus should be
> pulling it any time soon.
Hi Marcel,
ah, I have been looking into wrong tree (bluetooth-2.6 instead of
bluetooth-next-2.6).
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-07 19:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 13:51 [RESEND] [PATCH] Bluetooth: implement raw output for hidp Jiri Kosina
2009-12-07 17:54 ` [RESEND #2] " Jiri Kosina
2009-12-07 18:27 ` Marcel Holtmann
2009-12-07 19:05 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox