Diff between 9af81f5b9e0cb6bba2bdc16f8ab9627ef385439e and b8bc9c1b27d1edfb47ff04bb3fbdbbef66923ced

Changed Files

File Additions Deletions Status
android/hal-hidhost.c +1 -1 modified
android/hal-msg.h +1 -1 modified
android/hid.c +4 -4 modified

Full Patch

diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index ef92fc5..f1a2223 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -261,7 +261,7 @@ static bt_status_t hh_get_report(bt_bdaddr_t *bd_addr,
 
 	memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr));
 	cmd.id = report_id;
-	cmd.buf = buffer_size;
+	cmd.buf_size = buffer_size;
 
 	switch (report_type) {
 	case BTHH_INPUT_REPORT:
diff --git a/android/hal-msg.h b/android/hal-msg.h
index 41ba649..93fb782 100644
--- a/android/hal-msg.h
+++ b/android/hal-msg.h
@@ -285,7 +285,7 @@ struct hal_cmd_hid_get_report {
 	uint8_t  bdaddr[6];
 	uint8_t  type;
 	uint8_t  id;
-	uint16_t buf;
+	uint16_t buf_size;
 } __attribute__((packed));
 
 #define HAL_OP_HID_SET_REPORT		0x08
diff --git a/android/hid.c b/android/hid.c
index 172a945..224c8f7 100644
--- a/android/hid.c
+++ b/android/hid.c
@@ -850,20 +850,20 @@ static uint8_t bt_hid_get_report(struct hal_cmd_hid_get_report *cmd,
 		return HAL_STATUS_FAILED;
 
 	dev = l->data;
-	req_size = (cmd->buf > 0) ? 4 : 2;
+	req_size = (cmd->buf_size > 0) ? 4 : 2;
 	req = g_try_malloc0(req_size);
 	if (!req)
 		return HAL_STATUS_NOMEM;
 
 	req[0] = HID_MSG_GET_REPORT | cmd->type;
 
-	if (cmd->buf > 0)
+	if (cmd->buf_size > 0)
 		req[0] = req[0] | HID_GET_REPORT_SIZE_FIELD;
 
 	req[1] = cmd->id;
 
-	if (cmd->buf > 0)
-		bt_put_le16(cmd->buf, (req + 2));
+	if (cmd->buf_size > 0)
+		bt_put_le16(cmd->buf_size, (req + 2));
 
 	fd = g_io_channel_unix_get_fd(dev->ctrl_io);