Skip to content

Commit

Permalink
Bluetooth: Fix SMP pairing method selection
Browse files Browse the repository at this point in the history
The tk_request function takes the local IO capability as the second last
parameter and the remote IO capability as the last 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>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
  • Loading branch information
Johan Hedberg authored and Gustavo Padovan committed Jun 8, 2012
1 parent ddcd0f4 commit 476585e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,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;

Expand Down

0 comments on commit 476585e

Please sign in to comment.