Skip to contentSkip to conversation

hciops: map KeyboardDisplay IO Capability to DisplayYesNo

PATCH Applied Scott James Remnant 2 participants 2 messages Apr 18, 2012 – Apr 19, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hciops: map KeyboardDisplay IO Capability to DisplayYesNo

Since hciops is not used for LE devices, if an agent announces the KeyboardDisplay IO Capability when creating a bonding, map it to DisplayYesNo.

This matches the existing change in hciops_set_io_capability which is only used in the RegisterAgent path.

---
 plugins/hciops.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
plugins/hciops.c +4 -1
index a62b160..ef444da 100644
@@ -3738,7 +3738,10 @@ static int hciops_create_bonding(int index, bdaddr_t *bdaddr,
 	if (conn->io != NULL)
 		return -EBUSY;
 
-	conn->loc_cap = io_cap;
+	/* hciops is not to be used for SMP pairing for LE devices. So
+	 * change the IO capability from KeyboardDisplay to DisplayYesNo
+	 * in case it is set. */
+	conn->loc_cap = (io_cap == 0x04 ? 0x01 : io_cap);
 
 	/* If our IO capability is NoInputNoOutput use medium security
 	 * level (i.e. don't require MITM protection) else use high
Signature · 1 line
1.7.7.3
#1 lore raw

Hi Scott,

Quoted 9 lines · Scott James Remnant

Since hciops is not used for LE devices, if an agent announces the KeyboardDisplay IO Capability when creating a bonding, map it to DisplayYesNo.

This matches the existing change in hciops_set_io_capability which is only used in the RegisterAgent path.

---
 plugins/hciops.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Applied. Thanks.

Johan