Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158893
b: refs/heads/master
c: 0a9b5e1
h: refs/heads/master
i:
  158891: de00e65
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 10, 2009
1 parent c816f6f commit 7c6e8d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 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: 19957bb399e2722719c0e20c9ae91cf8b6aaff04
refs/heads/master: 0a9b5e17952ec7ce938645a23ba29bcfdb66c8d9
22 changes: 15 additions & 7 deletions trunk/net/wireless/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,21 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
struct cfg80211_internal_bss *bss;
int i, err, slot = -1, nfree = 0;

if (wdev->current_bss &&
memcmp(bssid, wdev->current_bss->pub.bssid, ETH_ALEN) == 0)
return -EALREADY;

for (i = 0; i < MAX_AUTH_BSSES; i++) {
if (wdev->authtry_bsses[i] &&
memcmp(bssid, wdev->authtry_bsses[i]->pub.bssid,
ETH_ALEN) == 0)
return -EALREADY;
if (wdev->auth_bsses[i] &&
memcmp(bssid, wdev->auth_bsses[i]->pub.bssid,
ETH_ALEN) == 0)
return -EALREADY;
}

memset(&req, 0, sizeof(req));

req.ie = ie;
Expand All @@ -290,13 +305,6 @@ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,

bss = bss_from_pub(req.bss);

for (i = 0; i < MAX_AUTH_BSSES; i++) {
if (bss == wdev->auth_bsses[i]) {
err = -EALREADY;
goto out;
}
}

for (i = 0; i < MAX_AUTH_BSSES; i++) {
if (!wdev->auth_bsses[i] && !wdev->authtry_bsses[i]) {
slot = i;
Expand Down

0 comments on commit 7c6e8d2

Please sign in to comment.