Diff between d311de12959cb7fc8fc643c73de5d5a6f99c9d8d and 1e0aa26199272961ef4e3da460f564b41f9279d7

Changed Files

File Additions Deletions Status
emulator/btdev.c +5 -3 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index d481446..7a8cf78 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -363,7 +363,6 @@ static void set_le_features(struct btdev *btdev)
 {
 	btdev->features[4] |= 0x20;	/* BR/EDR Not Supported */
 	btdev->features[4] |= 0x40;	/* LE Supported */
-	btdev->features[7] |= 0x80;	/* Extended features */
 
 	btdev->max_page = 1;
 }
@@ -1268,7 +1267,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 		break;
 
 	case BT_HCI_CMD_READ_LE_HOST_SUPPORTED:
-		if (btdev->type == BTDEV_TYPE_BREDR)
+		if (btdev->type != BTDEV_TYPE_BREDRLE)
 			goto unsupported;
 		rlhs.status = BT_HCI_ERR_SUCCESS;
 		rlhs.supported = btdev->le_supported;
@@ -1277,7 +1276,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 		break;
 
 	case BT_HCI_CMD_WRITE_LE_HOST_SUPPORTED:
-		if (btdev->type == BTDEV_TYPE_BREDR)
+		if (btdev->type != BTDEV_TYPE_BREDRLE)
 			goto unsupported;
 		wlhs = data;
 		btdev->le_supported = wlhs->supported;
@@ -1319,6 +1318,9 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 		break;
 
 	case BT_HCI_CMD_READ_LOCAL_EXT_FEATURES:
+		if (btdev->type == BTDEV_TYPE_LE)
+			goto unsupported;
+
 		page = ((const uint8_t *) data)[0];
 
 		rlef.page = page;