From: Helmut Schaa <helmut.schaa@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>,
Ivo van Doorn <ivdoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: rt2x00 & mac80211: correct usage of ieee80211_beacon_get_tim?
Date: Thu, 24 Jun 2010 15:21:47 +0200 [thread overview]
Message-ID: <201006241521.47623.helmut.schaa@googlemail.com> (raw)
Hi,
I've just reviewed the beacon handling in rt2x00 in AP mode and experienced
some inconsistencies. The DTIM count is not correctly updated: sometimes
multiple beacons are sent out using the same DTIM count.
rt2x00 calls ieee80211_beacon_get_tim right after the current beacon was
sent out to fetch the next one. However, rt2x00 also implements the set_tim
callback and updates the beacon in each call to set_tim. As far as I
understood the code in mac80211 the set_tim callback is called when the
first frame for a powersaving station gets queued.
Since every call to ieee80211_beacon_get_tim updates the DTIM count the
following can happen (assuming a DTIM period of 2):
- the hw sends out the current beacon (DTIM count == 0)
- call to ieee80211_beacon_get_tim fetches the next beacon (DTIM count == 1)
- the first frame for a PS STA gets queued -> set_tim
- again call ieee80211_beacon_get_tim (DTIM count == 0)
- hw sends out the beacon with incorrect DTIM count
A proper way of fixing this issue would be not to use the set_tim callback but
just fetch the next beacon right before it gets send out (like ath* does).
However, that's not easily possible with rt2x00 devices older then rt2800 as
they only generate beacon_done interrupts (which is obviously too late for
fetching the current beacon ;) ).
So, is the current implementation in rt2x00 supposed to work and mac80211
needs fixing?
Could we add a parameter to ieee80211_beacon_get_tim that indicates if a _new_
beacon should be generated or if the _current_ beacon should be updated in
response to the set_tim callback?
Any other ideas?
Thanks,
Helmut
next reply other threads:[~2010-06-24 13:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 13:21 Helmut Schaa [this message]
2010-06-24 14:32 ` rt2x00 & mac80211: correct usage of ieee80211_beacon_get_tim? John W. Linville
2010-06-24 15:51 ` Johannes Berg
2010-06-24 15:53 ` Johannes Berg
2010-06-24 15:54 ` Johannes Berg
2010-06-24 16:20 ` Helmut Schaa
2010-06-25 16:01 ` Helmut Schaa
2010-06-26 15:32 ` John W. Linville
2010-06-27 8:21 ` Johannes Berg
2010-06-27 19:00 ` Helmut Schaa
2010-07-02 17:12 ` Johannes Berg
2010-07-02 17:59 ` Helmut Schaa
2010-07-02 18:06 ` Johannes Berg
2010-07-02 18:20 ` Helmut Schaa
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=201006241521.47623.helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=gwingerde@gmail.com \
--cc=ivdoorn@gmail.com \
--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).