瀏覽代碼

mac80211: don't probe if we have probe response

We can now easily determine whether we already
have probe response information for the BSS we
are asked to connect to, in which case there's
little point in probing the BSS again.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg 15 年之前
父節點
當前提交
070bb5477f
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      net/mac80211/mlme.c

+ 5 - 5
net/mac80211/mlme.c

@@ -27,10 +27,6 @@
 #include "rate.h"
 #include "rate.h"
 #include "led.h"
 #include "led.h"
 
 
-#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
-#define IEEE80211_AUTH_MAX_TRIES 3
-#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
-#define IEEE80211_ASSOC_MAX_TRIES 3
 #define IEEE80211_MAX_PROBE_TRIES 5
 #define IEEE80211_MAX_PROBE_TRIES 5
 
 
 /*
 /*
@@ -1844,7 +1840,11 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
 	wk->probe_auth.algorithm = auth_alg;
 	wk->probe_auth.algorithm = auth_alg;
 	wk->probe_auth.privacy = req->bss->capability & WLAN_CAPABILITY_PRIVACY;
 	wk->probe_auth.privacy = req->bss->capability & WLAN_CAPABILITY_PRIVACY;
 
 
-	wk->type = IEEE80211_WORK_DIRECT_PROBE;
+	/* if we already have a probe, don't probe again */
+	if (req->bss->proberesp_ies)
+		wk->type = IEEE80211_WORK_AUTH;
+	else
+		wk->type = IEEE80211_WORK_DIRECT_PROBE;
 	wk->chan = req->bss->channel;
 	wk->chan = req->bss->channel;
 	wk->sdata = sdata;
 	wk->sdata = sdata;
 	wk->done = ieee80211_probe_auth_done;
 	wk->done = ieee80211_probe_auth_done;