]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/bluetooth/mgmt.c
Bluetooth: Fix passkey endianess in user_confirm and notify_passkey
[mirror_ubuntu-bionic-kernel.git] / net / bluetooth / mgmt.c
index 96670f581bb09cd1d0577aae700eca5aa33db767..739887c6b286dcc4e3ce57817ca3ccc76700bd14 100644 (file)
@@ -5338,7 +5338,7 @@ void mgmt_pin_code_neg_reply_complete(struct hci_dev *hdev, bdaddr_t *bdaddr,
 }
 
 int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr,
-                             u8 link_type, u8 addr_type, __le32 value,
+                             u8 link_type, u8 addr_type, u32 value,
                              u8 confirm_hint)
 {
        struct mgmt_ev_user_confirm_request ev;
@@ -5348,7 +5348,7 @@ int mgmt_user_confirm_request(struct hci_dev *hdev, bdaddr_t *bdaddr,
        bacpy(&ev.addr.bdaddr, bdaddr);
        ev.addr.type = link_to_bdaddr(link_type, addr_type);
        ev.confirm_hint = confirm_hint;
-       ev.value = value;
+       ev.value = cpu_to_le32(value);
 
        return mgmt_event(MGMT_EV_USER_CONFIRM_REQUEST, hdev, &ev, sizeof(ev),
                          NULL);