linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Fix SMP pairing method selection
@ 2012-06-06 10:44 Johan Hedberg
  2012-06-06 10:44 ` [PATCH 2/2] Bluetooth: Fix deadlock and crash when SMP pairing times out Johan Hedberg
  2012-06-06 10:54 ` [PATCH 1/2 v2] Bluetooth: Fix SMP pairing method selection Johan Hedberg
  0 siblings, 2 replies; 9+ messages in thread
From: Johan Hedberg @ 2012-06-06 10:44 UTC (permalink / raw)
  To: linux-bluetooth

From: Johan Hedberg <johan.hedberg@intel.com>

The tk_request function takes the local IO capability as the second last
parameter and the remote IO capability as the first parameter. They were
previously swapped: when we receive a pairing response
req->io_capability contains the local one and rsp->io_capability the
remote one.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/smp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index ff4835b..1885697 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -649,7 +649,7 @@ static u8 smp_cmd_pairing_rsp(struct l2cap_conn *conn, struct sk_buff *skb)
 
 	auth |= (req->auth_req | rsp->auth_req) & SMP_AUTH_MITM;
 
-	ret = tk_request(conn, 0, auth, rsp->io_capability, req->io_capability);
+	ret = tk_request(conn, 0, auth, req->io_capability, rsp->io_capability);
 	if (ret)
 		return SMP_UNSPECIFIED;
 
-- 
1.7.10


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

end of thread, other threads:[~2012-06-08  6:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-06 10:44 [PATCH 1/2] Bluetooth: Fix SMP pairing method selection Johan Hedberg
2012-06-06 10:44 ` [PATCH 2/2] Bluetooth: Fix deadlock and crash when SMP pairing times out Johan Hedberg
2012-06-06 16:44   ` Vinicius Costa Gomes
2012-06-06 17:03     ` Johan Hedberg
2012-06-07  6:48       ` Andrei Emeltchenko
2012-06-08  6:26   ` Gustavo Padovan
2012-06-06 10:54 ` [PATCH 1/2 v2] Bluetooth: Fix SMP pairing method selection Johan Hedberg
2012-06-06 13:06   ` Marcel Holtmann
2012-06-08  4:51   ` Gustavo Padovan

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).