diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:09:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-02 23:09:08 -0500 |
commit | 13df7977431e3b906a23bb75f29e0f40a8d73f87 (patch) | |
tree | bc2c78c3b816a65f90c31cccebdc15b38352c045 /net/bluetooth/hidp/core.c | |
parent | 6d8b3e1ad3d3815d9c87b8553493301e243af76a (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) |
Merge 3.14-rc5 into driver-core-next
We want the fixes in here.
Diffstat (limited to 'net/bluetooth/hidp/core.c')
-rw-r--r-- | net/bluetooth/hidp/core.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 292e619db896..d9fb93451442 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -430,6 +430,16 @@ static void hidp_del_timer(struct hidp_session *session) | |||
430 | del_timer(&session->timer); | 430 | del_timer(&session->timer); |
431 | } | 431 | } |
432 | 432 | ||
433 | static void hidp_process_report(struct hidp_session *session, | ||
434 | int type, const u8 *data, int len, int intr) | ||
435 | { | ||
436 | if (len > HID_MAX_BUFFER_SIZE) | ||
437 | len = HID_MAX_BUFFER_SIZE; | ||
438 | |||
439 | memcpy(session->input_buf, data, len); | ||
440 | hid_input_report(session->hid, type, session->input_buf, len, intr); | ||
441 | } | ||
442 | |||
433 | static void hidp_process_handshake(struct hidp_session *session, | 443 | static void hidp_process_handshake(struct hidp_session *session, |
434 | unsigned char param) | 444 | unsigned char param) |
435 | { | 445 | { |
@@ -502,7 +512,8 @@ static int hidp_process_data(struct hidp_session *session, struct sk_buff *skb, | |||
502 | hidp_input_report(session, skb); | 512 | hidp_input_report(session, skb); |
503 | 513 | ||
504 | if (session->hid) | 514 | if (session->hid) |
505 | hid_input_report(session->hid, HID_INPUT_REPORT, skb->data, skb->len, 0); | 515 | hidp_process_report(session, HID_INPUT_REPORT, |
516 | skb->data, skb->len, 0); | ||
506 | break; | 517 | break; |
507 | 518 | ||
508 | case HIDP_DATA_RTYPE_OTHER: | 519 | case HIDP_DATA_RTYPE_OTHER: |
@@ -584,7 +595,8 @@ static void hidp_recv_intr_frame(struct hidp_session *session, | |||
584 | hidp_input_report(session, skb); | 595 | hidp_input_report(session, skb); |
585 | 596 | ||
586 | if (session->hid) { | 597 | if (session->hid) { |
587 | hid_input_report(session->hid, HID_INPUT_REPORT, skb->data, skb->len, 1); | 598 | hidp_process_report(session, HID_INPUT_REPORT, |
599 | skb->data, skb->len, 1); | ||
588 | BT_DBG("report len %d", skb->len); | 600 | BT_DBG("report len %d", skb->len); |
589 | } | 601 | } |
590 | } else { | 602 | } else { |