From: Tomas Winkler Date: Thu, 12 Jun 2008 19:38:37 +0000 (+0300) Subject: mac80211: fix beacon interval value X-Git-Tag: v2.6.27-rc1~969^2~324^2~19 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc0ae30c31ee6ef83992bb692f37dfbba08a2ef6;p=linux-2.6 mac80211: fix beacon interval value This patch fixes setting beacon interval 1. in register_hw it honors value requested by the driver 2. It uses default 100 instead of 1000 or 10000. Scanning for beacon interval ~1sec and above is not sane Signed-off-by: Tomas Winkler Signed-off-by: Emmanuel Grumbach Signed-off-by: John W. Linville --- diff --git a/net/mac80211/main.c b/net/mac80211/main.c index b182f018a1..5c5396edad 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1707,7 +1707,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) debugfs_hw_add(local); - local->hw.conf.beacon_int = 1000; + if (local->hw.conf.beacon_int < 10) + local->hw.conf.beacon_int = 100; local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC | IEEE80211_HW_SIGNAL_DB | diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7f05820dc6..46f2037408 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3583,7 +3583,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, sband = local->hw.wiphy->bands[bss->band]; if (local->hw.conf.beacon_int == 0) - local->hw.conf.beacon_int = 10000; + local->hw.conf.beacon_int = 100; bss->beacon_int = local->hw.conf.beacon_int; bss->last_update = jiffies; bss->capability = WLAN_CAPABILITY_IBSS;