From: Scott James Remnant <scott@netsplit.com>
To: linux-bluetooth@vger.kernel.org
Cc: keybuk@chromium.org, johan.hedberg@intel.com,
marcel@holtmann.org, hemant.gupta@stericsson.com,
Scott James Remnant <scott@netsplit.com>
Subject: [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo
Date: Wed, 18 Apr 2012 15:01:01 -0700 [thread overview]
Message-ID: <1334786461-5643-1-git-send-email-scott@netsplit.com> (raw)
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
next reply other threads:[~2012-04-18 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 22:01 Scott James Remnant [this message]
2012-04-19 7:51 ` [PATCH] hciops: map KeyboardDisplay IO Capability to DisplayYesNo Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334786461-5643-1-git-send-email-scott@netsplit.com \
--to=scott@netsplit.com \
--cc=hemant.gupta@stericsson.com \
--cc=johan.hedberg@intel.com \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).