aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDave Young <hidave.darkstar@gmail.com>2008-02-05 06:07:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-05 06:07:14 -0500
commiteff001e35a857361f3fb289fea86e97c334a5446 (patch)
treec7ec83833c94eab39fd844a36a51896a63878f8b /net
parenta26af1e08a3a1e0f88e6f2685ac2313d713a59c9 (diff)
bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hidp/core.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 782a22602b86..b5c40d60cdf3 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -369,30 +369,13 @@ static inline void hidp_process_hid_control(struct hidp_session *session, unsign
369{ 369{
370 BT_DBG("session %p param 0x%02x", session, param); 370 BT_DBG("session %p param 0x%02x", session, param);
371 371
372 switch (param) { 372 if (param == HIDP_CTRL_VIRTUAL_CABLE_UNPLUG) {
373 case HIDP_CTRL_NOP:
374 break;
375
376 case HIDP_CTRL_VIRTUAL_CABLE_UNPLUG:
377 /* Flush the transmit queues */ 373 /* Flush the transmit queues */
378 skb_queue_purge(&session->ctrl_transmit); 374 skb_queue_purge(&session->ctrl_transmit);
379 skb_queue_purge(&session->intr_transmit); 375 skb_queue_purge(&session->intr_transmit);
380 376
381 /* Kill session thread */ 377 /* Kill session thread */
382 atomic_inc(&session->terminate); 378 atomic_inc(&session->terminate);
383 break;
384
385 case HIDP_CTRL_HARD_RESET:
386 case HIDP_CTRL_SOFT_RESET:
387 case HIDP_CTRL_SUSPEND:
388 case HIDP_CTRL_EXIT_SUSPEND:
389 /* FIXME: We have to parse these and return no error */
390 break;
391
392 default:
393 __hidp_send_ctrl_message(session,
394 HIDP_TRANS_HANDSHAKE | HIDP_HSHK_ERR_INVALID_PARAMETER, NULL, 0);
395 break;
396 } 379 }
397} 380}
398 381