Skip to content

Commit d7c722d

Browse files
elpJiri Slaby
authored andcommitted
mac80211: reset probe_send_count also in HW_CONNECTION_MONITOR case
commit 448cd2e 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>
1 parent 27b2497 commit d7c722d

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎include/net/mac80211.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,6 @@ struct ieee80211_tx_control {
14491449
* @IEEE80211_HW_CONNECTION_MONITOR:
14501450
* The hardware performs its own connection monitoring, including
14511451
* periodic keep-alives to the AP and probing the AP on beacon loss.
1452-
* When this flag is set, signaling beacon-loss will cause an immediate
1453-
* change to disassociated state.
14541452
*
14551453
* @IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC:
14561454
* This device needs to get data from beacon before association (i.e.

‎net/mac80211/mlme.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
131131
if (unlikely(!sdata->u.mgd.associated))
132132
return;
133133

134+
ifmgd->probe_send_count = 0;
135+
134136
if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
135137
return;
136138

137139
mod_timer(&sdata->u.mgd.conn_mon_timer,
138140
round_jiffies_up(jiffies + IEEE80211_CONNECTION_IDLE_TIME));
139-
140-
ifmgd->probe_send_count = 0;
141141
}
142142

143143
static int ecw2cw(int ecw)

0 commit comments

Comments
 (0)