From: Joe Perches <joe@perches.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Network Development <netdev@vger.kernel.org>,
"Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"bluez mailin list (linux-bluetooth@vger.kernel.org)"
<linux-bluetooth@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 bluetooth-next 2/6] bluetooth: Convert uses of __constant_<foo> to <foo>
Date: Wed, 12 Mar 2014 11:22:34 -0700 [thread overview]
Message-ID: <1394648554.3915.22.camel@joe-AO722> (raw)
In-Reply-To: <34E193D0-F15B-4C23-83F7-697096916D4D@holtmann.org>
On Wed, 2014-03-12 at 11:11 -0700, Marcel Holtmann wrote:
> > /* Connection accept timeout ~20 secs */
> > - param = __constant_cpu_to_le16(0x7d00);
> > + param = cpu_to_le16(0x7d00);
> >
> > 0x7d00 is 32000, presumably that's 32 seconds.
>
> so it is 0x7d00 * 0.625 which results in 20 seconds.
Hi again Marcel.
Swell. No worries then.
Is this clocking divisor defined somewhere?
Is .625 or 5/8 as a magic number defined somewhere?
(I didn't see it in a brief scan)
Maybe it'd be better to use 20000 * 5 / 8 or
add some define like
#define msecs_to_bt_clocks(ms) ((ms) * 5 / 8)
> > and
> > /* 160 msec page scan interval */
> > - acp.interval = __constant_cpu_to_le16(0x0100);
> > + acp.interval = cpu_to_le16(0x0100);
> > 256 msecs?
>
> also here 0x0100 * 0.625 resulting in 160 msecs.
Same as above.
> patch has been applied to bluetooth-next tree.
cheers, Joe
next prev parent reply other threads:[~2014-03-12 18:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 17:04 [PATCH net-next 0/6] net: Convert uses of __constant_<foo> to <foo> Joe Perches
2014-03-12 17:04 ` [PATCH net-next 1/6] 8021q: " Joe Perches
2014-03-12 19:28 ` David Miller
2014-03-12 17:04 ` [PATCH net-next 2/6] bluetooth: " Joe Perches
2014-03-12 17:26 ` Marcel Holtmann
2014-03-12 17:52 ` [PATCH V2 bluetooth-next " Joe Perches
2014-03-12 18:11 ` Marcel Holtmann
2014-03-12 18:22 ` Joe Perches [this message]
2014-03-12 19:28 ` [PATCH net-next " David Miller
2014-03-12 17:04 ` [PATCH net-next 3/6] net: " Joe Perches
2014-03-12 19:28 ` David Miller
[not found] ` <cover.1394643455.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2014-03-12 17:04 ` [PATCH net-next 4/6] ieee802154: " Joe Perches
[not found] ` <5e8be8d647e70ad422eb686d315f93b3e265e9c6.1394643455.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2014-03-12 19:28 ` David Miller
2014-03-12 17:04 ` [PATCH net-next 5/6] netfilter: " Joe Perches
2014-03-12 19:28 ` David Miller
2014-03-13 13:13 ` Pablo Neira Ayuso
2014-03-12 19:41 ` Jozsef Kadlecsik
2014-03-12 17:04 ` [PATCH net-next 6/6] tipc: " Joe Perches
2014-03-12 19:29 ` David Miller
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=1394648554.3915.22.camel@joe-AO722 \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@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).