aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-05-12 14:11:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-13 15:44:45 -0400
commite0502de6fe85b66ee51647eb75bc5af3c885d712 (patch)
tree64fd2f5de67268d8a8fc6605911ff28cc9949c67 /net/mac80211
parent34bfc411f63c8b0efb328b7574fc97bc1714cb29 (diff)
mac80211: split out and decrease probe wait time
The time we wait for a probe response after probing an AP due to beacon loss is currently the same as the monitoring interval, 2s. This is far too long, APs should respond to probes within a fraction of that time. To be able to adjust both values, add a new constant IEEE80211_PROBE_WAIT, use it for checking the probe response, and adjust it down to 200ms instead of 2 seconds. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7835e7d43240..ae030688771f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -33,6 +33,7 @@
33#define IEEE80211_ASSOC_TIMEOUT (HZ / 5) 33#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
34#define IEEE80211_ASSOC_MAX_TRIES 3 34#define IEEE80211_ASSOC_MAX_TRIES 3
35#define IEEE80211_MONITORING_INTERVAL (2 * HZ) 35#define IEEE80211_MONITORING_INTERVAL (2 * HZ)
36#define IEEE80211_PROBE_WAIT (HZ / 20)
36#define IEEE80211_PROBE_IDLE_TIME (60 * HZ) 37#define IEEE80211_PROBE_IDLE_TIME (60 * HZ)
37#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ) 38#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
38 39
@@ -1205,7 +1206,7 @@ void ieee80211_beacon_loss_work(struct work_struct *work)
1205 ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid, 1206 ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
1206 ifmgd->ssid_len, NULL, 0); 1207 ifmgd->ssid_len, NULL, 0);
1207 1208
1208 mod_timer(&ifmgd->timer, jiffies + IEEE80211_MONITORING_INTERVAL); 1209 mod_timer(&ifmgd->timer, jiffies + IEEE80211_PROBE_WAIT);
1209} 1210}
1210 1211
1211void ieee80211_beacon_loss(struct ieee80211_vif *vif) 1212void ieee80211_beacon_loss(struct ieee80211_vif *vif)
@@ -1242,7 +1243,7 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata)
1242 } 1243 }
1243 1244
1244 if ((ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL) && 1245 if ((ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL) &&
1245 time_after(jiffies, sta->last_rx + IEEE80211_MONITORING_INTERVAL)) { 1246 time_after(jiffies, sta->last_rx + IEEE80211_PROBE_WAIT)) {
1246 printk(KERN_DEBUG "%s: no probe response from AP %pM " 1247 printk(KERN_DEBUG "%s: no probe response from AP %pM "
1247 "- disassociating\n", 1248 "- disassociating\n",
1248 sdata->dev->name, ifmgd->bssid); 1249 sdata->dev->name, ifmgd->bssid);