Tormod Volden
2008-01-29 22:36:48 UTC
If you try to read out the encryption keys with "iwlist enc" you
actually get the default key listed 4 times, instead of the 4
different keys. This is because the key number part of erq->flags in
p80211wext_giwencode() gets zeroed out before the key number is read
out. The attached patch make this work better.
Further discussion: IW_ENCODE_ENABLED is 0000, so OR'ing with it is
kind of pointless, although consistent with the other bit masking.
Somewhat better would be to avoid using IW_ENCODE_ENABLED:
if (wlandev->hostwep & HOSTWEP_PRIVACYINVOKED)
erq->flags &= ~IW_ENCODE_DISABLED;
else
erq->flags |= IW_ENCODE_DISABLED;
Tormod
actually get the default key listed 4 times, instead of the 4
different keys. This is because the key number part of erq->flags in
p80211wext_giwencode() gets zeroed out before the key number is read
out. The attached patch make this work better.
Further discussion: IW_ENCODE_ENABLED is 0000, so OR'ing with it is
kind of pointless, although consistent with the other bit masking.
Somewhat better would be to avoid using IW_ENCODE_ENABLED:
if (wlandev->hostwep & HOSTWEP_PRIVACYINVOKED)
erq->flags &= ~IW_ENCODE_DISABLED;
else
erq->flags |= IW_ENCODE_DISABLED;
Tormod