Skip to contentSkip to conversation

emulator: Fix handling of Set Event Mask Page 2 Command

PATCH Applied Szymon Janc 1 participant 2 messages Mar 27, 2019 – Mar 28, 2019 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emulator: Fix handling of Set Event Mask Page 2 Command

This command is also valid for BR/EDR only (was introduced in 3.0) and for LE only controllers (Authenticated Payload Timeout Expired Event).

---
 emulator/btdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
emulator/btdev.c +2 -2
index 4d34aee1a..f4c79c2d0 100644
@@ -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);
Signature · 1 line
2.20.1
author Applied
#1 lore raw
Quoted 12 lines · On Wednesday, 27 March 2019 11:00:31 CET Szymon Janc wrote:

This command is also valid for BR/EDR only (was introduced in 3.0) and for LE only controllers (Authenticated Payload Timeout Expired Event).

---
 emulator/btdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
emulator/btdev.c +0 -0
index 4d34aee1a..f4c79c2d0 100644

emulator/btdev.c static void default_cmd(struct btdev *btdev, uint16_t · line 3213

Quoted 10 lines
emulator/btdev.c +2 -2
@@ -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);

Applied.

Signature · 2 lines
pozdrawiam
Szymon Janc