diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-20 07:18:14 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-03-20 07:22:07 +0100 |
commit | 39adbffe4b16285c54016d3e64471396354ae49f (patch) | |
tree | 81196bfad50006fea2eec9c9175705fdd267f6d3 /net/bluetooth/smp.c | |
parent | Bluetooth: Enforce strict Secure Connections Only mode security (diff) | |
download | linux-39adbffe4b16285c54016d3e64471396354ae49f.tar.xz linux-39adbffe4b16285c54016d3e64471396354ae49f.zip |
Bluetooth: Fix passkey endianess in user_confirm and notify_passkey
The passkey_notify and user_confirm functions in mgmt.c were expecting
different endianess for the passkey, leading to a big endian bug and
sparse warning in recently added SMP code. This patch converts both
functions to expect host endianess and do the conversion to little
endian only when assigning to the mgmt event struct.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to '')
-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 2a7ee7f6cd8b..13919ff82e05 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -425,7 +425,7 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, else ret = mgmt_user_passkey_notify(hcon->hdev, &hcon->dst, hcon->type, hcon->dst_type, - cpu_to_le32(passkey), 0); + passkey, 0); hci_dev_unlock(hcon->hdev); |