Diff between ed5ca845b1b11a5c3cb9bfc86cafe6bedbd0954d and 9cc6f7d88f740f32a9e63dc9ee703f9dcfc55818

Changed Files

File Additions Deletions Status
emulator/btdev.c +11 -0 modified

Full Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index fc7d1bc..ac38eaa 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -380,6 +380,7 @@ static void set_bredr_commands(struct btdev *btdev)
 	btdev->commands[18] |= 0x80;	/* IO Capability Request Reply */
 	btdev->commands[23] |= 0x04;	/* Read Data Block Size */
 	btdev->commands[29] |= 0x20;	/* Read Local Supported Codecs */
+	btdev->commands[30] |= 0x08;	/* Get MWS Transport Layer Config */
 }
 
 static void set_le_commands(struct btdev *btdev)
@@ -1834,6 +1835,7 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 	struct bt_hci_rsp_read_local_codecs *rlsc;
 	struct bt_hci_rsp_read_local_amp_info rlai;
 	struct bt_hci_rsp_read_local_amp_assoc rlaa_rsp;
+	struct bt_hci_rsp_get_mws_transport_config *gmtc;
 	struct bt_hci_rsp_le_read_buffer_size lrbs;
 	struct bt_hci_rsp_le_read_local_features lrlf;
 	struct bt_hci_rsp_le_read_adv_tx_power lratp;
@@ -2581,6 +2583,15 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 		cmd_complete(btdev, opcode, &rlaa_rsp, sizeof(rlaa_rsp));
 		break;
 
+	case BT_HCI_CMD_GET_MWS_TRANSPORT_CONFIG:
+		if (btdev->type == BTDEV_TYPE_LE)
+			goto unsupported;
+		gmtc = alloca(sizeof(*gmtc));
+		gmtc->status = BT_HCI_ERR_SUCCESS;
+		gmtc->num_transports = 0x00;
+		cmd_complete(btdev, opcode, gmtc, sizeof(*gmtc));
+		break;
+
 	case BT_HCI_CMD_SET_EVENT_MASK_PAGE2:
 		if (btdev->type != BTDEV_TYPE_BREDRLE)
 			goto unsupported;