emulator: Fix handling of Set Event Mask Page 2 Command
authorSzymon Janc <szymon.janc@codecoup.pl>
Wed, 27 Mar 2019 10:00:31 +0000 (11:00 +0100)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
This command is also valid for BR/EDR only (was introduced in 3.0)
and for LE only controllers (Authenticated Payload Timeout Expired
Event).

Change-Id: Ice65b4a355cfe042a89f455106d244a8012c5961
Signed-off-by: himanshu <h.himanshu@samsung.com>
emulator/btdev.c

index 4d34aee..f4c79c2 100755 (executable)
@@ -3206,8 +3206,8 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
                break;
 
        case BT_HCI_CMD_SET_EVENT_MASK_PAGE2:
-               if (btdev->type != BTDEV_TYPE_BREDRLE &&
-                               btdev->type != BTDEV_TYPE_BREDRLE50)
+               if (btdev->type == BTDEV_TYPE_BREDR20 ||
+                               btdev->type == BTDEV_TYPE_AMP)
                        goto unsupported;
                semp2 = data;
                memcpy(btdev->event_mask_page2, semp2->mask, 8);