From c2e543bc8e71985756d192ea856bd6e6db999769 Mon Sep 17 00:00:00 2001 From: Luis R. Rodriguez Date: Wed, 8 Sep 2010 14:33:29 -0700 Subject: [PATCH 6/9] mac80211: reset connection idle when going offchannel When we go offchannel mac80211 currently leaves alive the connection idle monitor. This should be instead postponed until we come back to our home channel, otherwise by the time we get back to the home channel we could be triggering unecesary probe requests. For APs that do not respond to unicast probe requests (Nexus One is a simple example) this means we essentially get disconnected after the probes fails. Cc: stable@kernel.org [2.6.32+] Signed-off-by: Luis R. Rodriguez --- net/mac80211/offchannel.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index c36b191..a13875c 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -28,6 +28,8 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata) /* FIXME: what to do when local->pspolling is true? */ del_timer_sync(&local->dynamic_ps_timer); + del_timer_sync(&sdata->u.mgd.conn_mon_timer); + cancel_work_sync(&local->dynamic_ps_enable_work); if (local->hw.conf.flags & IEEE80211_CONF_PS) { @@ -85,6 +87,8 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata) mod_timer(&local->dynamic_ps_timer, jiffies + msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); } + + ieee80211_sta_reset_conn_monitor(sdata); } void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local) -- 1.7.0.4