mac80211 does not support WPA when used with wext
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.
Why? Is this a known bug/limitation.
And if yes any plans to fix it? Fedora 7 uses mac80211 by default which results into networkmanager and (unpatched)wpa_supplicant is useless for people who use WPA/WPA2.
P.S: please CC me
Johannes Berg
maintainerQuoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.
You must have done something wrong, it works well.
johannes
Quoted 9 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
ok simple test case for me:
boot F7 livecd on a laptop with a ipw3945 card.
the iwlwifi driver got loaded....
try to selected WPA from the nm menu ... wait there aren't any :( ... test with ipw3945 (ieee80211 based) wpa options are back ;)
so can you please tell me which driver you used and how you verifed that it works?
Quoted 2 lines
johannes
Quoted 9 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
same also happens with the rt2x00 drivers....
it seems that I am not doing something wrong but that you are using a ieee80211 based driver....
Quoted 2 lines
johannes
Quoted 8 lines · dragoran
Quoted 7 lines · Johannes Berg
Quoted 4 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.
Quoted 6 lines
Quoted 3 lines
You must have done something wrong, it works well.
same also happens with the rt2x00 drivers....
it seems that I am not doing something wrong but that you are using a ieee80211 based driver....
I think you can trust Johannes, the author of the mac80211 configuratrion interface, in this matter. ;)
mac80211 _does_ work with WPA. For sure. 100%.
You are doing something wrong.
Signature · 1 line
Greetings Michael.
Quoted 12 lines · Michael Buesch
Quoted 11 lines · dragoran
Quoted 10 lines · Johannes Berg
Quoted 4 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
Quoted 7 lines
Quoted 3 lines
same also happens with the rt2x00 drivers....
it seems that I am not doing something wrong but that you are using a ieee80211 based driver....I think you can trust Johannes, the author of the mac80211 configuratrion interface, in this matter. ;)
mac80211 _does_ work with WPA. For sure. 100%.
Well, except for the WEXT breakage on platforms with 64bit kernel and 32bit userland. But there WEXT doesn't work with ieee80211, either.
Signature · 1 line
Greetings Michael.
Quoted 12 lines · Michael Buesch
Quoted 11 lines · dragoran
Quoted 10 lines · Johannes Berg
Quoted 4 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
Quoted 8 lines
Quoted 3 lines
same also happens with the rt2x00 drivers....
it seems that I am not doing something wrong but that you are using a ieee80211 based driver....I think you can trust Johannes, the author of the mac80211 configuratrion interface, in this matter. ;)
mac80211 _does_ work with WPA. For sure. 100%.
You are doing something wrong.
No, he's not, see my previous post. mac80211 doesn't use the right WE-18 and later IWEVGENIE event to report IEs in scan results. Like every other in-kernel driver/stack out there besides mac80211.
Dan
Quoted 6 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
Nope! This time it's really mac80211 :)
Take a look at ieee80211_sta_scan_result() in mac80211/ieee80211_sta.c. Note that it returns custom events for the WPA & RSN IEs. That's just wrong. We should be using already-defined events.
[ Hopefully in cfg80211 we'll have a very easy way to extend the defined tag-list for attributes returned from scan results. If you look at what various drivers have custom-defined for the CUSTOM tag, we weren't very aggressive about standardizing custom tags into IWEV* events. ]
I'm not sure where the heck these bits of mac80211 came from; both hostap and ieee80211 do it right (also airo, libertas, and prism54, though I'm to blame for those). Plus, it's a net loss of code to do it with IWEVGENIE, and no additional kzalloc that can fail! Bonus+2!
hostap:
-------------
if (bss && bss->wpa_ie_len > 0 && bss->wpa_ie_len <= MAX_WPA_IE_LEN) {
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = bss->wpa_ie_len;
current_ev = iwe_stream_add_point(
current_ev, end_buf, &iwe, bss->wpa_ie);
}
if (bss && bss->rsn_ie_len > 0 && bss->rsn_ie_len <= MAX_WPA_IE_LEN) {
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = bss->rsn_ie_len;
current_ev = iwe_stream_add_point(
current_ev, end_buf, &iwe, bss->rsn_ie);
}ieee80211:
-------------
memset(&iwe, 0, sizeof(iwe));
if (network->wpa_ie_len) {
char buf[MAX_WPA_IE_LEN];
memcpy(buf, network->wpa_ie, network->wpa_ie_len);
iwe.cmd = IWEVGENIE;
iwe.u.data.length = network->wpa_ie_len;
start = iwe_stream_add_point(start, stop, &iwe, buf);
}
memset(&iwe, 0, sizeof(iwe));
if (network->rsn_ie_len) {
char buf[MAX_WPA_IE_LEN];
memcpy(buf, network->rsn_ie, network->rsn_ie_len);
iwe.cmd = IWEVGENIE;
iwe.u.data.length = network->rsn_ie_len;
start = iwe_stream_add_point(start, stop, &iwe, buf);
}<rant>
I don't quite get why mac80211/d80211 was so behind in wireless extensions support. Didn't Jouni and Devicescape basically _write_ WE-18/19 WPA support? Did d80211 just not get the love that wpa_supplicant and the other drivers got when they were updated to WE-18 and later?
</rant>
I can whip something up that _looks_ right but hasn't been compile tested if somebody else can test it.
Dan
Quoted 3 lines · Dan Williams
Take a look at
ieee80211_sta_scan_result()inmac80211/ieee80211_sta.c. Note that it returns custom events for the WPA & RSN IEs. That's just wrong. We should be using already-defined events.
I don't think the "already-defined events" were defined when that code was written.. Sure, now it should be updated to use the WEXT-18 -based events.
Quoted 5 lines
I don't quite get why mac80211/d80211 was so behind in wireless extensions support. Didn't Jouni and Devicescape basically _write_ WE-18/19 WPA support? Did d80211 just not get the love that
wpa_supplicantand the other drivers got when they were updated to WE-18 and later?
Well, I may have added WPA support to WE-18, but only after having implemented support for WPA using custom events (the only real option available prior to WE-18). Devicescape code needed to work with number of Linux kernels that did not include WE-18, so it had to continue using those custom events. Looks like no one has had enough time or interest to update it to use the events defined in WE-18. wpa_supplicant supports both mechanisms for receiving the IEs.
Signature · 1 line
Jouni Malinen PGP id EFC895FA
Quoted 70 lines · Dan Williams
Quoted 5 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
Nope! This time it's really mac80211 :)
Take a look at
ieee80211_sta_scan_result()inmac80211/ieee80211_sta.c. Note that it returns custom events for the WPA & RSN IEs. That's just wrong. We should be using already-defined events.[ Hopefully in cfg80211 we'll have a very easy way to extend the defined tag-list for attributes returned from scan results. If you look at what various drivers have custom-defined for the CUSTOM tag, we weren't very aggressive about standardizing custom tags into IWEV* events. ]
I'm not sure where the heck these bits of mac80211 came from; both hostap and ieee80211 do it right (also airo, libertas, and prism54, though I'm to blame for those). Plus, it's a net loss of code to do it with IWEVGENIE, and no additional kzalloc that can fail! Bonus+2!
hostap:
-------------if (bss && bss->wpa_ie_len > 0 && bss->wpa_ie_len <= MAX_WPA_IE_LEN) { memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVGENIE; iwe.u.data.length = bss->wpa_ie_len; current_ev = iwe_stream_add_point( current_ev, end_buf, &iwe, bss->wpa_ie); } if (bss && bss->rsn_ie_len > 0 && bss->rsn_ie_len <= MAX_WPA_IE_LEN) { memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVGENIE; iwe.u.data.length = bss->rsn_ie_len; current_ev = iwe_stream_add_point( current_ev, end_buf, &iwe, bss->rsn_ie); }ieee80211:
-------------memset(&iwe, 0, sizeof(iwe)); if (network->wpa_ie_len) { char buf[MAX_WPA_IE_LEN]; memcpy(buf, network->wpa_ie, network->wpa_ie_len); iwe.cmd = IWEVGENIE; iwe.u.data.length = network->wpa_ie_len; start = iwe_stream_add_point(start, stop, &iwe, buf); } memset(&iwe, 0, sizeof(iwe)); if (network->rsn_ie_len) { char buf[MAX_WPA_IE_LEN]; memcpy(buf, network->rsn_ie, network->rsn_ie_len); iwe.cmd = IWEVGENIE; iwe.u.data.length = network->rsn_ie_len; start = iwe_stream_add_point(start, stop, &iwe, buf); }<rant>
I don't quite get why mac80211/d80211 was so behind in wireless extensions support. Didn't Jouni and Devicescape basically _write_ WE-18/19 WPA support? Did d80211 just not get the love that
wpa_supplicantand the other drivers got when they were updated to WE-18 and later?
Quoted 5 lines
</rant>
I can whip something up that _looks_ right but hasn't been compile tested if somebody else can test it.
I can test it. ATM, I cannot get NM to connect, which prevents any testing of mac80211.
Larry
Quoted 6 lines · Dan Williams
Quoted 5 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.
Quoted 8 lines
Quoted 1 line
You must have done something wrong, it works well.
Nope! This time it's really mac80211 :)
Take a look at
ieee80211_sta_scan_result()inmac80211/ieee80211_sta.c. Note that it returns custom events for the WPA & RSN IEs. That's just wrong. We should be using already-defined events.
What does that have to do with WPA not working? wpa_supplicant works fine with the custom events on my system. Also works fine with the standard events which the following patch makes mac80211 use.
--
mac80211: use IWEVGENIE
From: Michael Wu <[email protected]>
Use IWEVGENIE which was defined in WE-18.
---
net/mac80211/ieee80211_sta.c | 40 ++++++++++------------------------------ 1 files changed, 10 insertions(+), 30 deletions(-)
net/mac80211/ieee80211_sta.c +10 -30
@@ -2839,39 +2839,19 @@ ieee80211_sta_scan_result(struct net_device *dev, current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe,"" );if (bss && bss->wpa_ie) { -char *buf, *p; -int i; - buf =kmalloc (30 + bss->wpa_ie_len *2 ,GFP_ATOMIC ); -if (buf) { - p = buf; - p +=sprintf (p,"wpa_ie=" ); -for (i =0 ; i < bss->wpa_ie_len; i++) - p+=sprintf (p,"%02x" , bss->wpa_ie[i]); -memset (&iwe,0 ,sizeof (iwe)); - iwe.cmd =IWEVCUSTOM ; - iwe.u.data.length =strlen (buf); - current_ev =iwe_stream_add_point (current_ev, end_buf, - &iwe, buf); -kfree (buf); - } +memset (&iwe,0 ,sizeof (iwe)); + iwe.cmd =IWEVGENIE ; + iwe.u.data.length = bss->wpa_ie_len; + current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe, + bss->wpa_ie); }if (bss && bss->rsn_ie) { -char *buf, *p; -int i; - buf =kmalloc (30 + bss->rsn_ie_len *2 ,GFP_ATOMIC ); -if (buf) { - p = buf; - p +=sprintf (p,"rsn_ie=" ); -for (i =0 ; i < bss->rsn_ie_len; i++) - p+=sprintf (p,"%02x" , bss->rsn_ie[i]); -memset (&iwe,0 ,sizeof (iwe)); - iwe.cmd =IWEVCUSTOM ; - iwe.u.data.length =strlen (buf); - current_ev =iwe_stream_add_point (current_ev, end_buf, - &iwe, buf); -kfree (buf); - } +memset (&iwe,0 ,sizeof (iwe)); + iwe.cmd =IWEVGENIE ; + iwe.u.data.length = bss->rsn_ie_len; + current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe, + bss->rsn_ie); }if (bss) {
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · dragoran dragoran
also networkmanager and hal think that the card only supports wep... thx for the patch...
does it adress this issues?
No, this has nothing to do with that. The following patch should address that issue, but my copy of networkmanager already does WPA fine so I can't say for sure whether it will help or not. A quick look through the networkmanager code seems to suggest this will work.
--
mac80211: set enc_capa
From: Michael Wu <[email protected]>
Update we_version_source and set enc_capa in iw_range.
---
net/mac80211/ieee80211_ioctl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
net/mac80211/ieee80211_ioctl.c +0 -0
@@ -1583,7 +1583,7 @@ static int ieee80211_ioctl_giwrange(struct net_device
*dev,
memset(range, 0, sizeof(struct iw_range));
range->we_version_compiled = WIRELESS_EXT;
- range->we_version_source = 14;
+ range->we_version_source = 21;
range->retry_capa = IW_RETRY_LIMIT;
range->retry_flags = IW_RETRY_LIMIT;
range->min_retry = 0;
@@ -1603,6 +1603,9 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev,
range->avg_qual.noise = 0;
range->avg_qual.updated = local->wstats_flags;
+ range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
+ IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
+
return 0;
}
Dan Williams
Acked-byQuoted 8 lines · Michael Wu
Quoted 3 lines · dragoran dragoran
also networkmanager and hal think that the card only supports wep... thx for the patch...
does it adress this issues?No, this has nothing to do with that. The following patch should address that issue, but my copy of networkmanager already does WPA fine so I can't say for sure whether it will help or not. A quick look through the networkmanager code seems to suggest this will work.
Correct; NM won't allow WPA unless the driver explicitly advertises support for it.
Quoted 39 lines
--
mac80211: set
enc_capaFrom: Michael Wu <[email protected]>
Update
we_version_sourceand setenc_capainiw_range.Signed-off-by Michael Wu <[email protected]>---
net/mac80211/ieee80211_ioctl.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)net/mac80211/ieee80211_ioctl.c +1
-1@@ -1583,7 +1583,7 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev,memset (range,0 ,sizeof (struct iw_range )); range->we_version_compiled =WIRELESS_EXT ; - range->we_version_source =14 ; + range->we_version_source =21 ; range->retry_capa =IW_RETRY_LIMIT ; range->retry_flags =IW_RETRY_LIMIT ;net/mac80211/ieee80211_ioctl.c +3
-0range->min_retry =0 ;@@ -1603,6 +1603,9 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev, range->avg_qual.noise =0 ; range->avg_qual.updated = local->wstats_flags; + range->enc_capa =IW_ENC_CAPA_WPA |IW_ENC_CAPA_WPA2 | +IW_ENC_CAPA_CIPHER_TKIP |IW_ENC_CAPA_CIPHER_CCMP ; +return 0 ; }
WPA does not connect to bcm43xx-mac80211 when using NetworkManager
Dan,
My bcm43xx-mac80211 system generates the following log entries when trying to connect using WPA-PSK TKIP controlled by NetworkManager. The same configuration works with bcm43xx-softmac.
eth1: Initial auth_alg=0
eth1: authenticate with AP 00:14:bf:85:49:fa
eth1: RX authentication from 00:14:bf:85:49:fa (alg=0 transaction=2 status=0)
eth1: authenticated
eth1: associate with AP 00:14:bf:85:49:fa
eth1: RX AssocResp from 00:14:bf:85:49:fa (capab=0x31 status=0 aid=2)
eth1: associated
wmaster0: Added STA 00:14:bf:85:49:fa
eth1: RX deauthentication from 00:14:bf:85:49:fa (reason=15)
eth1: deauthenticated
eth1: set_encrypt - unknown addr 00:00:00:00:00:00
eth1: authenticate with AP 00:14:bf:85:49:fa
eth1: RX authentication from 00:14:bf:85:49:fa (alg=0 transaction=2 status=0)
eth1: authenticated
eth1: associate with AP 00:14:bf:85:49:fa
eth1: RX ReassocResp from 00:14:bf:85:49:fa (capab=0x31 status=0 aid=2)
eth1: associated
eth1: starting scan
It does the original open authentication and associates, but the final WPA authentication times out.
I'm using Michael Buesch's "mb" tree with the "mac80211: use IWEVGENIE" and "mac80211: set enc_capa" patches by Michael Wu. My distro is openSUSE 10.2 on an x86_64 system.
Please advise on any further information I should provide.
Thanks,
Larry
Re: WPA does not connect to bcm43xx-mac80211 when using NetworkManager
Quoted 4 lines · Larry Finger
Dan,
My bcm43xx-mac80211 system generates the following log entries when trying to connect using WPA-PSK TKIP controlled by NetworkManager. The same configuration works with bcm43xx-softmac.
So what you're saying here is that NM works with softmac, but doesn't work with mac80211?
Quoted 19 lines
eth1: Initial auth_alg=0
eth1: authenticate with AP 00:14:bf:85:49:fa
eth1: RX authentication from 00:14:bf:85:49:fa (alg=0 transaction=2 status=0)
eth1: authenticated
eth1: associate with AP 00:14:bf:85:49:fa
eth1: RX AssocResp from 00:14:bf:85:49:fa (capab=0x31 status=0 aid=2)
eth1: associated
wmaster0: Added STA 00:14:bf:85:49:fa
eth1: RX deauthentication from 00:14:bf:85:49:fa (reason=15)
eth1: deauthenticated
eth1:set_encrypt- unknown addr 00:00:00:00:00:00
eth1: authenticate with AP 00:14:bf:85:49:fa
eth1: RX authentication from 00:14:bf:85:49:fa (alg=0 transaction=2 status=0)
eth1: authenticated
eth1: associate with AP 00:14:bf:85:49:fa
eth1: RX ReassocResp from 00:14:bf:85:49:fa (capab=0x31 status=0 aid=2)
eth1: associated
eth1: starting scan
Quoted 1 line
It does the original open authentication and associates, but the final WPA authentication times out.
Hmm; any idea why that happens? Can we figure out more about the association process inside the driver? If it works with wpa_supplicant, can you increase the debugging output of wpa_supplicant in the NM sources in nm-device-802-11-wireless.c in supplicant_exec() by adding another argument to argv with the value '-ddd'?
Thanks!
Dan
Quoted 8 lines
I'm using Michael Buesch's "mb" tree with the "mac80211: use IWEVGENIE" and "mac80211: set
enc_capa" patches by Michael Wu. My distro is openSUSE 10.2 on anx86_64system.Please advise on any further information I should provide.
Thanks,
Larry
Re: WPA does not connect to bcm43xx-mac80211 when using NetworkManager
Quoted 8 lines · Dan Williams
Quoted 4 lines · Larry Finger
Dan,
My bcm43xx-mac80211 system generates the following log entries when trying to connect using WPA-PSK TKIP controlled by NetworkManager. The same configuration works with bcm43xx-softmac.
So what you're saying here is that NM works with softmac, but doesn't work with mac80211?
Yes.
Quoted 6 lines
Hmm; any idea why that happens? Can we figure out more about the association process inside the driver? If it works with
wpa_supplicant, can you increase the debugging output ofwpa_supplicantin the NM sources innm-device-802-11-wireless.cinsupplicant_exec()by adding another argument to argv with the value '-ddd'?
What version of NM will work with dbus-glib 0.71? I grabbed the svn archive, found it needed 0.72, and tried to install a newer version. I messed everything up and had to reinstall openSUSE again. I certainly don't want to go through that again!
Larry
Re: WPA does not connect to bcm43xx-mac80211 when using NetworkManager
In reply to Larry FingerQuoted 4 lines · Larry Finger
I'm using Michael Buesch's "mb" tree with the "mac80211: use IWEVGENIE" and "mac80211: set
enc_capa" patches by Michael Wu. My distro is openSUSE 10.2 on anx86_64system.
I had a similar (probably same) issue but it doesn't seem to happen as much now. If you're using the tree from
http://bu3sch.de/gitweb?p=wireless-dev.git;a=summary - that does not contain a number of very useful patches from Jiri's tree which are currently in Linville's wireless-dev. Please try with the patches from Linville's tree.
If it continues to occur, try unloading the module (bcm43xx_mac80211) and loading it again as a workaround. If that works, we most likely are seeing the same issue. I also recommend updating wpa_supplicant (SuSE 10.2 ships with 0.4.9 IIRC, I test with 0.5.7) but that probably doesn't matter much.
-Michael Wu
Johannes Berg
maintainerQuoted 4 lines · Michael Wu
No, this has nothing to do with that. The following patch should address that issue, but my copy of networkmanager already does WPA fine so I can't say for sure whether it will help or not. A quick look through the networkmanager code seems to suggest this will work.
My NM also does WPA but fails (see previous thread), haven't gotten around to debugging it yet. But it definitely tries WPA. Then, however, when I decline to give it a key because I want to use wpa_supplicant manually, it tells me that my card can't do WPA (encryption not supported or something)...
johannes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · dragoran dragoran
are you planning to submit this patches to wireless-dev ? so that distros (ex: fedora 7) can pick it up?
By CCing Jiri and Linville, I already did. Did this patch work for you?
-Michael Wu
A message that is not in the archive (sent off-list or not yet received): [email protected]
ok I tested it again with linvilles f7 test kernel (wireless-git + your patches + iwlwifi).
again nm detect the card as wpa and it finds the wpa enabled network. But it fails to connect (does not even ask for a key). So I tryed to use wpa_supplicant by hand ( with a config that works fine with ipw3945 ; ieee80211) . Its seems not to be related to iwlwifi but to a ioctl that mac80211 does not support (when used with wext).
----
Own MAC address: 00:18:de:05:f7:9ewpa_driver_wext_set_wpawpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
----
notice the *ioctl[SIOCSIWAUTH]: Operation not supported* what is SIOCSIWAUTH and how does it not being supproted affect wpa/wext support?
Quoted 13 lines · dragoran
ok I tested it again with linvilles f7 test kernel (wireless-git + your patches + iwlwifi).
again nm detect the card as wpa and it finds the wpa enabled network. But it fails to connect (does not even ask for a key). So I tryed to usewpa_supplicantby hand ( with a config that works fine with ipw3945 ; ieee80211) . Its seems not to be related to iwlwifi but to a ioctl that mac80211 does not support (when used with wext).
----
Own MAC address: 00:18:de:05:f7:9ewpa_driver_wext_set_wpawpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
Quoted 8 lines
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value0x0-wpa_driver_wext_set_drop_unencryptedioctl[SIOCSIWAUTH]: Operation not supported
----
notice the *ioctl[SIOCSIWAUTH]: Operation not supported* what is SIOCSIWAUTH and how does it not being supproted affect wpa/wext support?
I'm not actually sure these are too much of a problem; some drivers don't support all options and wpa_supplicant should be able to continue without it. Is there any log out put _after_ the pieces you show?
Dan
Quoted 23 lines · Dan Williams
Quoted 13 lines · dragoran
ok I tested it again with linvilles f7 test kernel (wireless-git + your patches + iwlwifi).
again nm detect the card as wpa and it finds the wpa enabled network. But it fails to connect (does not even ask for a key). So I tryed to usewpa_supplicantby hand ( with a config that works fine with ipw3945 ; ieee80211) . Its seems not to be related to iwlwifi but to a ioctl that mac80211 does not support (when used with wext).
----
Own MAC address: 00:18:de:05:f7:9ewpa_driver_wext_set_wpawpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0Quoted 8 lines
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value0x0-wpa_driver_wext_set_drop_unencryptedioctl[SIOCSIWAUTH]: Operation not supported
----
notice the *ioctl[SIOCSIWAUTH]: Operation not supported* what is SIOCSIWAUTH and how does it not being supproted affect wpa/wext support?
Quoted 4 lines
I'm not actually sure these are too much of a problem; some drivers don't support all options and
wpa_supplicantshould be able to continue without it. Is there any log out put _after_ the pieces you show?
yes see the attached file (same config works fine with ipw3945) sorry for the resend but stupid gmail sends html mail wgich the list does not accept
Quoted 4 lines
Dan
wpa_supplicant -dd -c /etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext
Initializing interface 'eth1' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=10 (from group name 'wheel')
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=3):
61 6e 79 anykey_mgmt: 0x4
Line: 9 - start of a new network block
ssid - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
proto: 0x1key_mgmt: 0x2
scan_ssid=1 (0x1)
pairwise: 0x8
group: 0x8
PSK (ASCII passphrase) - hexdump_ascii(len=9): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='any'
id=1 ssid='mynet'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
Own MAC address: 00:18:de:05:f7:9ewpa_driver_wext_set_wpawpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - Setting scan request: 0 sec 100000 usec
Added interface eth1
Wireless event: cmd=0x8b06 len=12
Ignore event for foreign ifindex 3RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' addedRTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b19 len=16
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b19 len=16
Received 398 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:0d:0b:c3:bd:c9 ssid='mynet' wpa_ie_len=24 rsn_ie_len=22 caps=0x11
skip - SSID mismatch
selected based on WPA IE
Trying to associate with 00:0d:0b:c3:bd:c9 (SSID='mynet' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 0c 00
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearingwpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - State: SCANNING -> ASSOCIATINGwpa_driver_wext_associate
ioctl[SIOCSIWMODE]: Device or resource busywpa_driver_wext_associate: assoc failed because set_mode failed
Association request to the driver failed
Setting authentication timeout: 15 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
RSN: Ignored PMKID candidate without preauth flag
Wireless event: cmd=0x8b04 len=16
Wireless event: cmd=0x8b1a len=21
Wireless event: cmd=0x8c02 len=219
Custom wireless event: 'ASSOCINFO(ReqIEs=00056d796e6574010402040b16dd160050f20101000050f20201000050f20201000050f202dd070050f202000100 RespIEs=010882848b960c12182432043048606cdd180050f2020101000003a4000027a4000042435e0062322f00)' Association info eventreq_ies - hexdump(len=46): 00 05 6d 79 6e 65 74 01 04 02 04 0b 16 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 dd 07 00 50 f2 02 00 01 00resp_ies - hexdump(len=42): 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:0d:0b:c3:bd:c9
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0d:0b:c3:bd:c9
No keys have been configured - skip key clearing
Associated with 00:0d:0b:c3:bd:c9
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0d:0b:c3:bd:c9 into blacklist
State: ASSOCIATED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keyswpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Driver did not support SIOCSIWENCODEEXT
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
Wireless event: cmd=0x8c02 len=219
Custom wireless event: 'ASSOCINFO(ReqIEs=00056d796e6574010402040b16dd160050f20101000050f20201000050f20201000050f202dd070050f202000100 RespIEs=010882848b960c12182432043048606cdd180050f2020101000003a4000027a4000042435e0062322f00)' Association info eventreq_ies - hexdump(len=46): 00 05 6d 79 6e 65 74 01 04 02 04 0b 16 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 dd 07 00 50 f2 02 00 01 00resp_ies - hexdump(len=42): 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:0d:0b:c3:bd:c9
State: SCANNING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0d:0b:c3:bd:c9
No keys have been configured - skip key clearing
Associated with 00:0d:0b:c3:bd:c9
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b19 len=16
Received 398 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:0d:0b:c3:bd:c9 ssid='mynet' wpa_ie_len=24 rsn_ie_len=22 caps=0x11
skip - SSID mismatch
selected based on WPA IE
Already associated with the selected AP.
Authentication with 00:0d:0b:c3:bd:c9 timed out.
BSSID 00:0d:0b:c3:bd:c9 blacklist count incremented to 2
State: ASSOCIATED -> DISCONNECTEDwpa_driver_wext_disassociate
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:00:00:00:00:00
BSSID 00:0d:0b:c3:bd:c9 blacklist count incremented to 3
State: SCANNING -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keyswpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Driver did not support SIOCSIWENCODEEXT
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b19 len=16
Received 398 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:0d:0b:c3:bd:c9 ssid='mynet' wpa_ie_len=24 rsn_ie_len=22 caps=0x11
skip - blacklisted
No APs found - clear blacklist and try again
Removed BSSID 00:0d:0b:c3:bd:c9 from blacklist (clear)
Selecting BSS from priority group 0
0: 00:0d:0b:c3:bd:c9 ssid='mynet' wpa_ie_len=24 rsn_ie_len=22 caps=0x11
skip - SSID mismatch
selected based on WPA IE
Trying to associate with 00:0d:0b:c3:bd:c9 (SSID='mynet' freq=2412 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 8 pairwise 8 key_mgmt 2
WPA: set AP WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 02 01 00 00 0f ac 02 01 00 00 0f ac 02 0c 00
WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
No keys have been configured - skip key clearingwpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x1 - State: SCANNING -> ASSOCIATINGwpa_driver_wext_associate
ioctl[SIOCSIWMODE]: Device or resource busywpa_driver_wext_associate: assoc failed because set_mode failed
Association request to the driver failed
Setting authentication timeout: 15 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b04 len=16
Wireless event: cmd=0x8b1a len=21
Wireless event: cmd=0x8c02 len=219
Custom wireless event: 'ASSOCINFO(ReqIEs=00056d796e6574010402040b16dd160050f20101000050f20201000050f20201000050f202dd070050f202000100 RespIEs=010882848b960c12182432043048606cdd180050f2020101000003a4000027a4000042435e0062322f00)' Association info eventreq_ies - hexdump(len=46): 00 05 6d 79 6e 65 74 01 04 02 04 0b 16 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 dd 07 00 50 f2 02 00 01 00resp_ies - hexdump(len=42): 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:0d:0b:c3:bd:c9
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0d:0b:c3:bd:c9
No keys have been configured - skip key clearing
Associated with 00:0d:0b:c3:bd:c9
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:00:00:00:00:00
Setting scan request: 0 sec 100000 usec
Added BSSID 00:0d:0b:c3:bd:c9 into blacklist
State: ASSOCIATED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keyswpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Driver did not support SIOCSIWENCODEEXT
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=5):
6d 79 6e 65 74 mynet
Wireless event: cmd=0x8c02 len=219
Custom wireless event: 'ASSOCINFO(ReqIEs=00056d796e6574010402040b16dd160050f20101000050f20201000050f20201000050f202dd070050f202000100 RespIEs=010882848b960c12182432043048606cdd180050f2020101000003a4000027a4000042435e0062322f00)' Association info eventreq_ies - hexdump(len=46): 00 05 6d 79 6e 65 74 01 04 02 04 0b 16 dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02 dd 07 00 50 f2 02 00 01 00resp_ies - hexdump(len=42): 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c dd 18 00 50 f2 02 01 01 00 00 03 a4 00 00 27 a4 00 00 42 43 5e 00 62 32 2f 00
WPA: set own WPA/RSN IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 00 50 f2 02
Wireless event: cmd=0x8b15 len=24
Wireless event: new AP: 00:0d:0b:c3:bd:c9
State: SCANNING -> ASSOCIATED
Associated to a new BSS: BSSID=00:0d:0b:c3:bd:c9
No keys have been configured - skip key clearing
Associated with 00:0d:0b:c3:bd:c9
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: SUPP_BE entering state IDLE
Setting authentication timeout: 10 sec 0 usec
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
Scan results: -1
Failed to get scan results
Failed to get scan results - try scanning again
Setting scan request: 1 sec 0 usec
EAPOL: startWhen --> 0
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
Starting AP scan (broadcast SSID)
Wireless event: cmd=0x8b19 len=16
Received 398 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
0: 00:0d:0b:c3:bd:c9 ssid='mynet' wpa_ie_len=24 rsn_ie_len=22 caps=0x11
skip - SSID mismatch
selected based on WPA IE
Already associated with the selected AP.
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth1
State: ASSOCIATED -> DISCONNECTEDwpa_driver_wext_deauthenticate
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0wpa_driver_wext_set_wpawpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 5 value 0x0 - wpa_driver_wext_set_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - No keys have been configured - skip key clearing
Removed BSSID 00:0d:0b:c3:bd:c9 from blacklist (clear)
Cancelling scan request
Quoted 5 lines · dragoran
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value0x0-wpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWAUTH]: Operation not supported
----
notice the *ioctl[SIOCSIWAUTH]: Operation not supported* what is SIOCSIWAUTH and how does it not being supproted affect wpa/wext support?
I agree with Dan Williams that this message is not critical. Michael Buesch uses WPA with mac80211, and his version doesn't support SIOCSIWAUTH either.
I'm beginning to think that there is a problem with certain AP's. What is the make and model of yours? What firmware version is it using? I cannot connect to my Linksys WRT54G V5 with or without WPA enabled. I'm running v1.02.00 of the firmware (the latest).
Larry
Quoted 12 lines · Larry Finger
Quoted 6 lines · dragoran
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value0x0-wpa_driver_wext_set_drop_unencryptedioctl[SIOCSIWAUTH]: Operation not supported
----
notice the *ioctl[SIOCSIWAUTH]: Operation not supported* what is SIOCSIWAUTH and how does it not being supproted affect wpa/wext support?I agree with Dan Williams that this message is not critical. Michael Buesch uses WPA with mac80211,
and his version doesn't support SIOCSIWAUTH either.
Quoted 6 lines
I'm beginning to think that there is a problem with certain AP's. What is the make and model of
yours? What firmware version is it using? I cannot connect to my Linksys WRT54G V5 with or without
WPA enabled. I'm running v1.02.00 of the firmware (the latest).
its a rt2500usb device used with hostapd (on FC6 x86_64)
Quoted 2 lines
Larry
Quoted 11 lines · Michael Wu
Quoted 10 lines · Dan Williams
Quoted 6 lines · Johannes Berg
Quoted 3 lines · dragoran
Hello
While testing the iwlwifi driver I noticed that the mac80211 does provide a wext interface but does not support wpa with it.You must have done something wrong, it works well.
Nope! This time it's really mac80211 :)
Quoted 7 lines
Quoted 4 lines
Take a look at
ieee80211_sta_scan_result()inmac80211/ieee80211_sta.c. Note that it returns custom events for the WPA & RSN IEs. That's just wrong. We should be using already-defined events.What does that have to do with WPA not working?
wpa_supplicantworks fine with the custom events on my system. Also works fine with the standard events which the following patch makes mac80211 use.
wpa_supplicant works fine with it because it parses the custom events.
NetworkManager will not parse custom events by design, in the same way that it will not allow WPA to be used on a card unless the driver explicitly advertises WPA support, and requires the use of the wpa_supplicant WEXT driver. I'm not going to spend my time implementing stuff 3 different ways; we need to standardize this stuff and stick with it.
Draw a line in the sand and all that. Sure, it's made some people's lives harder, but NetworkManager was the reason madwifi added WE-19 support, for example.
Patch looks good though; thanks! One thing I just thought of, which no drivers probably do. Should mac80211 check that there's enough space left in the WE stream to actually add the IE? There are usually checks to ensure that there's enough space to add the next whole BSS, but I don't know if we do checks to during the addition of each BSS. Maybe I'm wrong and this isn't an issue.
Dan
Quoted 68 lines
--
mac80211: use IWEVGENIE
From: Michael Wu <[email protected]>
Use IWEVGENIE which was defined in WE-18.
Signed-off-by Michael Wu <[email protected]>---
net/mac80211/ieee80211_sta.c | 40 ++++++++++------------------------------ 1 files changed, 10 insertions(+), 30 deletions(-)net/mac80211/ieee80211_sta.c +10
-30@@ -2839,39 +2839,19 @@ ieee80211_sta_scan_result(struct net_device *dev, current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe,"" );if (bss && bss->wpa_ie) { -char *buf, *p; -int i; - buf =kmalloc (30 + bss->wpa_ie_len *2 ,GFP_ATOMIC ); -if (buf) { - p = buf; - p +=sprintf (p,"wpa_ie=" ); -for (i =0 ; i < bss->wpa_ie_len; i++) - p+=sprintf (p,"%02x" , bss->wpa_ie[i]); -memset (&iwe,0 ,sizeof (iwe)); - iwe.cmd =IWEVCUSTOM ; - iwe.u.data.length =strlen (buf); - current_ev =iwe_stream_add_point (current_ev, end_buf, - &iwe, buf); -kfree (buf); - } +memset (&iwe,0 ,sizeof (iwe)); + iwe.cmd =IWEVGENIE ; + iwe.u.data.length = bss->wpa_ie_len; + current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe, + bss->wpa_ie); }if (bss && bss->rsn_ie) { -char *buf, *p; -int i; - buf =kmalloc (30 + bss->rsn_ie_len *2 ,GFP_ATOMIC ); -if (buf) { - p = buf; - p +=sprintf (p,"rsn_ie=" ); -for (i =0 ; i < bss->rsn_ie_len; i++) - p+=sprintf (p,"%02x" , bss->rsn_ie[i]); -memset (&iwe,0 ,sizeof (iwe)); - iwe.cmd =IWEVCUSTOM ; - iwe.u.data.length =strlen (buf); - current_ev =iwe_stream_add_point (current_ev, end_buf, - &iwe, buf); -kfree (buf); - } +memset (&iwe,0 ,sizeof (iwe)); + iwe.cmd =IWEVGENIE ; + iwe.u.data.length = bss->rsn_ie_len; + current_ev =iwe_stream_add_point (current_ev, end_buf, &iwe, + bss->rsn_ie); }if (bss) {
Quoted 9 lines · Dan Williams
wpa_supplicantworks fine with it because it parses the custom events.NetworkManager will not parse custom events by design, in the same way that it will not allow WPA to be used on a card unless the driver explicitly advertises WPA support, and requires the use of the
wpa_supplicantWEXT driver. I'm not going to spend my time implementing stuff 3 different ways; we need to standardize this stuff and stick with it.
Quoted 4 lines
Draw a line in the sand and all that. Sure, it's made some people's lives harder, but NetworkManager was the reason madwifi added WE-19 support, for example.
NetworkManager doesn't parse custom events? I'm pretty sure WPA/WPA2 was reported correctly in the scan results before.. maybe because of this little bit of code?
NetworkManager-0.6.4/src/nm-device-802-11-wireless.c:
case IWEVCUSTOM:
clen = iwe->u.data.length;
if (custom + clen > end)
break;
if (clen > 7 && ((strncmp (custom, "wpa_ie=", 7) == 0) || (strncmp (custom, "rsn_ie=", 7) == 0)))
...
But that's besides the point. It is true that proper events should be used, but that issue has nothing to do with why WPA isn't working with NetworkManager. That was my point.
Quoted 7 lines
Patch looks good though; thanks! One thing I just thought of, which no drivers probably do. Should mac80211 check that there's enough space left in the WE stream to actually add the IE? There are usually checks to ensure that there's enough space to add the next whole BSS, but I don't know if we do checks to during the addition of each BSS. Maybe I'm wrong and this isn't an issue.
iwe_stream_add_point(char * stream, /* Stream of events */
char * ends, /* End of stream */
struct iw_event *iwe, /* Payload length + flags */
char * extra) /* More payload */
{
int event_len = IW_EV_POINT_LEN + iwe->u.data.length;
/* Check if it's possible */
if(likely((stream + event_len) < ends)) {-Michael Wu
Quoted 24 lines · Michael Wu
Quoted 9 lines · Dan Williams
wpa_supplicantworks fine with it because it parses the custom events.NetworkManager will not parse custom events by design, in the same way that it will not allow WPA to be used on a card unless the driver explicitly advertises WPA support, and requires the use of the
wpa_supplicantWEXT driver. I'm not going to spend my time implementing stuff 3 different ways; we need to standardize this stuff and stick with it.Quoted 4 lines
Draw a line in the sand and all that. Sure, it's made some people's lives harder, but NetworkManager was the reason madwifi added WE-19 support, for example.
NetworkManager doesn't parse custom events? I'm pretty sure WPA/WPA2 was reported correctly in the scan results before.. maybe because of this little bit of code?
NetworkManager-0.6.4/src/nm-device-802-11-wireless.c:
case IWEVCUSTOM:clen = iwe->u.data.length; if (custom + clen > end) break; if (clen > 7 && ((strncmp (custom, "wpa_ie=", 7) == 0) || (strncmp
Quoted 6 lines
(custom, "rsn_ie=", 7) == 0)))
...But that's besides the point. It is true that proper events should be used, but that issue has nothing to do with why WPA isn't working with NetworkManager. That was my point.
Huh; right. My bad :) What's probably going on here then is that since the driver wasn't reporting WPA capability via enc_capa, the applet wont' show WPA as an option, and NM won't allow you to connect to WPA-enabled access points.
In any case, with 0.7 all the scanning code is ripped out in favor of using the D-Bus interface to wpa_supplicant, so this goes away and its wpa_supplicant's problem and not mine.
Dan
Quoted 17 lines
Quoted 7 lines
Patch looks good though; thanks! One thing I just thought of, which no drivers probably do. Should mac80211 check that there's enough space left in the WE stream to actually add the IE? There are usually checks to ensure that there's enough space to add the next whole BSS, but I don't know if we do checks to during the addition of each BSS. Maybe I'm wrong and this isn't an issue.
iwe_stream_add_point(char * stream, /* Stream of events */ char * ends, /* End of stream */ struct iw_event *iwe, /* Payload length + flags */ char * extra) /* More payload */ { int event_len = IW_EV_POINT_LEN + iwe->u.data.length; /* Check if it's possible */ if(likely((stream + event_len) < ends)) {-Michael Wu