raghunathan.kailasanathan | 22 Feb 2011 05:59

AR9271 ath9k_htc + wpa_supplicant : authentication timeout

Hi all,
I have PowerPC big-endian host with ath9k_htc (Atheros AR9271) USB dongle and 
am using wpa_supplicant/nl08211 to connect to a non-secure AP. The wpa_supplicant
keeps reporting "SME: Authentication timed out". Please find logs below.

Using wpa_cli to increase the authentication timeout did not help. Using -Dwext 
gives the same result and using just iwconfig I am not able to associate with the AP.

At the same time I also see the following output from dmesg - 
[  457.374112] wlan0: direct probe to ef8bf5e8 (try 1) 
[  457.572779] wlan0: direct probe to ef8bf5e8 (try 2) 
[  458.072669] wlan0: direct probe to ef8bf5e8 (try 3) 
[  458.272676] wlan0: direct probe to ef8bf5e8 timed out

...which is probably from the kernel compat-wireless package I am using (btw, I am using
compat-wireless-2.6.35-1)

Any pointers on what's going wrong ?

Regards
Raghu

wpa_supplicant logs
--------------------

Initializing interface 'wlan0' conf './wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A'
bridge 'N/A'
Configuration file './wpa_supplicant.conf' -> '/raghu/wpa/./wpa_supplicant.conf'
Reading configuration file '/raghu/wpa/./wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
(Continue reading)

Mohammed Shafi | 22 Feb 2011 06:50
Picon

Re: AR9271 ath9k_htc + wpa_supplicant : authentication timeout

On Tue, Feb 22, 2011 at 10:29 AM,  <raghunathan.kailasanathan <at> wipro.com> wrote:
> Hi all,
> I have PowerPC big-endian host with ath9k_htc (Atheros AR9271) USB dongle and
> am using wpa_supplicant/nl08211 to connect to a non-secure AP. The wpa_supplicant
> keeps reporting "SME: Authentication timed out". Please find logs below.
>
> Using wpa_cli to increase the authentication timeout did not help. Using -Dwext
> gives the same result and using just iwconfig I am not able to associate with the AP.

Hi ,are you sure the AP is unsecured ?
Please make sure you had killed network-manager and wpa-supplicant
previously available

>
> At the same time I also see the following output from dmesg -
> [  457.374112] wlan0: direct probe to ef8bf5e8 (try 1)
> [  457.572779] wlan0: direct probe to ef8bf5e8 (try 2)
> [  458.072669] wlan0: direct probe to ef8bf5e8 (try 3)
> [  458.272676] wlan0: direct probe to ef8bf5e8 timed out
>
> ...which is probably from the kernel compat-wireless package I am using (btw, I am using
> compat-wireless-2.6.35-1)

Please use the latest compat wireless and firmware

>
> Any pointers on what's going wrong ?
>
> Regards
> Raghu
(Continue reading)

raghunathan.kailasanathan | 22 Feb 2011 07:16

Re: AR9271 ath9k_htc + wpa_supplicant : authentication timeout

> 
> Hi ,are you sure the AP is unsecured ?
> Please make sure you had killed network-manager and wpa-supplicant
> previously available
> 

For sure, AP is unsecured ... and there is no network-manager 
or supplicant already running. As mentioned I am running this on 
a big-endian PowerPC processor based board

> >
> > At the same time I also see the following output from dmesg -
> > [  457.374112] wlan0: direct probe to ef8bf5e8 (try 1)
> > [  457.572779] wlan0: direct probe to ef8bf5e8 (try 2)
> > [  458.072669] wlan0: direct probe to ef8bf5e8 (try 3)
> > [  458.272676] wlan0: direct probe to ef8bf5e8 timed out
> >
> > ...which is probably from the kernel compat-wireless package I am
> using (btw, I am using
> > compat-wireless-2.6.35-1)
> 
> Please use the latest compat wireless and firmware

I could try that but does this version have any obvious/known issues
making unsecured connection ?

I am particularly interested in the endian-ness related fixes. Any
endian related compilation switches in compat-wireless I need to 
look out for ?

(Continue reading)

Mohammed Shafi | 22 Feb 2011 07:47
Picon

Re: AR9271 ath9k_htc + wpa_supplicant : authentication timeout

