Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111944
b: refs/heads/master
c: 9c40fc5
h: refs/heads/master
v: v3
  • Loading branch information
Javier Cardona authored and John W. Linville committed Sep 24, 2008
1 parent bcf3763 commit 923e073
Show file tree
Hide file tree
Showing 3 changed files with 25 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: 84e463fa0786a105c39281b90f8e3b6fe1444a05
refs/heads/master: 9c40fc510a3df3a74731f5f251b9481feffc0ed5
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/libertas/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct lbs_802_11_security {
u8 WPA2enabled;
u8 wep_enabled;
u8 auth_mode;
u32 key_mgmt;
};

/** Current Basic Service Set State Structure */
Expand Down
26 changes: 23 additions & 3 deletions trunk/drivers/net/wireless/libertas/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1598,8 +1598,20 @@ static int lbs_set_encodeext(struct net_device *dev,
}

out:
if (ret == 0) { /* key installation is time critical: postpone not! */
lbs_do_association_work(priv);
if (ret == 0) {
/* 802.1x and WPA rekeying must happen as quickly as possible,
* especially during the 4-way handshake; thus if in
* infrastructure mode, and either (a) 802.1x is enabled or
* (b) WPA is being used, set the key right away.
*/
if (assoc_req->mode == IW_MODE_INFRA &&
((assoc_req->secinfo.key_mgmt & IW_AUTH_KEY_MGMT_802_1X) ||
(assoc_req->secinfo.key_mgmt & IW_AUTH_KEY_MGMT_PSK) ||
assoc_req->secinfo.WPAenabled ||
assoc_req->secinfo.WPA2enabled)) {
lbs_do_association_work(priv);
} else
lbs_postpone_association_work(priv);
} else {
lbs_cancel_association_work(priv);
}
Expand Down Expand Up @@ -1707,13 +1719,17 @@ static int lbs_set_auth(struct net_device *dev,
case IW_AUTH_TKIP_COUNTERMEASURES:
case IW_AUTH_CIPHER_PAIRWISE:
case IW_AUTH_CIPHER_GROUP:
case IW_AUTH_KEY_MGMT:
case IW_AUTH_DROP_UNENCRYPTED:
/*
* libertas does not use these parameters
*/
break;

case IW_AUTH_KEY_MGMT:
assoc_req->secinfo.key_mgmt = dwrq->value;
updated = 1;
break;

case IW_AUTH_WPA_VERSION:
if (dwrq->value & IW_AUTH_WPA_VERSION_DISABLED) {
assoc_req->secinfo.WPAenabled = 0;
Expand Down Expand Up @@ -1793,6 +1809,10 @@ static int lbs_get_auth(struct net_device *dev,
lbs_deb_enter(LBS_DEB_WEXT);

switch (dwrq->flags & IW_AUTH_INDEX) {
case IW_AUTH_KEY_MGMT:
dwrq->value = priv->secinfo.key_mgmt;
break;

case IW_AUTH_WPA_VERSION:
dwrq->value = 0;
if (priv->secinfo.WPAenabled)
Expand Down

0 comments on commit 923e073

Please sign in to comment.