[PATCH 5/8] emulator/btdev: Overwrite default feature mask when SPP is toggled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this we cannot test the legacy HID Device reconnection, as L2Cap
connection is refused when SSP is reported in remote device's features.
---
 emulator/btdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 86fd3d9..8aebb8f 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -2332,6 +2332,13 @@ static void default_cmd(struct btdev *btdev, uint16_t opcode,
 			goto unsupported;
 		wspm = data;
 		btdev->simple_pairing_mode = wspm->mode;
+
+		/* set SSP feature mask */
+		if (wspm->mode)
+			btdev->features[6] |= 0x08;
+		else
+			btdev->features[6] &= ~0x08;
+
 		status = BT_HCI_ERR_SUCCESS;
 		cmd_complete(btdev, opcode, &status, sizeof(status));
 		break;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux