All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] Unreliable connection with AR5008 (AR5416/AR2122)
@ 2009-10-31 15:32 Andrej Podzimek
  2009-10-31 16:03 ` Luis R. Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Andrej Podzimek @ 2009-10-31 15:32 UTC (permalink / raw)
  To: ath9k-devel

Hello,

my Zyxel PCMCIA card is almost unusable. The card keeps disconnecting all the time. When the connection gets stuck, the only thing that helps is

	ping6 -q -i 0 <my-server's address>

This ping flood unblocks the connection in about ten seconds to one minute. When the broken connection is just left alone, it may recover after half an hour and sometimes it doesn't recover at all. Some important notes:

	1) Other laptops and WiFi IP phones work with the same AP just fine.
	2) The same laptop has another WiFi card (using the ipw2200 driver) in MiniPCI. It works as well.
	3) The Zyxel card worked till kernel 2.6.29.x. It became unusable since 2.6.30.

A note concerning remark 3: Those freezes could have been less frequent or harder to notice. However, log messages (see below) clearly showed something was wrong even in 2.6.29.x.

What I tried:
	* Tested compat-wireless about once a week for the last two months. That didn't help.
	* Unloaded modules for most network, IRDA and USB devices to find out if ath9k would become more reliable. (No.)
	* Tested the same card with three other access points. (Still the same problem.)
	* Switched the debugfs stuff on. Doesn't work, the card never associates when debugging and debugfs are on.

Details:
	Laptop: Asus M2N
	WiFi Cards: Zyxel NWD-170N on PCMCIA (fails), Intel 2915ABG on MiniPCI (works)
	Kernel: 2.6.31.5 vanilla, tested both with and without compat-wireless

Zyxel card's line from lspci:

	02:00.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01)

Zyxel card's lines from dmesg:

	pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0                                            
	pci 0000:02:00.0: reg 10 32bit mmio: [0x000000-0x00ffff]                                                           
	cfg80211: Calling CRDA to update world regulatory domain                                                           
	cfg80211: Calling CRDA for country: CZ                                                                             
	ath9k 0000:02:00.0: enabling device (0000 -> 0002)                                                                 
	ath9k 0000:02:00.0: PCI INT A -> Link[LNKB] -> GSI 5 (level, low) -> IRQ 5                                         
	cfg80211: Regulatory domain changed to country: CZ                                                                 
	        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)                                          
	        (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)                                                   
	        (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2301 mBm)                                                   
	        (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2301 mBm)                                                   
	        (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 3000 mBm)                                                   
	ath: EEPROM regdomain: 0x30                                                                                        
	ath: EEPROM indicates we should expect a direct regpair map                                                        
	ath: Country alpha2 being used: AM                                                                                 
	ath: Regpair used: 0x30                                                                                            
	phy0: Selected rate control algorithm 'ath9k_rate_control'                                                         
	Registered led device: ath9k-phy0::radio                                                                           
	Registered led device: ath9k-phy0::assoc                                                                           
	Registered led device: ath9k-phy0::tx                                                                              
	Registered led device: ath9k-phy0::rx                                                                              
	phy0: Atheros AR5416 MAC/BB Rev:2 AR2122 RF Rev:81: mem=0xf0680000, irq=5                                          
	cfg80211: Calling CRDA for country: AM                                                                             
	cfg80211: Current regulatory domain intersected:                                                                   
	        (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)                                          
	        (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)                                                   
	        (5170000 KHz - 5250000 KHz @ 20000 KHz), (N/A, 1800 mBm)                                                   
	        (5250000 KHz - 5330000 KHz @ 20000 KHz), (N/A, 1800 mBm)                                                   

The logs show this over and over:

	wlan0: deauthenticating from 00:23:f8:22:aa:a6 by local choice (reason=3)
	wlan0: direct probe to AP 00:23:f8:22:aa:a6 (try 1)
	wlan0: deauthenticating from 00:23:f8:22:aa:a6 by local choice (reason=3)
	wlan0: deauthenticating from 00:23:f8:22:aa:a6 by local choice (reason=3)
	wlan0: direct probe to AP 00:23:f8:22:aa:a6 (try 1)
	wlan0: direct probe responded
	wlan0: authenticate with AP 00:23:f8:22:aa:a6 (try 1)
	wlan0: authenticated
	wlan0: associate with AP 00:23:f8:22:aa:a6 (try 1)
	wlan0: RX AssocResp from 00:23:f8:22:aa:a6 (capab=0x431 status=0 aid=2)
	wlan0: associated

I am convinced that most of these problems are caused by the Minstrel algorithm. The algorithm chooses transfer rates too aggressively, so the card exceeds its retry limit too often. Unfortunately, I can't choose other algorithms, such as PID, in the kernel configuration. They have been removed and only Minstrel stayed there. :-( The mac80211 module doesn't care about the ieee80211_default_rc_algo option. You can easily set it to 'nonsense' and the module will load happily, probably still using Minstrel.

One more *important* note. The access point is situated on the other side of a corridor, opposite to my room. Signal level is usually around -50 dBm. Reliability of the connection depends on how many people walk through the corridor. (!) It fails about once in two hours at night when nobody walks around. However, failures may occur every minute or even more often when there is more movement around the access point during the day. Most failures are *clearly* related to people passing between the access point and the Zyxel WiFi card.

I think the rate control algorithm should handle all these situations gracefully, temporarily dropping the transfer rate to eliminate frame loss. Minstrel is probably too aggressive, which causes packets to be lost on the IP layer. Anyway, that's just a wild guess, a desperate shot in the dark. :-)

It would be great if I could use other rate control algorithms (PID in the first place) to prove this theory. Is this still possible? Is there a patch for that?

Please let me know what I could try or test.

Andrej

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-02 14:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 15:32 [ath9k-devel] Unreliable connection with AR5008 (AR5416/AR2122) Andrej Podzimek
2009-10-31 16:03 ` Luis R. Rodriguez
2009-10-31 16:23   ` Andrej Podzimek
     [not found]   ` <4AEC6477.4010700@podzimek.org>
     [not found]     ` <43e72e890910311002y37288d92k77d3248df587d631@mail.gmail.com>
2009-10-31 20:03       ` Andrej Podzimek
2009-11-02 14:31       ` Andrej Podzimek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.