ioctl[SIOCSIWENCODEEXT]: Invalid argument + mac80211 + p54

Joachim Foerster mls.JOFT
Fri Aug 17 01:09:42 PDT 2007


Hi wpa_supplicant devs,

today I tried to get my prism54 (isl3890) based wireless LAN card going
with the p54pci (softmac) driver. Since I am using Ubuntu feisty in this
case, I compiled a new kernel based on John Linville's wireless-dev p54
branch, updated wireless-tools and also wpa_supplicant (to version
0.6.0).

My "target" WLAN has IEEE8021x PEAP/MSCHAPv2 authentication and dynamic
WEP key distribution. I started wpa_supplicant (with -D wext) and
everything seems to be fine, lots of good looking lines (no errors, no
warning), except such lines, when it stops:

1187201215.902118: EAPOL: Setting dynamic WEP key: unicast keyidx 3 len 13
1187201215.902130: wpa_driver_wext_set_key: alg=1 key_idx=3 set_tx=128 seq_len=0 key_len=13
ioctl[SIOCSIWENCODEEXT]: Invalid argument
1187201215.902205: Driver did not support SIOCSIWENCODEEXT
1187201215.902217: EAPOL: Failed to set WEP key to the  driver.

I think, at this time, in syslog/dmesg I get:

[ 1442.837451] wlan0: RX WEP frame with unknown keyidx 1 (A1=ff:ff:ff:ff:ff:ff A2=00:01:e3:0f:9b:eb A3=00:0c:76:69:26:8a)
[ 1443.711465] wlan0: set_encrypt - non-zero idx for individual key

Now, I took the kernel sources and found that the last message comes
from the file net/mac80211/ieee80211_ioctl.c (~ line 95):

if (is_broadcast_ether_addr(sta_addr)) {
        sta = NULL;
        if (idx >= NUM_DEFAULT_KEYS) {
                printk(KERN_DEBUG "%s: set_encrypt - invalid idx=%d\n",
                       dev->name, idx);
                return -EINVAL;
        }
        key = sdata->keys[idx];
<snip>
} else {
        set_tx_key = 0;
        if (idx != 0) {
                printk(KERN_DEBUG "%s: set_encrypt - non-zero idx for "
                       "individual key\n", dev->name);
                return -EINVAL;
        }

        sta = sta_info_get(local, sta_addr);
        if (!sta) {
<snip>
                return -ENOENT;
        }
        key = sta->key;
}

So, the error message says "Invalid argument" and and I think it comes
from exactly these lines ("return -EINVAL;"), because wpa_supplicant
calls the ioctl named "SIOCSIWENCODEEXT" obviously with a key index !=
0.

So, after some time with Google, now, I am asking here ... I hope this
is the right place?
Does the mac80211 layer behave wrong? Or is it wpa_supplicant's fault?
Or, am I completely wrong or missing? I think, it's not the drivers
fault (p54pci).

 Joachim






More information about the Hostap mailing list