On Tue, Feb 22, 2011 at 11:46 AM,  <raghunathan.kailasanathan <at> wipro.com> wrote:
>>
>> Hi ,are you sure the AP is unsecured ?
>> Please make sure you had killed network-manager and wpa-supplicant
>> previously available
>>
>
> For sure, AP is unsecured ... and there is no network-manager
> or supplicant already running. As mentioned I am running this on
> a big-endian PowerPC processor based board
>
>> >
>> > At the same time I also see the following output from dmesg -
>> > [  457.374112] wlan0: direct probe to ef8bf5e8 (try 1)
>> > [  457.572779] wlan0: direct probe to ef8bf5e8 (try 2)
>> > [  458.072669] wlan0: direct probe to ef8bf5e8 (try 3)
>> > [  458.272676] wlan0: direct probe to ef8bf5e8 timed out
>> >
>> > ...which is probably from the kernel compat-wireless package I am
>> using (btw, I am using
>> > compat-wireless-2.6.35-1)
>>
>> Please use the latest compat wireless and firmware
>
> I could try that but does this version have any obvious/known issues
> making unsecured connection ?

no.

>
(Continue reading)

Mohammed Shafi | 22 Feb 2011 07:53
Picon

Re: AR9271 ath9k_htc + wpa_supplicant : authentication timeout

On Tue, Feb 22, 2011 at 11:46 AM,  <raghunathan.kailasanathan <at> wipro.com> wrote:
>>
>> Hi ,are you sure the AP is unsecured ?
>> Please make sure you had killed network-manager and wpa-supplicant
>> previously available
>>
>
> For sure, AP is unsecured ... and there is no network-manager
> or supplicant already running. As mentioned I am running this on
> a big-endian PowerPC processor based board
>
>> >
>> > At the same time I also see the following output from dmesg -
>> > [  457.374112] wlan0: direct probe to ef8bf5e8 (try 1)
>> > [  457.572779] wlan0: direct probe to ef8bf5e8 (try 2)
>> > [  458.072669] wlan0: direct probe to ef8bf5e8 (try 3)
>> > [  458.272676] wlan0: direct probe to ef8bf5e8 timed out
>> >
>> > ...which is probably from the kernel compat-wireless package I am
>> using (btw, I am using
>> > compat-wireless-2.6.35-1)
>>
>> Please use the latest compat wireless and firmware
>
> I could try that but does this version have any obvious/known issues
> making unsecured connection ?
>
> I am particularly interested in the endian-ness related fixes. Any
> endian related compilation switches in compat-wireless I need to
> look out for ?
(Continue reading)

raghunathan.kailasanathan | 23 Feb 2011 08:33

powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

Changed subject line to reflect issue

> 
> Please search for the thread "ath9k_htc vs. powerpc (was Re: working
> usb wifi card, that is still possible to buy)" in ath9k developement
> mailing list
> 

That thread did not end up conclusively on the issue (and I see the same
issues that are discussed on that thread). I moved to the latest stable 
compat-wireless-2.6.38-rc4-1. Also enabled couple of endian flags that 
I could see there (__BIG_ENDIAN and __BIG_ENDIAN_BITFIELD). But that didn't
improve anything and I still see the same issues as mentioned in the original mail (authentication
timeout with non-secure AP)

Any more driver patches available to fix endian fields ?

--Raghu

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for
the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any
attachments for the presence of viruses. The company accepts no liability for any damage caused by any
virus transmitted by this email. 

(Continue reading)

Sujith | 23 Feb 2011 11:44
Picon

powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

raghunathan.kailasanathan <at> wipro.com wrote:
> Changed subject line to reflect issue
> 
> > 
> > Please search for the thread "ath9k_htc vs. powerpc (was Re: working
> > usb wifi card, that is still possible to buy)" in ath9k developement
> > mailing list
> > 
> 
> That thread did not end up conclusively on the issue (and I see the same
> issues that are discussed on that thread). I moved to the latest stable 
> compat-wireless-2.6.38-rc4-1. Also enabled couple of endian flags that 
> I could see there (__BIG_ENDIAN and __BIG_ENDIAN_BITFIELD). But that didn't
> improve anything and I still see the same issues as mentioned in the original mail (authentication
> timeout with non-secure AP)

Well, this is not an issue with wpa_supplicant, ath9k_htc hasn't been tested on
a BE system.

Can you check if you are able to receive frames in monitor mode ?
If monitor mode works, then transmission is probably broken. You can use
an external sniffer to check if frames are atleast sent out.

