linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo
@ 2012-04-18 22:01 Scott James Remnant
  2012-04-19  7:51 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Scott James Remnant @ 2012-04-18 22:01 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: keybuk, johan.hedberg, marcel, hemant.gupta, 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(-)

diff --git a/plugins/hciops.c b/plugins/hciops.c
index a62b160..ef444da 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -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
-- 
1.7.7.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo
  2012-04-18 22:01 [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo Scott James Remnant
@ 2012-04-19  7:51 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2012-04-19  7:51 UTC (permalink / raw)
  To: Scott James Remnant; +Cc: linux-bluetooth, keybuk, marcel, hemant.gupta

Hi Scott,

On Wed, Apr 18, 2012, Scott James Remnant wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-19  7:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 22:01 [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo Scott James Remnant
2012-04-19  7:51 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).