From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrej Podzimek Date: Fri, 17 Jul 2009 19:31:13 +0200 Subject: [ath9k-devel] Zyxel NWD-170n badly slow In-Reply-To: <43e72e890907170930u5205c1c0g50ee27cd119349c5@mail.gmail.com> References: <4A60A0EF.5050601@podzimek.org> <43e72e890907170930u5205c1c0g50ee27cd119349c5@mail.gmail.com> Message-ID: <4A60B561.30205@podzimek.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org 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. Yes, but these are two Zyxel devices, both recommended by the manufacturer as a good combination for 802.11n networking... > Do you have CONFIG_WIRELESS_OLD_REGULATORY set? It was on when I started testing this card. Then I recompiled the kernel with this option set to off. It didn't really change anything. > Are you using an ieee80211_regdom module parameter? The ath9k module I use does not accept such a parameter. The same applies to the mac80211 module. Maybe it's not in the vanilla kernel yet? Will try something bleeding-edge ASAP (compat-wireless). > 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. I used the ath_info utility with an old ath5k card to change the regdomain. I usually buy WiFi hardware on eBay from USA or Hong Kong, so it's necessary to switch to the ETSI regdomain. (Some people say it's 0x30, others say it's 0x37. Both of them seem to work.) However, ath_info says "MAC revision 0x3fb7 is not supported!" when used with my Zyxel PCMCIA card, so there's probably no way to change the value in the EEPROM. The problem is that iw reg set only takes effect once per system lifetime. It's obviously not designed for USB, PCMCIA or other removable WiFi adapters. Consequently, when you need to reset the device (plug/unplug, reload the module), there is no way to restore the regdomain settings without rebooting. Any subsequent re-initializations of the device use the original value from EEPROM (which is correct) and the kernel does not switch the device to the new regdomain configured using iw (which is wrong). (Anyway, this doesn't seem to be an ath9k problem.) > 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. If I am not mistaken, it seems that changing the regulatory domain *did* add some capabilities: Before: cfg80211: Calling CRDA for country: AM cfg80211: Regulatory domain changed to country: AM (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) After: 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) There are more channels and higher output power is allowed. Anyway, maybe I'm wrong and the card's capabilities are limited by an intersection of some built-in country-specific hardware limitations and the regulatory domain. If so, relaxing the regulatory domain won't (necessarily) relax the whole intersection of rules... > 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. Yes, I know it has 802.11n channel "width" settings, mesh network settings and other new features. However, I just hoped there would be something like "switch 802.11n ON" somewhere... ;-) However, this problem is probably much more complicated. (It seems that 802.11n support cannot be explicitly switched on and off, so the solution is not that simple.) > I recommend to check if your AP has any firmware upgrades available, > and to also try out the latest ath9k driver updates. OK, will try the latest ath9k. The AP has the latest firmware, of course. That's the first thing I checked. Andrej