diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-07-29 16:08:55 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-29 12:55:00 -0400 |
commit | e5b900d228b76d445a4240d9aeb3cd8f79205a91 (patch) | |
tree | dffa32e827e2d6e5388430ae5ec732f0ca023b11 /net/mac80211/scan.c | |
parent | d28232b461b8d54b09e59325dbac8b0913ce2049 (diff) | |
download | op-kernel-dev-e5b900d228b76d445a4240d9aeb3cd8f79205a91.zip op-kernel-dev-e5b900d228b76d445a4240d9aeb3cd8f79205a91.tar.gz |
mac80211: allow drivers to request DTIM period
Some features require knowing the DTIM period
before associating. This implements the ability
to wait for a beacon in mac80211 before assoc
to provide this value. It is optional since
most likely not all drivers will need this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 41635b2..41f20fb 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -114,6 +114,10 @@ ieee80211_bss_info_update(struct ieee80211_local *local, bss->dtim_period = tim_ie->dtim_period; } + /* If the beacon had no TIM IE, or it was invalid, use 1 */ + if (beacon && !bss->dtim_period) + bss->dtim_period = 1; + /* replace old supported rates if we get new values */ srlen = 0; if (elems->supp_rates) { |