aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-07-23 19:37:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:18 -0400
commit91a3bd76155085d41520cf41ede39e8b7f01aeff (patch)
tree85fe48cf03a190ab9aba8705fe7694bcdbb85a8b
parent485318471e85c1ddb5e3056fa30fdbbc46d759c6 (diff)
mac80211: fix MLME issuing of probe requests while scanning
We were issuing probe requests to the associated AP on the wrong band by having our beacon timer loss trigger while we are scanning. When we would scan the timer could hit and force us to send a probe request to the AP but with a chance we'd be on the wrong band. This leads to finding no usable bitrate but we should not get so far on the xmit path. We should not be trying to send these probe request frames so prevent ieee80211_mgd_probe_ap() from sending these. As it turns out all callers of ieee80211_mgd_probe_ap() need this check so we just move the scan check there. This means we can remove the recenlty added check during ieee80211_sta_monitor_work(). Additionally we now fix a race condition added by the patch "mac80211: do not monitor the connection while scanning" which had the same check in ieee80211_sta_conn_mon_timer(). The race happens because the timer routine *does* a valid check for scanning but after it queues work into the mac80211 workqueue the work callback can kick off with scanning enabled and cause the same issue we were trying to avoid. The more appropriate solution would be to disable the respective timers during scan and re-enable them after scan but requires more complex code and testing. Cc: Christian Lamparter <chunkeey@web.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Fabio Rossi <rossi.f@inwind.it> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 807ab89bdad9..76c03daeb455 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1166,6 +1166,9 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
1166 if (!netif_running(sdata->dev)) 1166 if (!netif_running(sdata->dev))
1167 return; 1167 return;
1168 1168
1169 if (sdata->local->scanning)
1170 return;
1171
1169 mutex_lock(&ifmgd->mtx); 1172 mutex_lock(&ifmgd->mtx);
1170 1173
1171 if (!ifmgd->associated) 1174 if (!ifmgd->associated)
@@ -2213,9 +2216,6 @@ static void ieee80211_sta_monitor_work(struct work_struct *work)
2213 container_of(work, struct ieee80211_sub_if_data, 2216 container_of(work, struct ieee80211_sub_if_data,
2214 u.mgd.monitor_work); 2217 u.mgd.monitor_work);
2215 2218
2216 if (sdata->local->scanning)
2217 return;
2218
2219 ieee80211_mgd_probe_ap(sdata, false); 2219 ieee80211_mgd_probe_ap(sdata, false);
2220} 2220}
2221 2221