If bt_hid_set_report is called for a HoG device send data using bt_hog_send_report. --- android/hidhost.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/android/hidhost.c b/android/hidhost.c index 0c0d69d..4b718c6 100644 --- a/android/hidhost.c +++ b/android/hidhost.c @@ -1228,7 +1228,7 @@ static void bt_hid_set_report(const void *buf, uint16_t len) dev = l->data; - if (!(dev->ctrl_io)) { + if (!dev->ctrl_io && !dev->hog) { status = HAL_STATUS_FAILED; goto failed; } @@ -1250,6 +1250,16 @@ static void bt_hid_set_report(const void *buf, uint16_t len) goto failed; } + if (dev->hog) { + if (bt_hog_send_report(dev->hog, req + 1, req_size - 1, + cmd->type) < 0) { + status = HAL_STATUS_FAILED; + goto failed; + } + + goto done; + } + fd = g_io_channel_unix_get_fd(dev->ctrl_io); if (write(fd, req, req_size) < 0) { @@ -1261,6 +1271,7 @@ static void bt_hid_set_report(const void *buf, uint16_t len) dev->last_hid_msg = HID_MSG_SET_REPORT; +done: status = HAL_STATUS_SUCCESS; failed: -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html