libertas: Reduce the WPA key installation time (fixups)
This patch addresses comments from Dan Williams about the patch committed as "libertas: Reduce the WPA key installation time." Signed-off-by: Javier Cardona <javier@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
84e463fa07
commit
9c40fc510a
|
@ -58,6 +58,7 @@ struct lbs_802_11_security {
|
||||||
u8 WPA2enabled;
|
u8 WPA2enabled;
|
||||||
u8 wep_enabled;
|
u8 wep_enabled;
|
||||||
u8 auth_mode;
|
u8 auth_mode;
|
||||||
|
u32 key_mgmt;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Current Basic Service Set State Structure */
|
/** Current Basic Service Set State Structure */
|
||||||
|
|
|
@ -1598,8 +1598,20 @@ static int lbs_set_encodeext(struct net_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (ret == 0) { /* key installation is time critical: postpone not! */
|
if (ret == 0) {
|
||||||
lbs_do_association_work(priv);
|
/* 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 {
|
} else {
|
||||||
lbs_cancel_association_work(priv);
|
lbs_cancel_association_work(priv);
|
||||||
}
|
}
|
||||||
|
@ -1707,13 +1719,17 @@ static int lbs_set_auth(struct net_device *dev,
|
||||||
case IW_AUTH_TKIP_COUNTERMEASURES:
|
case IW_AUTH_TKIP_COUNTERMEASURES:
|
||||||
case IW_AUTH_CIPHER_PAIRWISE:
|
case IW_AUTH_CIPHER_PAIRWISE:
|
||||||
case IW_AUTH_CIPHER_GROUP:
|
case IW_AUTH_CIPHER_GROUP:
|
||||||
case IW_AUTH_KEY_MGMT:
|
|
||||||
case IW_AUTH_DROP_UNENCRYPTED:
|
case IW_AUTH_DROP_UNENCRYPTED:
|
||||||
/*
|
/*
|
||||||
* libertas does not use these parameters
|
* libertas does not use these parameters
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case IW_AUTH_KEY_MGMT:
|
||||||
|
assoc_req->secinfo.key_mgmt = dwrq->value;
|
||||||
|
updated = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case IW_AUTH_WPA_VERSION:
|
case IW_AUTH_WPA_VERSION:
|
||||||
if (dwrq->value & IW_AUTH_WPA_VERSION_DISABLED) {
|
if (dwrq->value & IW_AUTH_WPA_VERSION_DISABLED) {
|
||||||
assoc_req->secinfo.WPAenabled = 0;
|
assoc_req->secinfo.WPAenabled = 0;
|
||||||
|
@ -1793,6 +1809,10 @@ static int lbs_get_auth(struct net_device *dev,
|
||||||
lbs_deb_enter(LBS_DEB_WEXT);
|
lbs_deb_enter(LBS_DEB_WEXT);
|
||||||
|
|
||||||
switch (dwrq->flags & IW_AUTH_INDEX) {
|
switch (dwrq->flags & IW_AUTH_INDEX) {
|
||||||
|
case IW_AUTH_KEY_MGMT:
|
||||||
|
dwrq->value = priv->secinfo.key_mgmt;
|
||||||
|
break;
|
||||||
|
|
||||||
case IW_AUTH_WPA_VERSION:
|
case IW_AUTH_WPA_VERSION:
|
||||||
dwrq->value = 0;
|
dwrq->value = 0;
|
||||||
if (priv->secinfo.WPAenabled)
|
if (priv->secinfo.WPAenabled)
|
||||||
|
|
Loading…
Reference in New Issue