Skip to content

Commit

Permalink
mac80211: fix probe response wait timing
Browse files Browse the repository at this point in the history
In "mac80211: split out and decrease probe wait time" I tried
to reduce the time waiting for a probe response, but failed to
take into account the case where we are detecting beacon loss
in software -- in that case we still wait the monitoring time
rather than the probe wait time. Fix this by refactoring the
mod_timer() calls in ieee80211_associated().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 22, 2009
1 parent 8705782 commit 4ef699f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,8 +1389,8 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata)
ifmgd->flags |= IEEE80211_STA_PROBEREQ_POLL;
ieee80211_send_probe_req(sdata, ifmgd->bssid, ifmgd->ssid,
ifmgd->ssid_len, NULL, 0);
mod_timer(&ifmgd->timer, jiffies + IEEE80211_PROBE_WAIT);
goto unlock;

}

if (time_after(jiffies, sta->last_rx + IEEE80211_PROBE_IDLE_TIME)) {
Expand All @@ -1399,15 +1399,16 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata)
ifmgd->ssid_len, NULL, 0);
}

if (!disassoc)
mod_timer(&ifmgd->timer,
jiffies + IEEE80211_MONITORING_INTERVAL);

unlock:
rcu_read_unlock();

if (disassoc)
ieee80211_set_disassoc(sdata, true, true,
WLAN_REASON_PREV_AUTH_NOT_VALID);
else
mod_timer(&ifmgd->timer, jiffies +
IEEE80211_MONITORING_INTERVAL);
}


Expand Down

0 comments on commit 4ef699f

Please sign in to comment.