Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306846
b: refs/heads/master
c: 1f350c8
h: refs/heads/master
v: v3
  • Loading branch information
Marcel Holtmann authored and Gustavo Padovan committed May 9, 2012
1 parent 0aacee4 commit 03a6b24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1036b89042df96e71c0cb941be212f8053ecccc0
refs/heads/master: 1f350c8724881fe6b1be9aa68d1e49508a6f8ab9
12 changes: 6 additions & 6 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static int set_discoverable(struct sock *sk, struct hci_dev *hdev, void *data,

BT_DBG("request for %s", hdev->name);

timeout = get_unaligned_le16(&cp->timeout);
timeout = __le16_to_cpu(cp->timeout);
if (!cp->val && timeout > 0)
return cmd_status(sk, hdev->id, MGMT_OP_SET_DISCOVERABLE,
MGMT_STATUS_INVALID_PARAMS);
Expand Down Expand Up @@ -1461,7 +1461,7 @@ static int load_link_keys(struct sock *sk, struct hci_dev *hdev, void *data,
u16 key_count, expected_len;
int i;

key_count = get_unaligned_le16(&cp->key_count);
key_count = __le16_to_cpu(cp->key_count);

expected_len = sizeof(*cp) + key_count *
sizeof(struct mgmt_link_key_info);
Expand Down Expand Up @@ -2611,7 +2611,7 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev,
u16 key_count, expected_len;
int i;

key_count = get_unaligned_le16(&cp->key_count);
key_count = __le16_to_cpu(cp->key_count);

expected_len = sizeof(*cp) + key_count *
sizeof(struct mgmt_ltk_info);
Expand Down Expand Up @@ -2722,9 +2722,9 @@ int mgmt_control(struct sock *sk, struct msghdr *msg, size_t msglen)
}

hdr = buf;
opcode = get_unaligned_le16(&hdr->opcode);
index = get_unaligned_le16(&hdr->index);
len = get_unaligned_le16(&hdr->len);
opcode = __le16_to_cpu(hdr->opcode);
index = __le16_to_cpu(hdr->index);
len = __le16_to_cpu(hdr->len);

if (len != msglen - sizeof(*hdr)) {
err = -EINVAL;
Expand Down

0 comments on commit 03a6b24

Please sign in to comment.