diff options
author | Volker Braun <volker.braun@physik.hu-berlin.de> | 2005-10-24 10:15:36 -0500 |
---|---|---|
committer | James Ketrenos <jketreno@linux.intel.com> | 2005-11-07 16:19:02 -0600 |
commit | e189277a3f1cbb0f1282e0f4b8fa8c91e004c286 (patch) | |
tree | 13874dfda70803b04a9bba7a1a07ddb124f08990 /net | |
parent | 81f875208e7f46d003bedb82d5cfe54458a3ab60 (diff) | |
download | kernel-crypto-e189277a3f1cbb0f1282e0f4b8fa8c91e004c286.tar.gz kernel-crypto-e189277a3f1cbb0f1282e0f4b8fa8c91e004c286.tar.xz kernel-crypto-e189277a3f1cbb0f1282e0f4b8fa8c91e004c286.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/ieee80211_wx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index f5b80535500..181755f2aa8 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c @@ -522,7 +522,8 @@ int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee, crypt = &ieee->crypt[idx]; group_key = 1; } 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; if (ieee->iw_mode == IW_MODE_INFRA) crypt = &ieee->crypt[idx]; @@ -690,7 +691,8 @@ int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee, } else 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) return -EINVAL; |