linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hemant Gupta <hemant.gupta@stericsson.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Hemant Gupta <hemantgupta.ste@gmail.com>,
	Hemant Gupta <hemant.gupta@stericsson.com>
Subject: [PATCH v1 1/1] Bluetooth: Send correct response to IO Capability Request
Date: Mon, 16 Jan 2012 13:34:29 +0530	[thread overview]
Message-ID: <1326701069-19146-2-git-send-email-hemant.gupta@stericsson.com> (raw)
In-Reply-To: <1326701069-19146-1-git-send-email-hemant.gupta@stericsson.com>

This patch sends correct IO Capability response to remote device
in case Local Device supports KeyBoardDisplay IO Capability as
this capability is not valid as per BT spec for IO capability
Request Reply Command.
This capability is mapped to DisplayYesNo which is in accordance
with BT spec.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
---
 net/bluetooth/hci_event.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d37f5b2..3590e72 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2782,7 +2782,11 @@ static inline void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff
 		struct hci_cp_io_capability_reply cp;
 
 		bacpy(&cp.bdaddr, &ev->bdaddr);
-		cp.capability = conn->io_capability;
+		/*
+		 * Change the IO capability from KeyboardDisplay
+		 * to DisplayYesNo as it is not supported by BT spec.
+		 */
+		cp.capability = (conn->io_capability == 0x04) ? 0x01 : conn->io_capability;
 		conn->auth_type = hci_get_auth_req(conn);
 		cp.authentication = conn->auth_type;
 
-- 
1.6.6.1


  reply	other threads:[~2012-01-16  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16  8:04 [PATCH v1 0/1] Send correct response to IO Capability Request Hemant Gupta
2012-01-16  8:04 ` Hemant Gupta [this message]
2012-01-18 12:23   ` [PATCH v1 1/1] Bluetooth: " Johan Hedberg
2012-01-23 14:37     ` Hemant Gupta
2012-02-02  1:16   ` 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=1326701069-19146-2-git-send-email-hemant.gupta@stericsson.com \
    --to=hemant.gupta@stericsson.com \
    --cc=hemantgupta.ste@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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).