And, what board are you using ?

Sujith
raghunathan.kailasanathan | 24 Feb 2011 15:18

Re: powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

> 
> Can you check if you are able to receive frames in monitor mode ?
> If monitor mode works, then transmission is probably broken. You can
> use
> an external sniffer to check if frames are atleast sent out.
> 

I setup the USB dongle on board in monitor mode on channel 6 and 
ran tcpdump ...which dumped numerous probe request frames..so rx path is
probably fine. Then I set an external sniffer (again on ch6) but this 
sniffer could not catch any frame from my board 

> And, what board are you using ?
PowerPC based custom board

--Raghu

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for
the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any
attachments for the presence of viruses. The company accepts no liability for any damage caused by any
virus transmitted by this email. 

www.wipro.com
(Continue reading)

Sujith | 25 Feb 2011 04:35
Picon

Re: powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

raghunathan.kailasanathan <at> wipro.com wrote:
> >
> > Can you check if you are able to receive frames in monitor mode ?
> > If monitor mode works, then transmission is probably broken. You can
> > use
> > an external sniffer to check if frames are atleast sent out.
> >
> 
> I setup the USB dongle on board in monitor mode on channel 6 and
> ran tcpdump ...which dumped numerous probe request frames..so rx path is
> probably fine. Then I set an external sniffer (again on ch6) but this
> sniffer could not catch any frame from my board

Can you try this patch ? This the only place that appears to be buggy in the
TX path. And since the endian conversion wil translate into a no-op in a LE
system, it will make no difference there.

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 7dc2048..702b9bc 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
 <at>  <at>  -249,8 +249,8  <at>  <at>  static int __hif_usb_tx(struct hif_device_usb *hif_dev)
 		buf = tx_buf->buf;
 		buf += tx_buf->offset;
 		hdr = (u16 *)buf;
-		*hdr++ = nskb->len;
-		*hdr++ = ATH_USB_TX_STREAM_MODE_TAG;
+		*hdr++ = cpu_to_le16(nskb->len);
+		*hdr++ = cpu_to_le16(ATH_USB_TX_STREAM_MODE_TAG);
 		buf += 4;
(Continue reading)

raghunathan.kailasanathan | 25 Feb 2011 10:26

Re: powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

> Can you try this patch ? This the only place that appears to be buggy
> in the
> TX path. And since the endian conversion wil translate into a no-op in
> a LE
> system, it will make no difference there.
> 

Bingo ! I am able to connect to unsecure AP with this patch. Will test 
Other cases and get back with results. Thanks.

I see a harmless kernel crash at the beginning when I run 
the supplicant or 'iwlist scan' for the first time after modules 
are inserted. But apparently this crash does not seem to have any
untoward affect. Here is a snapshot -

[  453.602667] ------------[ cut here ]------------
[  453.602678] Badness at f393620c [verbose debug info unavailable]
[  453.602810] NIP: f393620c LR: f31d5534 CTR: c0341b70
[  453.608020] REGS: ef053dd0 TRAP: 0700   Not tainted  (2.6.27)
[  453.614012] MSR: 00029000 <EE,ME>  CR: 28022082  XER: 00000000
[  453.620090] TASK = ef04a5b0[9] 'sirq-tasklet/0' THREAD: ef052000
[  453.626342] GPR00: 00000001 ef053e80 ef04a5b0 eeaea360 ef8f0500 00000018 ef871bcc 0000001b
[  453.634939] GPR08: 00000000 f3950000 eeaeae0c 00000000 28022082 7e2f4df2 7ffd1200 7fff0000
[  453.643536] GPR16: 00000000 00000000 c045c7e8 c0460000 00008000 00000000 eeba8004 eeaea360
[  453.652133] GPR24: 00000000 ef053f00 00000000 eeaeadfc eeaea360 ef871ba0 ef8f0524 ef8f0500
[  453.660730] NIP [f393620c] mac80211_ieee80211_rx+0xab8/0xaf8 [mac80211]
[  453.667590] LR [f31d5534] ath9k_rx_tasklet+0x14c/0x560 [ath9k_htc]
[  453.674016] Call Trace:
[  453.676708] [ef053e80] [c00383a4] __wake_up+0x44/0x58 (unreliable)
[  453.683134] [ef053ef0] [f31d5534] ath9k_rx_tasklet+0x14c/0x560 [ath9k_htc]
(Continue reading)

