diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-03-20 08:18:14 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-03-19 23:22:07 -0700 |
commit | 39adbffe4b16285c54016d3e64471396354ae49f (patch) | |
tree | 81196bfad50006fea2eec9c9175705fdd267f6d3 /net/bluetooth/hci_event.c | |
parent | 40b552aa5a0bfa785bc7ddb5c2d7965b1e0bb08d (diff) | |
download | linux-39adbffe4b16285c54016d3e64471396354ae49f.tar.bz2 |
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 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index a6a3d32553c5..1e386edc338f 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3459,8 +3459,8 @@ static void hci_user_confirm_request_evt(struct hci_dev *hdev, } confirm: - mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, ev->passkey, - confirm_hint); + mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, + le32_to_cpu(ev->passkey), confirm_hint); unlock: hci_dev_unlock(hdev); |