diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-03-12 06:13:11 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo@padovan.org> | 2012-03-28 14:11:19 -0400 |
commit | 76ec9de843c3cff41b3b15b752e1d08d91f0ad18 (patch) | |
tree | e28def37d8ccb081575d60e60f531bcc78b0a998 /net/bluetooth/mgmt.c | |
parent | 531563850b29726bf37a81e877277902881ab77e (diff) |
Bluetooth: mgmt: Add missing endian conversion
Add missing endian conversion for page scan interval and window.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 0e169dacfd4f..4ef275c69675 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -2523,13 +2523,18 @@ static int set_fast_connectable(struct sock *sk, struct hci_dev *hdev, | |||
2523 | 2523 | ||
2524 | if (cp->val) { | 2524 | if (cp->val) { |
2525 | type = PAGE_SCAN_TYPE_INTERLACED; | 2525 | type = PAGE_SCAN_TYPE_INTERLACED; |
2526 | acp.interval = 0x0024; /* 22.5 msec page scan interval */ | 2526 | |
2527 | /* 22.5 msec page scan interval */ | ||
2528 | acp.interval = __constant_cpu_to_le16(0x0024); | ||
2527 | } else { | 2529 | } else { |
2528 | type = PAGE_SCAN_TYPE_STANDARD; /* default */ | 2530 | type = PAGE_SCAN_TYPE_STANDARD; /* default */ |
2529 | acp.interval = 0x0800; /* default 1.28 sec page scan */ | 2531 | |
2532 | /* default 1.28 sec page scan */ | ||
2533 | acp.interval = __constant_cpu_to_le16(0x0800); | ||
2530 | } | 2534 | } |
2531 | 2535 | ||
2532 | acp.window = 0x0012; /* default 11.25 msec page scan window */ | 2536 | /* default 11.25 msec page scan window */ |
2537 | acp.window = __constant_cpu_to_le16(0x0012); | ||
2533 | 2538 | ||
2534 | err = hci_send_cmd(hdev, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY, sizeof(acp), | 2539 | err = hci_send_cmd(hdev, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY, sizeof(acp), |
2535 | &acp); | 2540 | &acp); |