Volker Braun wrote:
> 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.
>
> I think the best behaviour is to not make any assumptions on key indices
> when using WEP. The patch below implements this and works for me.
>
> Volker
>
>
> --- ieee80211-1.1.6-original/ieee80211_wx.c 2005-10-21 13:29:47.000000000 -0400
> +++ ieee80211-1.1.6/ieee80211_wx.c 2005-10-23 16:02:28.000000000 -0400
> @@ -521,8 +521,9 @@
> crypt = &ieee->crypt[idx];
> group_key = 1;
> } else {
> - if (idx != 0)
> - return -EINVAL;
> + /* 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];
> else
> @@ -689,7 +690,8 @@
> } 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;
>
>
>
>
>
I had to apply a similar patch to be able to use WEP with cisco APs. In
my patch, i didn't take into account other algorythms other than WEP, so
your patch seems more correct.
--
Pedro Ramalhais
|