]> git.hungrycats.org Git - linux/commitdiff
mac80211: reset probe_send_count also in HW_CONNECTION_MONITOR case
authorEliad Peller <eliad@wizery.com>
Tue, 11 Feb 2014 10:30:18 +0000 (12:30 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 Aug 2014 12:12:02 +0000 (14:12 +0200)
commit 448cd2e248732326632957e52ea9c44729affcb2 upstream.

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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
include/net/mac80211.h
net/mac80211/mlme.c

index cc6035f1a2f11c1b68f5a82235d4698441e8cddd..0218c3d67f4650f5b354b9d02fec03d9deac7130 100644 (file)
@@ -1449,8 +1449,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.
index cd8d55c99ceb99d29eb361f5ee2ceedd21ee9f84..591d990a06e703fca3d0800f49217d6e5d368dbb 100644 (file)
@@ -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)