From: "Lukáš Turek" <8an@praha12.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] iw: add country IE parsing
Date: Thu, 18 Feb 2010 22:40:31 +0100 [thread overview]
Message-ID: <201002182240.38016.8an@praha12.net> (raw)
In-Reply-To: <1266459208-12408-1-git-send-email-lrodriguez@atheros.com>
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
On 18.2.2010 03:13 Luis R. Rodriguez wrote:
> coverage = (distance + 449) / 450;
> coverage/450 = distance + 499
> (coverage/450) - 499 = distance
Inverting the formula like this doesn't make much sense...
The addition of 449 is there to round the resulting number up, because the
coverage class limits maximum distance and if it was rounded down as normal
integer division does, the resulting ACK timeout would be too low.
However, if you subtract 449 in the inverted formula, you get something like a
minimum distance for the coverage class - which doesn't mean anything,
because higher ACK timeout and slot time works for smaller distances too.
Maximum distance is what's interesting to the user. So the correct
calculation is just multiplying the coverage class by 450 as I'm doing in
print_phy_handler():
printf("\tCoverage class: %d (up to %dm)\n", coverage, 450 * coverage);
Lukas Turek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2010-02-18 21:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 2:13 [PATCH] iw: add country IE parsing Luis R. Rodriguez
2010-02-18 7:16 ` Gabor Juhos
2010-02-18 21:40 ` Lukáš Turek [this message]
2010-02-19 18:54 ` Luis R. Rodriguez
-- strict thread matches above, loose matches on Subject: below --
2010-01-20 17:51 Luis R. Rodriguez
2010-01-20 18:20 ` Marcel Holtmann
2010-01-20 18:23 ` Johannes Berg
2010-01-20 18:23 ` Luis R. Rodriguez
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=201002182240.38016.8an@praha12.net \
--to=8an@praha12.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
/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).