From: Kalle Valo <kalle.valo@iki.fi>
To: johannes@sipsolutions.net, vivek.natraj@gmail.com
Cc: linux-wireless@vger.kernel.org
Subject: [RFC PATCH v1 1/2] mac80211: remove multicast check from check_tim()
Date: Sun, 11 Jan 2009 09:03:45 +0200 [thread overview]
Message-ID: <20090111070345.3849.96045.stgit@tikku> (raw)
In-Reply-To: <20090111070148.3849.10799.stgit@tikku>
Currently mac80211 checks for the multicast tim bit from beacons and
disables power save if the bit is set. This was added to support
ath9k. But this is a bit controversial because the AP will send
multicast frames immediately after the beacon and the time constraints
are really high. Relying mac80211 to be fast enough here might not be
reliable in all situations.
Also with current implementation mac80211 disables power save whenever
multicast bit is set but it's never enabled again. So if dynamic power
save is disabled (iwconfig wlan0 power timeout 0), the power save mode
is enabled only until first multicast/broadcast frame is received, which
isn't a long time in a normal network.
The current implementation is not usable on p54/stlc45xx and the
easiest way to fix this is to remove the multicast tim bit check
altogether. Handling multicast tim bit in host is rare, most of the
designs do this in firmware/hardware, so it's better not to have it in
mac80211. It's a lot better to do this in firmware/hardware, or if
that's not possible it could be done in the driver.
Also renamed the function to ieee80211_check_tim() to follow the style
of the file.
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
---
net/mac80211/mlme.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 51f021f..c7e61e2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -575,7 +575,7 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
}
}
-static bool check_tim(struct ieee802_11_elems *elems, u16 aid, bool *is_mc)
+static bool ieee80211_check_tim(struct ieee802_11_elems *elems, u16 aid)
{
u8 mask;
u8 index, indexn1, indexn2;
@@ -585,9 +585,6 @@ static bool check_tim(struct ieee802_11_elems *elems, u16 aid, bool *is_mc)
index = aid / 8;
mask = 1 << (aid & 7);
- if (tim->bitmap_ctrl & 0x01)
- *is_mc = true;
-
indexn1 = tim->bitmap_ctrl & 0xfe;
indexn2 = elems->tim_len + indexn1 - 4;
@@ -1788,7 +1785,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems elems;
struct ieee80211_local *local = sdata->local;
u32 changed = 0;
- bool erp_valid, directed_tim, is_mc = false;
+ bool erp_valid, directed_tim;
u8 erp_value = 0;
/* Process beacon from the current BSS */
@@ -1816,9 +1813,9 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK &&
local->hw.conf.flags & IEEE80211_CONF_PS) {
- directed_tim = check_tim(&elems, ifsta->aid, &is_mc);
+ directed_tim = ieee80211_check_tim(&elems, ifsta->aid);
- if (directed_tim || is_mc) {
+ if (directed_tim) {
local->hw.conf.flags &= ~IEEE80211_CONF_PS;
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
ieee80211_send_nullfunc(local, sdata, 0);
next prev parent reply other threads:[~2009-01-11 7:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-11 7:03 [RFC PATCH v1 0/2] mac80211: ps-poll implementation Kalle Valo
2009-01-11 7:03 ` Kalle Valo [this message]
2009-01-11 7:03 ` [RFC PATCH v1 2/2] mac80211: use ps-poll to request frames in power save mode Kalle Valo
2009-01-11 7:09 ` Kalle Valo
2009-01-12 8:57 ` Vivek Natarajan
2009-01-12 8:59 ` Johannes Berg
2009-01-12 9:03 ` Kalle Valo
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=20090111070345.3849.96045.stgit@tikku \
--to=kalle.valo@iki.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=vivek.natraj@gmail.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).