Sujith | 25 Feb 2011 18:51
Picon

Re: powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

raghunathan.kailasanathan <at> wipro.com wrote:
> > Can you try this patch ? This the only place that appears to be buggy
> > in the
> > TX path. And since the endian conversion wil translate into a no-op in
> > a LE
> > system, it will make no difference there.
> >
> 
> Bingo ! I am able to connect to unsecure AP with this patch. Will test
> Other cases and get back with results. Thanks.

Ok, I'll push a patch to wireless-testing.

> I see a harmless kernel crash at the beginning when I run
> the supplicant or 'iwlist scan' for the first time after modules
> are inserted. But apparently this crash does not seem to have any
> untoward affect. Here is a snapshot -
> 
> [  453.602667] ------------[ cut here ]------------
> [  453.602678] Badness at f393620c [verbose debug info unavailable]
> [  453.602810] NIP: f393620c LR: f31d5534 CTR: c0341b70
> [  453.608020] REGS: ef053dd0 TRAP: 0700   Not tainted  (2.6.27)
> [  453.614012] MSR: 00029000 <EE,ME>  CR: 28022082  XER: 00000000
> [  453.620090] TASK = ef04a5b0[9] 'sirq-tasklet/0' THREAD: ef052000
> [  453.626342] GPR00: 00000001 ef053e80 ef04a5b0 eeaea360 ef8f0500 00000018 ef871bcc 0000001b
> [  453.634939] GPR08: 00000000 f3950000 eeaeae0c 00000000 28022082 7e2f4df2 7ffd1200 7fff0000
> [  453.643536] GPR16: 00000000 00000000 c045c7e8 c0460000 00008000 00000000 eeba8004 eeaea360
> [  453.652133] GPR24: 00000000 ef053f00 00000000 eeaeadfc eeaea360 ef871ba0 ef8f0524 ef8f0500
> [  453.660730] NIP [f393620c] mac80211_ieee80211_rx+0xab8/0xaf8 [mac80211]
> [  453.667590] LR [f31d5534] ath9k_rx_tasklet+0x14c/0x560 [ath9k_htc]
(Continue reading)

raghunathan.kailasanathan | 28 Feb 2011 16:04

Re: powerpc with ath9k_htc (was AR9271 ath9k_htc + wpa_supplicant : authentication timeout)

> What kernel are you using ?
> Also, can you post the full dmesg log after loading the driver and
> running a scan ?

Kernel v 2.6.27 with compat-wireless-2.6.38. 
Dmesg logs -

[  284.461287] Compat-wireless backport release: compat-wireless-v2.6.38-rc4-1
[  284.461585] Backport based on linux-2.6-allstable.git v2.6.38-rc4
[  293.731726] kfifo: module license 'unspecified' taints kernel.
[  313.236898] Calling CRDA to update world regulatory domain
[  389.777435] usb 1-1.1: ath9k_htc: Transferred FW: ar9271.fw, size: 51280
[  390.415783] usb 1-1.1: ath9k_htc: HTC initialized with 33 credits
[  390.865416] ath: EEPROM regdomain: 0x0
[  390.865732] ath: EEPROM indicates default country code should be used
[  390.865780] ath: doing EEPROM country->regdmn map search
[  390.865822] ath: country maps to regdmn code: 0x3a
[  390.865859] ath: Country alpha2 being used: US
[  390.865894] ath: Regpair used: 0x3a
[  390.884737] ieee80211 phy0: Failed to initialize wep: -2
[  390.892870] Registered led device: ath9k-phy0::radio
[  390.896885] Registered led device: ath9k-phy0::assoc
[  390.898145] Registered led device: ath9k-phy0::tx
[  390.900822] Registered led device: ath9k-phy0::rx
[  390.900836] usb 1-1.1: ath9k_htc: USB layer initialized
[  390.904817] usbcore: registered new interface driver ath9k_hif_usb
[  481.601662] usb 1-1.2: USB disconnect, address 3
[  698.308815] usb 1-1.2: new high speed USB device using fsl-ehci and address 5
[  698.850181] usb 1-1.2: configuration #1 chosen from 1 choice
[  698.867150] scsi2 : SCSI emulation for USB Mass Storage devices
(Continue reading)


Gmane