summaryrefslogtreecommitdiff
path: root/net/bluetooth/hidp
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-20 14:01:31 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-20 14:01:31 -0300
commitb4b7ff4b08e691656c9d77c758fc355833128ac0 (patch)
tree82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /net/bluetooth/hidp
parent35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff)
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'net/bluetooth/hidp')
-rw-r--r--net/bluetooth/hidp/core.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 0bec4588c..f2d3dcda3 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -378,9 +378,16 @@ static int hidp_output_report(struct hid_device *hid, __u8 *data, size_t count)
{
struct hidp_session *session = hid->driver_data;
- return hidp_send_intr_message(session,
- HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT,
- data, count);
+ /* The Sixaxis and Dualshock 4 wants report sent via the ctrl channel */
+ if(hid->vendor == 0x54c && (hid->product == 0x5c4 || hid->product == 0x268)) {
+ return hidp_send_ctrl_message(session,
+ HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_OUPUT,
+ data, count);
+ } else {
+ return hidp_send_intr_message(session,
+ HIDP_TRANS_DATA | HIDP_DATA_RTYPE_OUPUT,
+ data, count);
+ }
}
static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum,