Commit dc0ae30c authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

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: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5720508d
...@@ -1707,7 +1707,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1707,7 +1707,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
debugfs_hw_add(local); 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 | local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC |
IEEE80211_HW_SIGNAL_DB | IEEE80211_HW_SIGNAL_DB |
......
...@@ -3583,7 +3583,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, ...@@ -3583,7 +3583,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
sband = local->hw.wiphy->bands[bss->band]; sband = local->hw.wiphy->bands[bss->band];
if (local->hw.conf.beacon_int == 0) 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->beacon_int = local->hw.conf.beacon_int;
bss->last_update = jiffies; bss->last_update = jiffies;
bss->capability = WLAN_CAPABILITY_IBSS; bss->capability = WLAN_CAPABILITY_IBSS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment