mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
Fix problem with WEP unicast key > index 0
The functions ieee80211_wx_{get,set}_encodeext fail if one tries to set unicast (IW_ENCODE_EXT_GROUP_KEY not set) keys at key indices>0. But at least some Cisco APs dish out dynamic WEP unicast keys at index !=0. Signed-off-by: Volker Braun <volker.braun@physik.hu-berlin.de> Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
This commit is contained in:
parent
81f875208e
commit
e189277a3f
@ -522,7 +522,8 @@ int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee,
|
|||||||
crypt = &ieee->crypt[idx];
|
crypt = &ieee->crypt[idx];
|
||||||
group_key = 1;
|
group_key = 1;
|
||||||
} else {
|
} else {
|
||||||
if (idx != 0)
|
/* some Cisco APs use idx>0 for unicast in dynamic WEP */
|
||||||
|
if (idx != 0 && ext->alg != IW_ENCODE_ALG_WEP)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (ieee->iw_mode == IW_MODE_INFRA)
|
if (ieee->iw_mode == IW_MODE_INFRA)
|
||||||
crypt = &ieee->crypt[idx];
|
crypt = &ieee->crypt[idx];
|
||||||
@ -690,7 +691,8 @@ int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee,
|
|||||||
} else
|
} else
|
||||||
idx = ieee->tx_keyidx;
|
idx = ieee->tx_keyidx;
|
||||||
|
|
||||||
if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY)
|
if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY &&
|
||||||
|
ext->alg != IW_ENCODE_ALG_WEP)
|
||||||
if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
|
if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user