aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Braun <volker.braun@physik.hu-berlin.de>2005-10-24 11:15:36 -0400
committerJames Ketrenos <jketreno@linux.intel.com>2005-11-07 17:19:02 -0500
commite189277a3f1cbb0f1282e0f4b8fa8c91e004c286 (patch)
tree13874dfda70803b04a9bba7a1a07ddb124f08990
parent81f875208e7f46d003bedb82d5cfe54458a3ab60 (diff)
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>
-rw-r--r--net/ieee80211/ieee80211_wx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index f5b805355000..181755f2aa8b 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,
522 crypt = &ieee->crypt[idx]; 522 crypt = &ieee->crypt[idx];
523 group_key = 1; 523 group_key = 1;
524 } else { 524 } else {
525 if (idx != 0) 525 /* some Cisco APs use idx>0 for unicast in dynamic WEP */
526 if (idx != 0 && ext->alg != IW_ENCODE_ALG_WEP)
526 return -EINVAL; 527 return -EINVAL;
527 if (ieee->iw_mode == IW_MODE_INFRA) 528 if (ieee->iw_mode == IW_MODE_INFRA)
528 crypt = &ieee->crypt[idx]; 529 crypt = &ieee->crypt[idx];
@@ -690,7 +691,8 @@ int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee,
690 } else 691 } else
691 idx = ieee->tx_keyidx; 692 idx = ieee->tx_keyidx;
692 693
693 if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) 694 if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY &&
695 ext->alg != IW_ENCODE_ALG_WEP)
694 if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA) 696 if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA)
695 return -EINVAL; 697 return -EINVAL;
696 698