diff options
-rw-r--r-- | net/bluetooth/mgmt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 194a0426a3e5..287623c35d61 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -862,7 +862,7 @@ static int set_discoverable(struct sock *sk, struct hci_dev *hdev, void *data, | |||
862 | 862 | ||
863 | BT_DBG("request for %s", hdev->name); | 863 | BT_DBG("request for %s", hdev->name); |
864 | 864 | ||
865 | timeout = get_unaligned_le16(&cp->timeout); | 865 | timeout = __le16_to_cpu(cp->timeout); |
866 | if (!cp->val && timeout > 0) | 866 | if (!cp->val && timeout > 0) |
867 | return cmd_status(sk, hdev->id, MGMT_OP_SET_DISCOVERABLE, | 867 | return cmd_status(sk, hdev->id, MGMT_OP_SET_DISCOVERABLE, |
868 | MGMT_STATUS_INVALID_PARAMS); | 868 | MGMT_STATUS_INVALID_PARAMS); |
@@ -1461,7 +1461,7 @@ static int load_link_keys(struct sock *sk, struct hci_dev *hdev, void *data, | |||
1461 | u16 key_count, expected_len; | 1461 | u16 key_count, expected_len; |
1462 | int i; | 1462 | int i; |
1463 | 1463 | ||
1464 | key_count = get_unaligned_le16(&cp->key_count); | 1464 | key_count = __le16_to_cpu(cp->key_count); |
1465 | 1465 | ||
1466 | expected_len = sizeof(*cp) + key_count * | 1466 | expected_len = sizeof(*cp) + key_count * |
1467 | sizeof(struct mgmt_link_key_info); | 1467 | sizeof(struct mgmt_link_key_info); |
@@ -2611,7 +2611,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev, | |||
2611 | u16 key_count, expected_len; | 2611 | u16 key_count, expected_len; |
2612 | int i; | 2612 | int i; |
2613 | 2613 | ||
2614 | key_count = get_unaligned_le16(&cp->key_count); | 2614 | key_count = __le16_to_cpu(cp->key_count); |
2615 | 2615 | ||
2616 | expected_len = sizeof(*cp) + key_count * | 2616 | expected_len = sizeof(*cp) + key_count * |
2617 | sizeof(struct mgmt_ltk_info); | 2617 | sizeof(struct mgmt_ltk_info); |
@@ -2722,9 +2722,9 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen) | |||
2722 | } | 2722 | } |
2723 | 2723 | ||
2724 | hdr = buf; | 2724 | hdr = buf; |
2725 | opcode = get_unaligned_le16(&hdr->opcode); | 2725 | opcode = __le16_to_cpu(hdr->opcode); |
2726 | index = get_unaligned_le16(&hdr->index); | 2726 | index = __le16_to_cpu(hdr->index); |
2727 | len = get_unaligned_le16(&hdr->len); | 2727 | len = __le16_to_cpu(hdr->len); |
2728 | 2728 | ||
2729 | if (len != msglen - sizeof(*hdr)) { | 2729 | if (len != msglen - sizeof(*hdr)) { |
2730 | err = -EINVAL; | 2730 | err = -EINVAL; |