]> err.no Git - linux-2.6/commitdiff
Fix problem with WEP unicast key > index 0
authorVolker Braun <volker.braun@physik.hu-berlin.de>
Mon, 24 Oct 2005 15:15:36 +0000 (10:15 -0500)
committerJames Ketrenos <jketreno@linux.intel.com>
Mon, 7 Nov 2005 22:19:02 +0000 (16:19 -0600)
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>
net/ieee80211/ieee80211_wx.c

index f5b805355000c798d7e3aa0792966ed2094a95a3..181755f2aa8bf8e53cee7121bd807ee56bc7ec59 100644 (file)
@@ -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;