From: Jouni Malinen <jouni.malinen@atheros.com>
To: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
Jouni Malinen <jouni.malinen@atheros.com>
Subject: [PATCH 6/7] mac80211: PS processing for every Beacon with our AID in TIM
Date: Tue, 19 May 2009 17:01:43 +0300 [thread overview]
Message-ID: <20090519140236.866613677@atheros.com> (raw)
In-Reply-To: 20090519140137.708996030@atheros.com
If the AP includes our AID in the TIM IE, we need to process the
Beacon frame as far as PS is concerned (send PS-Poll or nullfunc data
with PM=0). The previous code skipped this in cases where the CRC
value did not change and it would not change if the AP continues
including our AID in the TIM..
There is no need to count the crc32 value for directed_tim with this
change, so we can remove that part. In order not to change the order
of operations (i.e., update WMM parameters prior to sending PS-Poll),
the CRC match is checked twice as only after the PS processing step,
the rest of the function is skipped if nothing changed in the Beacon.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
---
net/mac80211/mlme.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-05-19 16:32:25.000000000 +0300
+++ wireless-testing/net/mac80211/mlme.c 2009-05-19 16:32:39.000000000 +0300
@@ -1958,16 +1958,13 @@ static void ieee80211_rx_mgmt_beacon(str
directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len,
ifmgd->aid);
- ncrc = crc32_be(ncrc, (void *)&directed_tim, sizeof(directed_tim));
+ if (ncrc != ifmgd->beacon_crc) {
+ ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems,
+ true);
- if (ncrc == ifmgd->beacon_crc)
- return;
- ifmgd->beacon_crc = ncrc;
-
- ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, true);
-
- ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
- elems.wmm_param_len);
+ ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
+ elems.wmm_param_len);
+ }
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
if (directed_tim) {
@@ -1992,6 +1989,10 @@ static void ieee80211_rx_mgmt_beacon(str
}
}
+ if (ncrc == ifmgd->beacon_crc)
+ return;
+ ifmgd->beacon_crc = ncrc;
+
if (elems.erp_info && elems.erp_info_len >= 1) {
erp_valid = true;
erp_value = elems.erp_info[0];
--
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2009-05-19 14:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 14:01 [PATCH 0/7] ath9k/mac80211: Power save fixes Jouni Malinen
2009-05-19 14:01 ` [PATCH 1/7] ath9k: Wake up for TX in mac80211 timeout=0 sleep mode Jouni Malinen
2009-05-19 14:01 ` [PATCH 2/7] ath9k: Do not try to calibrate radio when in " Jouni Malinen
2009-05-19 14:01 ` [PATCH 3/7] ath9k: Use TSFOOR interrupt to trigger TSF sync with next Beacon Jouni Malinen
2009-05-19 14:01 ` [PATCH 4/7] ath9k: Wake up for RX filter changes Jouni Malinen
2009-05-19 14:01 ` [PATCH 5/7] ath9k: Set PM field in frame control when in PS mode Jouni Malinen
2009-05-19 14:01 ` Jouni Malinen [this message]
2009-05-19 14:51 ` [PATCH 6/7] mac80211: PS processing for every Beacon with our AID in TIM Johannes Berg
2009-05-19 14:01 ` [PATCH 7/7] mac80211: Do not override AID in the duration field Jouni Malinen
2009-05-19 14:52 ` Johannes Berg
2009-05-19 16:25 ` [PATCH v2 " Jouni Malinen
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=20090519140236.866613677@atheros.com \
--to=jouni.malinen@atheros.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).