From owner-freebsd-bluetooth@FreeBSD.ORG Thu May 14 17:11:33 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D849C106567F for ; Thu, 14 May 2009 17:11:33 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.217.172]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC838FC23 for ; Thu, 14 May 2009 17:11:33 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by gxk20 with SMTP id 20so474114gxk.19 for ; Thu, 14 May 2009 10:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oHK0Wi+WmHc3XaHzaHovuwlez+uvhBXCg6Ff8ZzYj40=; b=iguN4RnGHgUtk2uuIByBJYB9JgN3TiHTYo+6mX48dglUZiPbTevMKxDxzdjo8V2ZJu tj71XfgbJvdcP/Cc5LDUd6cjBvJypZjmjKe/rIHaqIXVxIyBu7f2GOZsU6nnMcS33TjB hqXeuNCzDqvwj/jJslzEJJ1U6BnxxSTuqHITU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mKWQFWvHKPkyun+ozeCd/4bsQaYtFjcSIpS451ibSvtVeSBbIaTOBFs+RK6kMX/rpH NFjaV9YeO8jHeH9PylOno50/uJ4lN64bfLBVUFOJzygeT6NpxM2ywekFwrtYNcrHNuzM N14WmV3a2m/g2uJfiAgmDYet0GohKUV7zROa8= MIME-Version: 1.0 Received: by 10.90.92.16 with SMTP id p16mr1117966agb.56.1242321092626; Thu, 14 May 2009 10:11:32 -0700 (PDT) In-Reply-To: <1242320358.167446.9598.nullmailer@galant.ukfsn.org> References: <1240352254.082638.416.nullmailer@galant.ukfsn.org> <1240386569.369073.696.nullmailer@galant.ukfsn.org> <1242294653.314348.1748.nullmailer@galant.ukfsn.org> <1242320358.167446.9598.nullmailer@galant.ukfsn.org> Date: Thu, 14 May 2009 10:11:32 -0700 Message-ID: From: Maksim Yevmenkin To: Iain Hibbert Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: libhci update X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2009 17:11:35 -0000 On Thu, May 14, 2009 at 9:59 AM, Iain Hibbert 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