Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158886
b: refs/heads/master
c: ac00326
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 10, 2009
1 parent c4a2a4a commit e2155ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 8990646d2fafeacfacba4a4b1073a4216662089a
refs/heads/master: ac00326e9d1d46bf48e9cf60cf892a96b885601a
10 changes: 9 additions & 1 deletion trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,14 +1228,22 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_assoc_request *req)
{
struct ieee80211_sub_if_data *sdata;
int ret;
int ret, i;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);

if (memcmp(sdata->u.mgd.bssid, req->peer_addr, ETH_ALEN) != 0 ||
!(sdata->u.mgd.flags & IEEE80211_STA_AUTHENTICATED))
return -ENOLINK; /* not authenticated */

sdata->u.mgd.flags &= ~IEEE80211_STA_TKIP_WEP_USED;

for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104)
sdata->u.mgd.flags |= IEEE80211_STA_TKIP_WEP_USED;

sdata->u.mgd.flags &= ~IEEE80211_STA_AUTO_BSSID_SEL;
sdata->u.mgd.flags |= IEEE80211_STA_BSSID_SET;

Expand Down

0 comments on commit e2155ad

Please sign in to comment.