diff options
author | Ben Greear <greearb@candelatech.com> | 2013-03-19 17:19:56 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-22 06:31:55 -0400 |
commit | 59c1ec2b7884a044967883d9e6169a2cbb4715f3 (patch) | |
tree | cab48cc18684560c3b595275cd3ed5a8b797432a /net | |
parent | 3a7bba649eaaa2068aa6e86ed8bcd10245d1f817 (diff) |
mac80211: make beacon-loss-count configurable
On loaded systems with lots of VIFs, I see lots of beacon
timeouts, even though the connection to the AP is very
good. Allow tuning the beacon-loss-count variable to
give the system longer to process beacons if the user
prefers.
Signed-off-by: Ben Greear <greearb@candelatech.com>
[add the number of beacons to the message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mlme.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 4d383a93ea73..b86b8d4e02a8 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -56,7 +56,10 @@ MODULE_PARM_DESC(max_probe_tries, | |||
56 | * probe on beacon miss before declaring the connection lost | 56 | * probe on beacon miss before declaring the connection lost |
57 | * default to what we want. | 57 | * default to what we want. |
58 | */ | 58 | */ |
59 | #define IEEE80211_BEACON_LOSS_COUNT 7 | 59 | static int beacon_loss_count = 7; |
60 | module_param(beacon_loss_count, int, 0644); | ||
61 | MODULE_PARM_DESC(beacon_loss_count, | ||
62 | "Number of beacon intervals before we decide beacon was lost."); | ||
60 | 63 | ||
61 | /* | 64 | /* |
62 | * Time the connection can be idle before we probe | 65 | * Time the connection can be idle before we probe |
@@ -1645,7 +1648,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
1645 | bss_conf->assoc_capability, bss->has_erp_value, bss->erp_value); | 1648 | bss_conf->assoc_capability, bss->has_erp_value, bss->erp_value); |
1646 | 1649 | ||
1647 | sdata->u.mgd.beacon_timeout = usecs_to_jiffies(ieee80211_tu_to_usec( | 1650 | sdata->u.mgd.beacon_timeout = usecs_to_jiffies(ieee80211_tu_to_usec( |
1648 | IEEE80211_BEACON_LOSS_COUNT * bss_conf->beacon_int)); | 1651 | beacon_loss_count * bss_conf->beacon_int)); |
1649 | 1652 | ||
1650 | sdata->u.mgd.associated = cbss; | 1653 | sdata->u.mgd.associated = cbss; |
1651 | memcpy(sdata->u.mgd.bssid, cbss->bssid, ETH_ALEN); | 1654 | memcpy(sdata->u.mgd.bssid, cbss->bssid, ETH_ALEN); |
@@ -1977,7 +1980,8 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata, | |||
1977 | 1980 | ||
1978 | if (beacon) | 1981 | if (beacon) |
1979 | mlme_dbg_ratelimited(sdata, | 1982 | mlme_dbg_ratelimited(sdata, |
1980 | "detected beacon loss from AP - probing\n"); | 1983 | "detected beacon loss from AP (missed %d beacons) - probing\n", |
1984 | beacon_loss_count); | ||
1981 | 1985 | ||
1982 | ieee80211_cqm_rssi_notify(&sdata->vif, | 1986 | ieee80211_cqm_rssi_notify(&sdata->vif, |
1983 | NL80211_CQM_RSSI_BEACON_LOSS_EVENT, GFP_KERNEL); | 1987 | NL80211_CQM_RSSI_BEACON_LOSS_EVENT, GFP_KERNEL); |