diff options
author | Itankar, Piyush T <piyush.t.itankar@intel.com> | 2016-10-12 15:26:32 +0530 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2016-10-16 09:01:28 +0300 |
commit | 5ec55f938701961bc87e5fbb9cb7e3193c924334 (patch) | |
tree | 6ce378a2fb357d2d361412ecf2088ecfe07bab8f /net | |
parent | 5599da97f98648721294020780faff4190f45bbd (diff) |
Bluetooth: HCI: Set the Page timeout
The Bluetooth initialization now also sets the page timeout value.
Change-Id: I367591c587bdfe135befc07b637af4cf532f55e2
Signed-off-by: Itankar, Piyush T <piyush.t.itankar@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index d0ac50fc2..e7eaad111 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3191,6 +3191,19 @@ static int br_init(void) return err; } + /* Set page timeout*/ + buf = bt_hci_cmd_create(BT_HCI_OP_WRITE_PAGE_TIMEOUT, sizeof(uint16_t)); + if (!buf) { + return -ENOBUFS; + } + + net_buf_add_le16(buf, CONFIG_BLUETOOTH_PAGE_TIMEOUT); + + err = bt_hci_cmd_send_sync(BT_HCI_OP_WRITE_PAGE_TIMEOUT, buf, NULL); + if (err) { + return err; + } + /* Enable BR/EDR SC if supported */ if (BT_FEAT_SC(bt_dev.features)) { struct bt_hci_cp_write_sc_host_supp *sc_cp; |