Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2009 10:11:32 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Iain Hibbert <plunky@rya-online.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: libhci update
Message-ID:  <bb4a86c70905141011n767be2d1ld60398f538712d47@mail.gmail.com>
In-Reply-To: <1242320358.167446.9598.nullmailer@galant.ukfsn.org>
References:  <E1Lv5La-00058x-HH@smtpbarns01> <bb4a86c70904210959w6de5e808h9f85ee2bb1995dbf@mail.gmail.com> <1240352254.082638.416.nullmailer@galant.ukfsn.org> <bb4a86c70904211651m6127745ao9d4f26c91e428994@mail.gmail.com> <1240386569.369073.696.nullmailer@galant.ukfsn.org> <bb4a86c70904220909j5d047ce6x6260bd2e87b5b7bd@mail.gmail.com> <1242294653.314348.1748.nullmailer@galant.ukfsn.org> <bb4a86c70905140926n488cb2b5x5f5530e01d70bd66@mail.gmail.com> <bb4a86c70905140942u67ed1203ke245029a740be3ca@mail.gmail.com> <1242320358.167446.9598.nullmailer@galant.ukfsn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 14, 2009 at 9:59 AM, Iain Hibbert <plunky@rya-online.net> wrote:
> On Thu, 14 May 2009, Maksim Yevmenkin wrote:
>
>> >> 2.1 spec says 1.28 -> 61.44 seconds range is acceptable (0x01->0x30)
>>
>> ok, do you like something like
>>
>> +       if (length <= 0)
>> +               length = 5;
>> +       else if (length == 1)
>> +               length = 2;
>> +       else if (length > 61)
>> +               length = 61;
>
> yes that is what I have too, except I've allowed 62 (as 61 gives 0x2f)

cool. its in :)

==

Author: emax
Date: Thu May 14 17:10:19 2009
New Revision: 192113
URL: http://svn.freebsd.org/changeset/base/192113

Log:
 Avoid floating point arithmetic while calculating iquiry length.

 Submitted by: Iain Hibbert < plunky -at- rya-online -dot- net >
 MFC after:    1 week

Modified:
 head/lib/libbluetooth/hci.c

Modified: head/lib/libbluetooth/hci.c

==

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70905141011n767be2d1ld60398f538712d47>