Bug 1024 - Cannot connect to non-WPA AP after WPA connection and v.v.
: Cannot connect to non-WPA AP after WPA connection and v.v.
Status: RESOLVED TO_BE_DOCUMENTED
: IPW3945
BSS
: 1.0.3
: All All
: P1 normal
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2006-04-21 07:59 by
Modified: 2006-07-12 01:12 (History)


Attachments
Log of successful assocation to open AP (62.57 KB, text/plain)
2006-05-18 02:51, Joachim Gleißner
Details
Log of successful assocation to WPA-PSK AP (173.59 KB, text/plain)
2006-05-18 02:52, Joachim Gleißner
Details
Log of failed association to open AP after WPA connection (206.75 KB, text/plain)
2006-05-18 02:54, Joachim Gleißner
Details
Log of failed association to WPA-PSK AP after unencrypted connection (140.79 KB, text/plain)
2006-05-18 02:58, Joachim Gleißner
Details
Dump auth and assoc request frames (1.16 KB, patch)
2006-05-18 09:07, James Ketrenos
Details | Diff
Dumped frames of successful association (2.21 KB, text/plain)
2006-05-19 01:54, Joachim Gleißner
Details
Dumped frames of failed association (1.59 KB, text/plain)
2006-05-19 01:57, Joachim Gleißner
Details
patch to try (544 bytes, patch)
2006-05-19 02:41, Liu, Hong
Details | Diff
Debug messages of success association (396.84 KB, text/plain)
2006-06-14 03:49, Joachim Gleißner
Details
Debug messages of failed association after WEP connection (204.42 KB, text/plain)
2006-06-14 03:50, Joachim Gleißner
Details
debug patch (1.14 KB, patch)
2006-06-19 22:43, Liu, Hong
Details | Diff
Debug messages with patch (attachement 831) applied (164.59 KB, text/plain)
2006-06-20 00:52, Joachim Gleißner
Details
patch to try (636 bytes, patch)
2006-06-20 02:20, Liu, Hong
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-04-21 07:59:04
After a successful WPA-PSK connection I cannot connect to a non-WPA AP anymore 
without reloading the driver. I get the following error message in the log:

Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_associate_network Association 
attempt [BSS]: 'open', channel 6, 802.11g [12], short[:short], enc=off.
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_associate_network Beacon interval 
for the network is 100
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_queue_tx_hcmd Sending command 
DAEMON (#10), seq: 0x046D, 48 bytes* at 109[13]:4
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_send_rx_config Returned from 
ipw_send_daemon_cmd.
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_add_station Adding STA ID 0: 
00:0b:86:c2:28:00
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_queue_tx_hcmd Sending command 
ADD_STA (#18), seq: 0x046E, 68 bytes at 110[14]:4
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_send_add_station REPLY_ADD_STA 
PASSED
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_queue_tx_hcmd Sending command 
RATE_SCALE (#47), seq: 0x046F, 56 bytes at 111[15]:4
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_queue_tx_hcmd Sending command 
RATE_SCALE (#47), seq: 0x0470, 56 bytes at 112[16]:4
Apr 21 16:04:04 f24 kernel: ipw3945: U ipw_associate_network associating: 
'open' 00:0b:86:c2:28:00
Apr 21 16:04:04 f24 kernel: ipw3945: I ipw_handle_auth auth frame algorithm 0  
transaction 2  status 0
Apr 21 16:04:04 f24 kernel: ipw3945: I ipw_handle_assoc_response association 
failed: 'open' 00:0b:86:c2:28:00 Reason: Cannot support all requested 
capabilities in the Capability information field (10)

After reloading the driver I can connect to 'open' without problems, but then 
not to my WPA-PSK AP again. I used wpa_supplicant 0.4.8 with ap_scan=1 for 
both connections.
------- Comment #1 From 2006-04-21 14:38:10 -------
Bump to P1.
------- Comment #2 From 2006-04-26 02:38:58 -------
Test environment:
ipw3945-1.0.2, ieee-1.1.13,ucode-1.13,deamon-1.7.18,kernel-2.6.15.3,
AP-asus(WPA),Linksys(open mode)
I can't reproduce this bug in my environment. 
My steps:
%load the driver
%associate to WPA-PSK ap 
%ping  --> verify all the packets received.
%disconnect with WPA-PSK AP
%associate to no-WPA ap(linksys)
%iwconfig -->verify associated with linksys
I can associate DUT with AP without reloading the driver &V.V . 
------- Comment #3 From 2006-04-27 11:23:59 -------
I also encounter the problem when using ipw3945-1.0.2 and ieee-1.1.13. I'm 
using kernel 2.6.16. What wpa_supplicant version did you use?
------- Comment #4 From 2006-05-09 02:01:18 -------
I tested on ipw3945-1.0.3 and still can't reproduce this problem.
My wpa_supplicant is 0.4.6 . 
------- Comment #5 From 2006-05-09 02:09:08 -------
Hi Joachim,
Would you please apply the following the patch and attach the debug log?

And what are the configs of your non-WPA and WPA APs, i.e., 11b/11g, channel,
short preamble/long preamble ...?

diff -urp ipw3945-1.0.3/ipw3945.c ipw3945-1.0.3-assoc/ipw3945.c
--- ipw3945-1.0.3/ipw3945.c     2006-05-03 08:28:38.000000000 +0800
+++ ipw3945-1.0.3-assoc/ipw3945.c       2006-05-09 16:56:24.000000000 +0800
@@ -3718,6 +3718,9 @@ static int ipw_fill_association_req(stru
        if (priv->config & CFG_PREAMBLE_LONG)
                frame->capability &= ~WLAN_CAPABILITY_SHORT_PREAMBLE;
                                                                                    
+       printk("assoc request capability: 0x%x\n", priv->assoc_request.capability);
+       printk("frame capability: 0x%x\n", frame->capability);
+
        frame->listen_interval = 10;
                                                                                    
        info_element = frame->info_element;
------- Comment #6 From 2006-05-09 02:51:56 -------
May  9 11:30:20 linux kernel: ipw3945: U ipw_associate_network associating: 
'onenet' 00:0b:86:c2:11:e0
May  9 11:30:20 linux kernel: ipw3945: I ipw_handle_auth auth frame algorithm 0  
transaction 2  status 0
May  9 11:30:20 linux kernel: assoc request capability: 0x21
May  9 11:30:20 linux kernel: frame capability: 0x21
May  9 11:30:20 linux kernel: ipw3945: I ipw_handle_assoc_response association 
failed: 'onenet' 00:0b:86:c2:11:e0 Reason: Cannot support all requested 
capabilities in the Capability information field (10)
------- Comment #7 From 2006-05-09 19:21:04 -------
Sorry for not making it clear. Would you please attach the log for the 
following cases:
1. wpa -> non-wpa (both the logs for the successful association when first 
                   using WPA, and the failed case when changing to non-WPA)
2. non-wpa -> wpa

3. successful association to the open AP after loading the driver

Thanks,
Hong
------- Comment #8 From 2006-05-18 02:51:40 -------
Created an attachment (id=806) [details]
Log of successful assocation to open AP
------- Comment #9 From 2006-05-18 02:52:55 -------
Created an attachment (id=807) [details]
Log of successful assocation to WPA-PSK AP
------- Comment #10 From 2006-05-18 02:54:17 -------
Created an attachment (id=808) [details]
Log of failed association to open AP after WPA connection
------- Comment #11 From 2006-05-18 02:58:10 -------
Created an attachment (id=809) [details]
Log of failed association to WPA-PSK AP after unencrypted connection

In that case wpa_supplicant does not find the access point in the scan results
(at least, it does not select it), so there is no association all.
------- Comment #12 From 2006-05-18 09:07:25 -------
Created an attachment (id=810) [details]
Dump auth and assoc request frames

Can you apply the attached patch and capture the debug logs during the
successful association to the open network, and then the unsuccessful
association to the open network after you have associated to the WPA-PSK AP.

The patch will dump the auth frame received from the AP and the association
request frame being sent to the AP.

Thanks,
James
------- Comment #13 From 2006-05-19 01:54:19 -------
Created an attachment (id=811) [details]
Dumped frames of successful association
------- Comment #14 From 2006-05-19 01:57:27 -------
Created an attachment (id=812) [details]
Dumped frames of failed association

In case that's important: The access point is an Aruba Networks AP70,
controlled by an Aruba Networks Mobility Controller 2400.
------- Comment #15 From 2006-05-19 02:41:01 -------
Created an attachment (id=813) [details]
patch to try
------- Comment #16 From 2006-05-19 02:43:30 -------
change bug status
------- Comment #17 From 2006-05-19 02:54:30 -------
The patches fixes the problem here. Thanks!
------- Comment #18 From 2006-06-14 03:41:16 -------
Sorry, but I have to reopen this bug. The patch fixes only association after 
WPA has been used, but using WPA after a WEP connection still does not work. It 
seems CAP_PRIVACY_ON flag is not set in that case. I'll attach the logs.
------- Comment #19 From 2006-06-14 03:49:19 -------
Created an attachment (id=826) [details]
Debug messages of success association
------- Comment #20 From 2006-06-14 03:50:55 -------
Created an attachment (id=827) [details]
Debug messages of failed association after WEP connection
------- Comment #21 From 2006-06-19 03:46:36 -------
FYI: It works when enabling the disabled code at line 15400 ff in 
shim__set_security().
------- Comment #22 From 2006-06-19 06:13:30 -------
Ok, it nearly works. It does not work when using wpa_supplicant with ap_scan=1. 
The log shows the driver still being locked to the old SSID and therefore does 
not return the right SSID (I used a hidden one) in the scan results. I've added 
"priv->config &= ~CFG_STATIC_ESSID;" to ipw_disassociate(), which fixes the 
problem for me. I don't know whether it's a sane way, though.
------- Comment #23 From 2006-06-19 22:43:42 -------
Created an attachment (id=831) [details]
debug patch
------- Comment #24 From 2006-06-19 22:46:12 -------
(In reply to comment #22)
> I've added 
> "priv->config &= ~CFG_STATIC_ESSID;" to ipw_disassociate(), which fixes the 
> problem for me. I don't know whether it's a sane way, though.

This may leaves the roaming functionality not working.

From the debug log, we are suspecting that other processes are modifying the
secrutiy option of the driver cocurrently with the second wpa_supplicant which
are trying to operating with the wpa-psk-hidden network.

would you please:
1. manually test the case (not using the ifup ifdown scripts) to see if the 
   problem exists?

2. apply the debug patch and provide the log
------- Comment #25 From 2006-06-20 00:50:34 -------
This indeed breaks roaming. I've repeated the test without using ifup, I just 
ran 'iwconfig eth1 essid onenet' and called wpa_supplicant configured for SSID 
'wpa-psk-hidden' directly afterwards. The log looks equal to me, but I will 
attach it, of course.
------- Comment #26 From 2006-06-20 00:52:00 -------
Created an attachment (id=832) [details]
Debug messages with patch (attachement 831) applied
------- Comment #27 From 2006-06-20 01:22:46 -------
Sorry, I accidentally used SSID 'psk-hidden' while generating the log, correct 
would have been 'wpa-psk-hidden'. I have re-tested it with wpa-psk-hidden, but 
the log messages did not change (AP still does not show up in the scan 
results). I can attach the log anyway, if you wish.
------- Comment #28 From 2006-06-20 02:20:28 -------
Created an attachment (id=833) [details]
patch to try
------- Comment #29 From 2006-06-20 02:21:42 -------
(In reply to comment #25)

> ran 'iwconfig eth1 essid onenet' and called wpa_supplicant configured for 
> SSID 
> 'wpa-psk-hidden' directly afterwards. The log looks equal to me, but I will 
> attach it, of course.

This is another problem. This problem is caused by scanning while associated.
You are associated with "onenet" when starting wpa_supplicant trying to 
associate with another network. The driver can't find the network when 
performing scan while associated.

Please apply the patch (id=833) and use "iwconfig eth1 essid off" before 
starting wpa_supplicant.

Thanks,
Hong
------- Comment #30 From 2006-06-20 03:48:29 -------
When calling "iwconfig eth1 essid off" before running wpa_supplicant, it even 
works without the patch. Is there any reason why direct scanning shall not work 
when associated?
------- Comment #31 From 2006-07-12 01:12:46 -------
(In reply to comment #30)
> When calling "iwconfig eth1 essid off" before running wpa_supplicant, it even 
> works without the patch. Is there any reason why direct scanning shall not work 
> when associated?

When associated, you can't leave the associated channel too long or you will
lose beacons/data. So when scanning while associated, the dwell time on the
being scanned channel may be not enough.

I think for this problem, document it should be enough:
"iwconfig essid off" before you attempt to associate with another AP while
associated.