diff options
author | Ido Yariv <ido@wizery.com> | 2012-03-05 20:07:08 +0200 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2012-03-08 02:25:00 -0300 |
commit | b3ff53ff006b7906c88adf9d0fccc06a8877fae1 (patch) | |
tree | 0cc76080325736697ce78f74c71c42daaa2dd94f /net/bluetooth/smp.c | |
parent | e57d758ae8e8f00e80f233c823aeeef34bd92796 (diff) |
Bluetooth: Fix access to the STK generation methods matrix
The major index of the table is actually the remote I/O capabilities, not
the local ones. As a result, devices with different I/O capabilities
could have used wrong or even unsupported generation methods.
Signed-off-by: Ido Yariv <ido@wizery.com>
CC: Brian Gix <bgix@codeaurora.org>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r-- | net/bluetooth/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 8f56282c247d..9883d673873c 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -310,7 +310,7 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, remote_io > SMP_IO_KEYBOARD_DISPLAY) method = JUST_WORKS; else - method = gen_method[local_io][remote_io]; + method = gen_method[remote_io][local_io]; /* If not bonding, don't ask user to confirm a Zero TK */ if (!(auth & SMP_AUTH_BONDING) && method == JUST_CFM) |