Skip to content

Commit

Permalink
mac80211: fix beacon interval value
Browse files Browse the repository at this point in the history
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 <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Jun 14, 2008
1 parent 5720508 commit dc0ae30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dc0ae30

Please sign in to comment.