diff mbox

mac80211: reset probe_send_count also in HW_CONNECTION_MONITOR case

Message ID 1392114618-26573-1-git-send-email-emmanuel.grumbach@intel.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Emmanuel Grumbach Feb. 11, 2014, 10:30 a.m. UTC
From: Eliad Peller <eliad@wizery.com>

In case of beacon_loss with IEEE80211_HW_CONNECTION_MONITOR
device, mac80211 probes the ap (and disconnects on timeout)
but ignores the ack.

If we already got an ack, there's no reason to continue
disconnecting. this can help devices that supports
IEEE80211_HW_CONNECTION_MONITOR only partially (e.g. take
care of keep alives, but does not probe the ap.

In case the device wants to disconnect without probing,
it can just call ieee80211_connection_loss.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
---
 include/net/mac80211.h | 2 --
 net/mac80211/mlme.c    | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Johannes Berg Feb. 11, 2014, 11:58 a.m. UTC | #1
On Tue, 2014-02-11 at 12:30 +0200, Emmanuel Grumbach wrote:
> From: Eliad Peller <eliad@wizery.com>
> 
> In case of beacon_loss with IEEE80211_HW_CONNECTION_MONITOR
> device, mac80211 probes the ap (and disconnects on timeout)
> but ignores the ack.
> 
> If we already got an ack, there's no reason to continue
> disconnecting. this can help devices that supports
> IEEE80211_HW_CONNECTION_MONITOR only partially (e.g. take
> care of keep alives, but does not probe the ap.
> 
> In case the device wants to disconnect without probing,
> it can just call ieee80211_connection_loss.

Applied.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 87a3cc6..c851249 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1507,8 +1507,6 @@  struct ieee80211_tx_control {
  * @IEEE80211_HW_CONNECTION_MONITOR:
  *	The hardware performs its own connection monitoring, including
  *	periodic keep-alives to the AP and probing the AP on beacon loss.
- *	When this flag is set, signaling beacon-loss will cause an immediate
- *	change to disassociated state.
  *
  * @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC:
  *	This device needs to get data from beacon before association (i.e.
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index da4b09e..a70a59e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -131,13 +131,13 @@  void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
 	if (unlikely(!sdata->u.mgd.associated))
 		return;
 
+	ifmgd->probe_send_count = 0;
+
 	if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
 		return;
 
 	mod_timer(&sdata->u.mgd.conn_mon_timer,
 		  round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME));
-
-	ifmgd->probe_send_count = 0;
 }
 
 static int ecw2cw(int ecw)