linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: 8an@praha12.net
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>,
	ath5k-devel@lists.ath5k.org
Subject: Re: [PATCH 4/4] ath5k: Implement mac80211 callback set_coverage
Date: Wed, 09 Dec 2009 02:48:04 +0100	[thread overview]
Message-ID: <4B1F01D4.6020803@openwrt.org> (raw)
In-Reply-To: <200912090216.09816.8an@praha12.net>

On 2009-12-09 2:15 AM, Lukáš Turek wrote:
> On 7.12.2009 10:48 you wrote:
>> ACKTimeout is:  aSIFSTime + aSlotTime + aPHY-RX-START-Delay
> 802.11a uses SIFS of 16 µs and 9 µs slot time, that's 25 µs in total. However, 
> the athctrl calculation uses 21 µs ACK timeout for zero distance. And I know 
> the result is correct, as we are using it on 70 links with distances varying 
> between 100m and 8km.
> 
> I don't say the standard is wrong, just that the hardware might start counting 
> at a different moment than the standard assumes.
> 
>> Of course, the distance settting code in iw probably also needs
>> changing, as it needs to accomodate for aAirPropagationTime being the
>> round trip time, not one-way.
> Well, according to my interpretation the aAirPropagationTime is the one-way 
> delay. I think it makes sense when we consider the reason the slots are used 
> in CSMA/CA:
> 
> Station waits a random number of slots. If no other station was transmitting 
> at the beginning of a previous slot, the station starts its own transmit. So 
> the slot time has to be at least the time needed to switch the radio from RX 
> to TX plus the one-way propagation delay, so that every other station can 
> hear the medium is busy on time.
The document also mentions this about the definition of aAirPropagationTime:

Twice the propagation time (in microseconds) for a signal to cross the
maximum distance between the most distant allowable STAs that are slot
synchronized.
If it was only one-way instead of round trip, the ACKTimeout formula
would not make sense, as it would only take one way into account,
however both the data frame and the ack frame need time to reach their
destination.

> Anyway, I think there's only one sure way to determine the correct base ACK 
> timeout for different modes: experiment. It's easy to detect that the ACK 
> timeout is too low - packetloss grows dramatically.
> 
> The main observation is this: ACK timeout does not depend on slot time!
> In retrospect it makes sense: station waits only SIFS before sending ACK, not 
> a single slot.
Some hardware internally calculates the ACK timeout based on the
configured slot time. Broadcom does it this way.
Maybe adjusting the ACK timeout without adjusting the slot time works,
but it'll probably interfere with CSMA.

> The measured values of minimum slot times (with AR5212 and AR5414) are these:
> 
> 802.11a: 21 µs
> 802.11b: 27 µs
> 802.11g: 19 µs
How did you measure it?

> I can't give much explanation, the difference of 6 µs between 11a and 11b 
> might be the difference of SIFS (16µs vs. 10µs). 11g uses 10 µs SIFS too, but 
> with additional 6 µs "signal extension", maybe that's why the value is closer 
> to 11a than 11b. It's all just guessing, though.
> 
> So I propose to use 21 µs in 802.11a mode and 27 µs in 802.11b/g mode (as 
> there might be some 802.11b clients and 6µs won't make much difference).
> What do you think?
I'm guessing that most hardware does have some degree of tolerance for
timing variation. IMHO, if the standard recommends slightly higher but
working values for the same distance, we should use that rather than
experimentally determined limits.

- Felix

  reply	other threads:[~2009-12-09  1:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 17:20 [PATCH 0/4] Setting coverage class (and ACK timeout and slot time) Lukáš Turek
2009-12-06 17:22 ` [PATCH 1/4] nl80211: Add new WIPHY attribute COVERAGE_CLASS Lukáš Turek
2009-12-06 18:01   ` Johannes Berg
2009-12-06 18:45     ` Lukáš Turek
2009-12-06 18:49       ` Johannes Berg
2009-12-06 19:28         ` Lukáš Turek
2009-12-06 19:32           ` Lukáš Turek
2009-12-06 21:59         ` Lukáš Turek
2009-12-07  6:57           ` Johannes Berg
2009-12-06 17:23 ` [PATCH 2/4] mac80211: Add new callback set_coverage Lukáš Turek
2009-12-07 10:59   ` Kalle Valo
2009-12-07 11:04     ` Johannes Berg
2009-12-06 17:24 ` [PATCH 3/4] ath5k: Fix functions for getting/setting slot time Lukáš Turek
2009-12-06 17:26 ` [PATCH 4/4] ath5k: Implement mac80211 callback set_coverage Lukáš Turek
2009-12-06 18:34   ` Felix Fietkau
2009-12-06 19:00     ` Lukáš Turek
2009-12-06 19:20       ` Felix Fietkau
2009-12-06 20:23         ` Lukáš Turek
2009-12-07  9:48           ` Felix Fietkau
2009-12-09  1:15             ` Lukáš Turek
2009-12-09  1:48               ` Felix Fietkau [this message]
2009-12-09 13:12                 ` Lukáš Turek
2009-12-09 13:30                   ` Felix Fietkau
2009-12-09 23:51                     ` Lukáš Turek
2009-12-06 17:29 ` [PATCH] iw: Add support for NL80211_ATTR_WIPHY_COVERAGE_CLASS Lukáš Turek
2009-12-06 21:49   ` Luis R. Rodriguez
2009-12-06 21:52     ` 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=4B1F01D4.6020803@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=8an@praha12.net \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@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).