Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111212
b: refs/heads/master
c: 6042a3e
h: refs/heads/master
v: v3
  • Loading branch information
Ron Rindjunsky authored and John W. Linville committed Aug 22, 2008
1 parent f923081 commit 02b607f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 008c44825db74c6cdcea13dfb1598896e74fe908
refs/heads/master: 6042a3e3ff7943e4ff5cbcb8c223ea87337501ea
4 changes: 3 additions & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ struct ieee80211_if_sta {

struct sk_buff_head skb_queue;

int auth_tries, assoc_tries;
int assoc_scan_tries; /* number of scans done pre-association */
int auth_tries; /* retries for auth req */
int assoc_tries; /* retries for assoc req */

unsigned long request;

Expand Down
9 changes: 7 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "led.h"
#include "mesh.h"

#define IEEE80211_ASSOC_SCANS_MAX_TRIES 2
#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
#define IEEE80211_AUTH_MAX_TRIES 3
#define IEEE80211_ASSOC_TIMEOUT (HZ / 5)
Expand Down Expand Up @@ -596,6 +597,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
{
if (deauth)
ifsta->auth_tries = 0;
ifsta->assoc_scan_tries = 0;
ifsta->assoc_tries = 0;
ieee80211_set_associated(sdata, ifsta, 0);
}
Expand Down Expand Up @@ -3405,7 +3407,9 @@ static void ieee80211_sta_reset_auth(struct ieee80211_sub_if_data *sdata,
ifsta->auth_alg = WLAN_AUTH_OPEN;
ifsta->auth_transaction = -1;
ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
ifsta->auth_tries = ifsta->assoc_tries = 0;
ifsta->assoc_scan_tries = 0;
ifsta->auth_tries = 0;
ifsta->assoc_tries = 0;
netif_carrier_off(sdata->dev);
}

Expand Down Expand Up @@ -3510,7 +3514,8 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata,
ieee80211_sta_reset_auth(sdata, ifsta);
return 0;
} else {
if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE) {
if (ifsta->assoc_scan_tries < IEEE80211_ASSOC_SCANS_MAX_TRIES) {
ifsta->assoc_scan_tries++;
if (ifsta->flags & IEEE80211_STA_AUTO_SSID_SEL)
ieee80211_sta_start_scan(sdata, NULL, 0);
else
Expand Down

0 comments on commit 02b607f

Please sign in to comment.