* [PATCH] mac80211: split out and decrease probe wait time
@ 2009-05-12 18:03 Johannes Berg
2009-05-12 18:11 ` [PATCH v2] " Johannes Berg
2009-05-18 15:43 ` [PATCH] " Kalle Valo
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2009-05-12 18:03 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
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>
---
net/mac80211/mlme.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-05-12 19:58:27.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-05-12 19:59:44.000000000 +0200
@@ -33,6 +33,7 @@
#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
#define IEEE80211_ASSOC_MAX_TRIES 3
#define IEEE80211_MONITORING_INTERVAL (2 * HZ)
+#define IEEE80211_PROBE_WAIT (HZ / 5)
#define IEEE80211_PROBE_IDLE_TIME (60 * HZ)
#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
@@ -1205,7 +1206,7 @@ void ieee80211_beacon_loss_work(struct w
ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
ifmgd->ssid_len, NULL, 0);
- mod_timer(&ifmgd->timer, jiffies + IEEE80211_MONITORING_INTERVAL);
+ mod_timer(&ifmgd->timer, jiffies + IEEE80211_PROBE_WAIT);
}
void ieee80211_beacon_loss(struct ieee80211_vif *vif)
@@ -1242,7 +1243,7 @@ static void ieee80211_associated(struct
}
if ((ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL) &&
- time_after(jiffies, sta->last_rx + IEEE80211_MONITORING_INTERVAL)) {
+ time_after(jiffies, sta->last_rx + IEEE80211_PROBE_WAIT)) {
printk(KERN_DEBUG "%s: no probe response from AP %pM "
"- disassociating\n",
sdata->dev->name, ifmgd->bssid);
@@ -1258,7 +1259,7 @@ static void ieee80211_associated(struct
if (!((local->hw.flags & IEEE80211_HW_BEACON_FILTER) &&
(local->hw.conf.flags & IEEE80211_CONF_PS)) &&
time_after(jiffies,
- ifmgd->last_beacon + IEEE80211_MONITORING_INTERVAL)) {
+ ifmgd->last_beacon + IEEE80211_PROBE_WAIT)) {
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: beacon loss from AP %pM "
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] mac80211: split out and decrease probe wait time
2009-05-12 18:03 [PATCH] mac80211: split out and decrease probe wait time Johannes Berg
@ 2009-05-12 18:11 ` Johannes Berg
2009-05-19 17:37 ` Johannes Berg
2009-05-18 15:43 ` [PATCH] " Kalle Valo
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-05-12 18:11 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
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>
---
Oops, replaced one too many, although we probably should make that bit
smarter too.
net/mac80211/mlme.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-05-12 19:58:27.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-05-12 20:10:30.000000000 +0200
@@ -33,6 +33,7 @@
#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
#define IEEE80211_ASSOC_MAX_TRIES 3
#define IEEE80211_MONITORING_INTERVAL (2 * HZ)
+#define IEEE80211_PROBE_WAIT (HZ / 20)
#define IEEE80211_PROBE_IDLE_TIME (60 * HZ)
#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
@@ -1205,7 +1206,7 @@ void ieee80211_beacon_loss_work(struct w
ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
ifmgd->ssid_len, NULL, 0);
- mod_timer(&ifmgd->timer, jiffies + IEEE80211_MONITORING_INTERVAL);
+ mod_timer(&ifmgd->timer, jiffies + IEEE80211_PROBE_WAIT);
}
void ieee80211_beacon_loss(struct ieee80211_vif *vif)
@@ -1242,7 +1243,7 @@ static void ieee80211_associated(struct
}
if ((ifmgd->flags & IEEE80211_STA_PROBEREQ_POLL) &&
- time_after(jiffies, sta->last_rx + IEEE80211_MONITORING_INTERVAL)) {
+ time_after(jiffies, sta->last_rx + IEEE80211_PROBE_WAIT)) {
printk(KERN_DEBUG "%s: no probe response from AP %pM "
"- disassociating\n",
sdata->dev->name, ifmgd->bssid);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] mac80211: split out and decrease probe wait time
2009-05-12 18:03 [PATCH] mac80211: split out and decrease probe wait time Johannes Berg
2009-05-12 18:11 ` [PATCH v2] " Johannes Berg
@ 2009-05-18 15:43 ` Kalle Valo
1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2009-05-18 15:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> 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.
Looks good to me.
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Kalle Valo <kalle.valo@nokia.com>
--
Kalle Valo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: split out and decrease probe wait time
2009-05-12 18:11 ` [PATCH v2] " Johannes Berg
@ 2009-05-19 17:37 ` Johannes Berg
2009-05-19 17:42 ` John W. Linville
2009-05-20 17:35 ` John W. Linville
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2009-05-19 17:37 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
You know ... somehow I managed to send out v2 with a wrong interval.
This was supposed to be / 5 not / 20, should I send a separate patch or
would you roll this into the original? The commit log says 200ms, but
the code uses 50ms which is far too short.
johannes
---
net/mac80211/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-05-19 19:36:00.564057102 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-05-19 19:36:04.773067791 +0200
@@ -33,7 +33,7 @@
#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
#define IEEE80211_ASSOC_MAX_TRIES 3
#define IEEE80211_MONITORING_INTERVAL (2 * HZ)
-#define IEEE80211_PROBE_WAIT (HZ / 20)
+#define IEEE80211_PROBE_WAIT (HZ / 5)
#define IEEE80211_PROBE_IDLE_TIME (60 * HZ)
#define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: split out and decrease probe wait time
2009-05-19 17:37 ` Johannes Berg
@ 2009-05-19 17:42 ` John W. Linville
2009-05-20 17:35 ` John W. Linville
1 sibling, 0 replies; 6+ messages in thread
From: John W. Linville @ 2009-05-19 17:42 UTC (permalink / raw)
To: Johannes Berg; +Cc: Kalle Valo, linux-wireless
On Tue, May 19, 2009 at 07:37:28PM +0200, Johannes Berg wrote:
> You know ... somehow I managed to send out v2 with a wrong interval.
>
> This was supposed to be / 5 not / 20, should I send a separate patch or
> would you roll this into the original? The commit log says 200ms, but
> the code uses 50ms which is far too short.
Ok, I'll roll this up...
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mac80211: split out and decrease probe wait time
2009-05-19 17:37 ` Johannes Berg
2009-05-19 17:42 ` John W. Linville
@ 2009-05-20 17:35 ` John W. Linville
1 sibling, 0 replies; 6+ messages in thread
From: John W. Linville @ 2009-05-20 17:35 UTC (permalink / raw)
To: Johannes Berg; +Cc: Kalle Valo, linux-wireless
On Tue, May 19, 2009 at 07:37:28PM +0200, Johannes Berg wrote:
> You know ... somehow I managed to send out v2 with a wrong interval.
>
> This was supposed to be / 5 not / 20, should I send a separate patch or
> would you roll this into the original? The commit log says 200ms, but
> the code uses 50ms which is far too short.
>
> johannes
>
> ---
> net/mac80211/mlme.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- wireless-testing.orig/net/mac80211/mlme.c 2009-05-19 19:36:00.564057102 +0200
> +++ wireless-testing/net/mac80211/mlme.c 2009-05-19 19:36:04.773067791 +0200
> @@ -33,7 +33,7 @@
> #define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
> #define IEEE80211_ASSOC_MAX_TRIES 3
> #define IEEE80211_MONITORING_INTERVAL (2 * HZ)
> -#define IEEE80211_PROBE_WAIT (HZ / 20)
> +#define IEEE80211_PROBE_WAIT (HZ / 5)
> #define IEEE80211_PROBE_IDLE_TIME (60 * HZ)
> #define IEEE80211_RETRY_AUTH_INTERVAL (1 * HZ)
Crud, I didn't realize I had already pushed that patch to Dave M.
Could you submit this as a separate patch?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-20 17:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 18:03 [PATCH] mac80211: split out and decrease probe wait time Johannes Berg
2009-05-12 18:11 ` [PATCH v2] " Johannes Berg
2009-05-19 17:37 ` Johannes Berg
2009-05-19 17:42 ` John W. Linville
2009-05-20 17:35 ` John W. Linville
2009-05-18 15:43 ` [PATCH] " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.