From: Luis R. Rodriguez Date: Fri, 17 Jul 2009 09:30:38 -0700 Subject: [ath9k-devel] Zyxel NWD-170n badly slow In-Reply-To: <4A60A0EF.5050601@podzimek.org> References: <4A60A0EF.5050601@podzimek.org> Message-ID: <43e72e890907170930u5205c1c0g50ee27cd119349c5@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Fri, Jul 17, 2009 at 9:03 AM, Andrej Podzimek wrote: > Hello, > > I have a question regarding the 802.11n transfer rates. My 802.11n WiFi card associated with a 802.11n router is badly slow. The maximum data rates are only about 3 MB/s (24 Mb/s), exactly the same as when a 802.11g client is used. What could this be caused by? This could be an interoperability issue with a specific Access Point. > Some details follow. > > The network: > > ? ? ? ?Zyxel NBG-420N (router, firmware version: V3.60(AMO.5) | 02/28/2009) This helps, thanks for reporting this, not sure if our team will have this AP to test on, we will see. > ? ? ? ?Zyxel NWD-170N (PCMCIA adapter) > ? ? ? ?A radius server providing EAP-TLS (connected via ethernet) > ? ? ? ?Client's kernel: 2.6.30.1 vanilla > > This is what lspci says: > > ? ? ? ?02:00.0 Network controller: Atheros Communications Inc. AR5008 Wireless Network Adapter (rev 01) > > This is what I found in dmesg: > > ? ? ? ?pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0 > ? ? ? ?pci 0000:02:00.0: reg 10 32bit mmio: [0x000000-0x00ffff] > ? ? ? ?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 > ? ? ? ?phy1: Selected rate control algorithm 'ath9k_rate_control' > ? ? ? ?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) > ? ? ? ?Registered led device: ath9k-phy1::radio > ? ? ? ?Registered led device: ath9k-phy1::assoc > ? ? ? ?Registered led device: ath9k-phy1::tx > ? ? ? ?Registered led device: ath9k-phy1::rx > ? ? ? ?phy1: Atheros AR5416 MAC/BB Rev:2 AR2122 RF Rev:81: mem=0xf0780000, irq=5 > > The regulatory domain is a weird issue, too. iw reg set can sometimes change it, but sometimes it doesn't take any action (and no error is reported). When it does something, this is what it looks like: > > ? ? ? ?cfg80211: Calling CRDA for country: CZ > ? ? ? ?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) Do you have CONFIG_WIRELESS_OLD_REGULATORY set? Are you using an ieee80211_regdom module parameter? You can disable these. Anyway -- you should not need to set your regulatory domain manually at all for ath9k devicesl, the card already has regulatory domain information embedded on the EEPROM and this is used by the card to get regulatory domain information for the card. For ath9k, since it has EEPROM regulatory information we trust it and keep that information. Further user input for ath9k devices will only restrict the device further, never add more capabilities. So you should be OK with the default values the card has unless you want to help compliance further. > I found out that the hardware combination inside the NWD-170N WiFi card is not on the hardware compatibility list. (http://linuxwireless.org/en/users/Drivers/ath9k#supported_chipsets) Could this be the reason why only 802.11g, but not 802.11n is supported? No, it just means that card was never added to the list, please feel free to add it. > The transfer rate shown in iwconfig is always either 1 Mb/s or 11 Mb/s, although the connection speed about 24 Mb/s.) iwconfig does not report MCS rates, iwconfig uses wireless extensions and wireless-extensions is not getting extended any further. The new wireless API is through cfg80211, the userspace interface for this nl80211. nl80211 based applications should be used now. iw is such application [1], and it seems you already have it. Please read its documentation and learn to use that over iwconfig, the documentation has replacement commands. Although iw does understand MCS rates ath9k is currently not reporting the right MCS rate index to the kernel, this is due to how ath9k rate control algorithm is implemented -- this needs to be fixed. To review what rates your card is using you can enable CONFIG_ATH9K_DEBUG and then read the debugfs rcstat file. For documentation on this please read: http://wireless.kernel.org/en/users/Drivers/ath9k/debug [1] http://wireless.kernel.org/en/users/Documentation/iw > ? ? ? ?wlan0 ? ? IEEE 802.11bgn ?ESSID:"Net2" > ? ? ? ? ? ? ? ? ?Mode:Managed ?Frequency:2.437 GHz ?Access Point: 00:23:F8:22:AA:A6 > ? ? ? ? ? ? ? ? ?Bit Rate=11 Mb/s ? Tx-Power=20 dBm > ? ? ? ? ? ? ? ? ?Retry min limit:7 ? RTS thr:off ? Fragment thr:off > ? ? ? ? ? ? ? ? ?Encryption key:****-****-****-****-****-****-****-**** [2] ? Security mode:open > ? ? ? ? ? ? ? ? ?Power Management:off > ? ? ? ? ? ? ? ? ?Link Quality=66/70 ?Signal level=-44 dBm > ? ? ? ? ? ? ? ? ?Rx invalid nwid:0 ?Rx invalid crypt:0 ?Rx invalid frag:0 > ? ? ? ? ? ? ? ? ?Tx excessive retries:0 ?Invalid misc:0 ? Missed beacon:0 > > Scan output from iwconfig: > > ? ? ? ?Cell 02 - Address: 00:23:F8:22:AA:A6 > ? ? ? ? ? ? ? ? ?Channel:6 > ? ? ? ? ? ? ? ? ?Frequency:2.437 GHz (Channel 6) > ? ? ? ? ? ? ? ? ?Quality=70/70 ?Signal level=-39 dBm > ? ? ? ? ? ? ? ? ?Encryption key:on > ? ? ? ? ? ? ? ? ?ESSID:"Net2" > ? ? ? ? ? ? ? ? ?Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s > ? ? ? ? ? ? ? ? ? ? ? ? ? ?9 Mb/s; 12 Mb/s; 18 Mb/s > ? ? ? ? ? ? ? ? ?Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s > ? ? ? ? ? ? ? ? ?Mode:Master > ? ? ? ? ? ? ? ? ?Extra:tsf=0000000c5c8d0180 > ? ? ? ? ? ? ? ? ?Extra: Last beacon: 16ms ago > ? ? ? ? ? ? ? ? ?IE: Unknown: 00044E657432 > ? ? ? ? ? ? ? ? ?IE: Unknown: 010882848B960C121824 > ? ? ? ? ? ? ? ? ?IE: Unknown: 030106 > ? ? ? ? ? ? ? ? ?IE: IEEE 802.11i/WPA2 Version 1 > ? ? ? ? ? ? ? ? ? ? ?Group Cipher : CCMP > ? ? ? ? ? ? ? ? ? ? ?Pairwise Ciphers (1) : CCMP > ? ? ? ? ? ? ? ? ? ? ?Authentication Suites (1) : 802.1x > ? ? ? ? ? ? ? ? ?IE: Unknown: 2A0100 > ? ? ? ? ? ? ? ? ?IE: Unknown: 32043048606C > ? ? ? ? ? ? ? ? ?IE: Unknown: DD1E00904C334C101B0000000000000000000000000000000000000000000000 > ? ? ? ? ? ? ? ? ?IE: Unknown: 2D1A4C101B0000000000000000000000000000000000000000000000 > ? ? ? ? ? ? ? ? ?IE: Unknown: DD1A00904C3406001B00000000000000000000000000000000000000 > ? ? ? ? ? ? ? ? ?IE: Unknown: 3D1606001B00000000000000000000000000000000000000 > ? ? ? ? ? ? ? ? ?IE: Unknown: DD0900037F01010000FF7F > ? ? ? ? ? ? ? ? ?IE: Unknown: DD0A00037F04010000000000 > > Scan output from iw: > > ? ? ? ?BSS 00:23:f8:22:aa:a6 (on wlan0) > ? ? ? ?TSF: 53096900774 usec (0d, 14:44:56) > ? ? ? ?freq: 2437 > ? ? ? ?beacon interval: 100 > ? ? ? ?capability: ESS Privacy ShortPreamble ShortSlotTime (0x0431) > ? ? ? ?signal: -52.00 dBm > ? ? ? ?SSID: Net2 > ? ? ? ?Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 > ? ? ? ?DS Paramater set: channel 6 > ? ? ? ?RSN: ? ? * Version: 1 > ? ? ? ? ? ? ? ? * Group cipher: CCMP > ? ? ? ? ? ? ? ? * Pairwise ciphers: CCMP > ? ? ? ? ? ? ? ? * Authentication suites: IEEE 802.1X > ? ? ? ? ? ? ? ? * Capabilities: (0x0000) > ? ? ? ?ERP: > ? ? ? ?Extended supported rates: 24.0 36.0 48.0 54.0 > > This is what iw list says: > > ? ? ? ?Wiphy phy1 > ? ? ? ? ? ? ? ?Band 1: > ? ? ? ? ? ? ? ? ? ? ? ?HT capabilities: 0x104e > ? ? ? ? ? ? ? ? ? ? ? ?* 20/40 MHz operation > ? ? ? ? ? ? ? ? ? ? ? ?* SM PS disabled > ? ? ? ? ? ? ? ? ? ? ? ?* 40 MHz short GI > ? ? ? ? ? ? ? ? ? ? ? ?* max A-MSDU len 3839 > ? ? ? ? ? ? ? ? ? ? ? ?* DSSS/CCK 40 MHz > ? ? ? ? ? ? ? ?HT A-MPDU factor: 0x0003 (65535 bytes) > ? ? ? ? ? ? ? ?HT A-MPDU density: 0x0006 (8 usec) > ? ? ? ? ? ? ? ?HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00 > ? ? ? ? ? ? ? ?HT TX/RX MCS rate indexes supported: > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 0 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 1 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 2 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 3 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 4 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 5 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 6 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 7 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 8 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 9 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 10 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 11 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 12 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 13 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 14 > ? ? ? ? ? ? ? ? ? ? ? ?MCS index 15 > ? ? ? ? ? ? ? ?Frequencies: > ? ? ? ? ? ? ? ? ? ? ? ?* 2412 MHz [1] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2417 MHz [2] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2422 MHz [3] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2427 MHz [4] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2432 MHz [5] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2437 MHz [6] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2442 MHz [7] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2447 MHz [8] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2452 MHz [9] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2457 MHz [10] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2462 MHz [11] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2467 MHz [12] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2472 MHz [13] (20.0 dBm) > ? ? ? ? ? ? ? ? ? ? ? ?* 2484 MHz [14] (disabled) > ? ? ? ? ? ? ? ?Bitrates: > ? ? ? ? ? ? ? ? ? ? ? ?* 1.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 2.0 Mbps (short preamble supported) > ? ? ? ? ? ? ? ? ? ? ? ?* 5.5 Mbps (short preamble supported) > ? ? ? ? ? ? ? ? ? ? ? ?* 11.0 Mbps (short preamble supported) > ? ? ? ? ? ? ? ? ? ? ? ?* 6.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 9.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 12.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 18.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 24.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 36.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 48.0 Mbps > ? ? ? ? ? ? ? ? ? ? ? ?* 54.0 Mbps > ? ? ? ?max # scan SSIDs: 4 > ? ? ? ?Supported interface modes: > ? ? ? ? ? ? ? ?* IBSS > ? ? ? ? ? ? ? ?* managed > ? ? ? ? ? ? ? ?* AP > ? ? ? ? ? ? ? ?* AP/VLAN > ? ? ? ? ? ? ? ?* monitor > ? ? ? ? ? ? ? ?* mesh point > > The connection works just fine, as far as 802.11g is concerned, but I just didn't find a way to switch to 802.11n transfer rates. This could be an interoperability issue. You can try the wireless-testing git tree directly [1] or you can try just the wireless drivers by using compat-wireless [2]. For further details on how to get the latest ath9k driver please read: http://wireless.kernel.org/en/users/Drivers/ath9k#Get_the_latest_ath9k_driver > Could anybody give me a piece of advice, please? Is there a patch or GIT version I should try? If you want to stay on bleeding edge to help test ath9k patches you can always use wireless-testing directly, and git-pull every week for new changes. If you rather not compile your entire kernel you can just use compat-wireless -- that is updated daily automatically from wireless-testing. Chances are this is an interoperability issue. Another user had reported an issue with his AP with 11n rates on AR5416 but our team has yet to test it. The information you have provided is great and can help zero in on the issue. I recommend to check if your AP has any firmware upgrades available, and to also try out the latest ath9k driver updates. Luis