]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: fix beacon interval value
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 12 Jun 2008 19:38:37 +0000 (22:38 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 14 Jun 2008 16:18:11 +0000 (12:18 -0400)
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>
net/mac80211/main.c
net/mac80211/mlme.c

index b182f018a1878833a40c9c67f4f55e76845fe92c..5c5396edad3233f730be3852c2a7f8955a03f287 100644 (file)
@@ -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 |
index 7f05820dc6294ce7ff96364c8e09c41e0012d603..46f203740834aa8835fd5a3ab12066935de4e0bb 100644 (file)
@@ -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;