OSDN Git Service

android/bluetooth-hal: Fix using wrong struct for buffer size
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 20 Dec 2013 12:50:41 +0000 (13:50 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 20 Dec 2013 13:23:43 +0000 (15:23 +0200)
Buffer is for hal_cmd_le_test_mode command.

android/hal-bluetooth.c

index 2232ebe..3dbc435 100644 (file)
@@ -812,7 +812,7 @@ static int dut_mode_send(uint16_t opcode, uint8_t *buf, uint8_t len)
 #if PLATFORM_SDK_VERSION > 17
 static int le_test_mode(uint16_t opcode, uint8_t *buf, uint8_t len)
 {
-       uint8_t cmd_buf[sizeof(struct hal_cmd_dut_mode_send) + len];
+       uint8_t cmd_buf[sizeof(struct hal_cmd_le_test_mode) + len];
        struct hal_cmd_le_test_mode *cmd = (void *) cmd_buf;
 
        DBG("opcode %u len %u", opcode, len);