Return-Path: Message-ID: <4D6E5398.4070300@csr.com> Date: Wed, 02 Mar 2011 14:26:32 +0000 From: Marco Sinigaglia MIME-Version: 1.0 To: linux-bluetooth@vger.kernel.org Subject: [PATCH] Adjust timeout LE Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-bluetooth-owner@vger.kernel.org List-ID: The hci_send_req 100ms timeout is not enough when the chip is in deep sleep. This patch increases it to 1000ms. From: Marco Sinigaglia, marco.sinigaglia@csr.com --- lib/hci.c | 6 +++--- tools/hciconfig.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/hci.c b/lib/hci.c index 02fc0cf..96fafe1 100644 --- a/lib/hci.c +++ b/lib/hci.c @@ -2753,7 +2753,7 @@ int hci_le_set_scan_enable(int dd, uint8_t enable, uint8_t filter_dup) rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, 1000) < 0) return -1; if (status) { @@ -2787,7 +2787,7 @@ int hci_le_set_scan_parameters(int dd, uint8_t type, rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, 1000) < 0) return -1; if (status) { @@ -2815,7 +2815,7 @@ int hci_le_set_advertise_enable(int dd, uint8_t enable) rq.rparam = &status; rq.rlen = 1; - if (hci_send_req(dd, &rq, 100) < 0) + if (hci_send_req(dd, &rq, 1000) < 0) return -1; if (status) { diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 05a8910..aa6d009 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -268,7 +268,7 @@ static void cmd_le_adv(int ctl, int hdev, char *opt) rq.rparam = &status; rq.rlen = 1; - ret = hci_send_req(dd, &rq, 100); + ret = hci_send_req(dd, &rq, 1000); hci_close_dev(dd); Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom