* [PATCH] mac80211: fix DTIM setting
@ 2009-09-17 17:19 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2009-09-17 17:19 UTC (permalink / raw)
To: John Linville; +Cc: Wey-Yi W Guy, linux-wireless
When the DTIM setting is read from beacons, mac80211 will
assume it is 1 if the TIM IE is not present or the value
is 0. This sounds fine, but the same function processes
probe responses as well, which don't have a TIM IE. This
leads to overwriting any values previously parsed out of
beacon frames.
Thus, instead of checking for the presence of the TIM IE
when setting the default, simply check whether the DTIM
period value is valid already. If the TIM IE is not there
then the value cannot be valid (it is initialised to 0)
and probe responses received after beacons will not lead
to overwriting an already valid value.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
It's a bug, but probably not severe enough to warrant looking into
putting it into -stable.
net/mac80211/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/mac80211/scan.c 2009-09-17 10:14:59.000000000 -0700
+++ wireless-testing/net/mac80211/scan.c 2009-09-17 10:15:18.000000000 -0700
@@ -90,8 +90,8 @@ ieee80211_bss_info_update(struct ieee802
bss->dtim_period = tim_ie->dtim_period;
}
- /* set default value for buggy APs */
- if (!elems->tim || bss->dtim_period == 0)
+ /* set default value for buggy AP/no TIM element */
+ if (bss->dtim_period == 0)
bss->dtim_period = 1;
bss->supp_rates_len = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-17 17:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 17:19 [PATCH] mac80211: fix DTIM setting Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox