LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
@ 2007-10-24 3:14 Dave Young
0 siblings, 0 replies; only message in thread
From: Dave Young @ 2007-10-24 3:14 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: bluez-devel, LKML
According to the bluetooth HID spec v1.0 chapter 7.4.2
"This code requests a major state change in a BT-HID device. A HID_CONTROL request does not generate a HANDSHAKE response."
"A HID_CONTROL packet with a parameter of VIRTUAL_CABLE_UNPLUG is the only HID_CONTROL packet a device can send to a host. A host will ignore all other packets."
So in the hidp_precess_hid_control function, we just need to deal with the UNLUG packet.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
net/bluetooth/hidp/core.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff -upr linux/net/bluetooth/hidp/core.c linux.new/net/bluetooth/hidp/core.c
--- linux/net/bluetooth/hidp/core.c 2007-10-15 14:05:23.000000000 +0800
+++ linux.new/net/bluetooth/hidp/core.c 2007-10-24 11:01:07.000000000 +0800
@@ -369,30 +369,13 @@ static inline void hidp_process_hid_cont
{
BT_DBG("session %p param 0x%02x", session, param);
- switch (param) {
- case HIDP_CTRL_NOP:
- break;
-
- case HIDP_CTRL_VIRTUAL_CABLE_UNPLUG:
+ if (param == HIDP_CTRL_VIRTUAL_CABLE_UNPLUG) {
/* Flush the transmit queues */
skb_queue_purge(&session->ctrl_transmit);
skb_queue_purge(&session->intr_transmit);
/* Kill session thread */
atomic_inc(&session->terminate);
- break;
-
- case HIDP_CTRL_HARD_RESET:
- case HIDP_CTRL_SOFT_RESET:
- case HIDP_CTRL_SUSPEND:
- case HIDP_CTRL_EXIT_SUSPEND:
- /* FIXME: We have to parse these and return no error */
- break;
-
- default:
- __hidp_send_ctrl_message(session,
- HIDP_TRANS_HANDSHAKE | HIDP_HSHK_ERR_INVALID_PARAMETER, NULL, 0);
- break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-24 3:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 3:14 [PATCH] bluetooth: hidp_process_hid_control remove unnecessary parameter dealing Dave Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).