linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Sinigaglia <marco.sinigaglia@csr.com>
To: Arun Kumar SINGH <arunkr.singh@stericsson.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH] Adjust timeout LE
Date: Wed, 02 Mar 2011 18:05:56 +0000	[thread overview]
Message-ID: <4D6E8704.7030508@csr.com> (raw)
In-Reply-To: <AFCDDB4A3EA003429EEF1E7B211FDBBA334C1F57ED@EXDCVYMBSTM005.EQ1STM.local>

Hi Arun,

On 02/03/11 17:50, Arun Kumar SINGH wrote:
> Hi Marco,
>
>
>
>> 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(i
>> nt 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);
> Shouldn't the to parameter be passed to hci_le_set_scan_enable(...) rather than hard-coding it and passing it to hci_send_req(as 1000)?
> I see that as the logical way for all hci_* functions in hci.c that eventually call hci_send_req(). hci_le_set_scan_parameters and few others yet don't have to as input argument and should be patched suitably ...
>
>
> Thanks,
> Arun
>
>
>   To report this email as spam click https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== .
I do agree Arun, I will change the code as you suggest.

Cheers
Marco



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

      reply	other threads:[~2011-03-02 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 14:26 [PATCH] Adjust timeout LE Marco Sinigaglia
2011-03-02 17:50 ` Arun Kumar SINGH
2011-03-02 18:05   ` Marco Sinigaglia [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D6E8704.7030508@csr.com \
    --to=marco.sinigaglia@csr.com \
    --cc=arunkr.singh@stericsson.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).