rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Sun May 19, 2013 10:38 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Thu Nov 27, 2008 1:22 pm 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
I'm using an Edimax PCI card (I remember it's called EW-7128g or so) with rt61 chipset. In ubuntu 8.10, with kernel 2.6.27, Tx-Power=10 dBm and cannot be changed back to 27 dBm with iwconfig. This results in about 10 times slower internet connection.

I have tested all new ubuntu kernels: 2.6.27-7, -8 and -10, both 32 and 64-bit version, running from a disk and Live CD. The kernel driver from an elder distribution, 2.6.24-21, still works well.

Is there a way to set txpower to a proper value with existing driver, with no need for recompilation? Or maybe it's a bug and I have to wait for a newer driver, or rebuild it myself? Please tell me.


Top
 Profile  
 
PostPosted: Thu Nov 27, 2008 7:05 pm 
Offline

Joined: Sun Jun 26, 2005 10:26 am
Posts: 1685
Location: Marseille, France
Hello,
What is the driver you are using? rt61 legacy or rt2x00?

Regards,
Romain

_________________
RutilT developer


Top
 Profile  
 
PostPosted: Fri Nov 28, 2008 5:36 am 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
Hi,
Well, I'm not pretty sure I understand the difference ;)
This is my lsmod | grep rt:

rt61pci 29060 0
crc_itu_t 10112 1 rt61pci
rt2x00pci 15232 1 rt61pci
rt2x00lib 35968 2 rt61pci,rt2x00pci
rfkill 17176 2 rt2x00lib
led_class 12164 1 rt2x00lib
eeprom_93cx6 10240 1 rt61pci
lbm_cw_mac80211 216752 3 rt2x00pci,rt2x00lib,zd1211rw
lbm_cw_cfg80211 42260 3 rt2x00lib,zd1211rw,lbm_cw_mac80211

I have found files of such names under the rt2x00 source tree, so i guess it's rt2x00.

I have also investigated a diff of these drivers and the 10 dBm doesn't seem to be a new constant; so maybe it's a default hardware value that is read by the driver at startup, and treated mistakenly as the maximum?


Top
 Profile  
 
PostPosted: Fri Nov 28, 2008 5:49 pm 
Offline

Joined: Sun Jun 26, 2005 10:26 am
Posts: 1685
Location: Marseille, France
I'm not too sure what is happening, I have moved this thread in the appropriate section of the forum, so that someone can hopefully answer you.

_________________
RutilT developer


Top
 Profile  
 
PostPosted: Sat Nov 29, 2008 1:12 pm 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
Thank you.

This is what dmesg | grep rt61 says:

[ 19.604577] rt61pci 0000:01:0a.0: PCI INT A -> Link[LNKC] -> GSI 17 (level, low) -> IRQ 17
[ 19.628956] Registered led device: rt61pci-phy1:radio
[ 19.628960] phy1 -> rt61pci_mcu_request: Error - mcu request error. Request 0x50 failed for token 0xff.
[ 19.628990] Registered led device: rt61pci-phy1:assoc

Maybe the error affects Tx-Power? Anyway, is it possible to override the maximum Tx-Power setting, for example, in modprobe options?


Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 7:33 pm 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
I inserted some printk calls in driver functions, each time tx-power is processed, in order to find out what happens.

This is a list of default tx-powers, which have been read from the EEPROM, right after the driver was loaded:

[ 780.533420] rt61pci_probe_hw_mode: 10
[ 780.533424] rt61pci_probe_hw_mode: 10
[ 780.533426] rt61pci_probe_hw_mode: 10
[ 780.533428] rt61pci_probe_hw_mode: 10
[ 780.533429] rt61pci_probe_hw_mode: 10
[ 780.533431] rt61pci_probe_hw_mode: 11
[ 780.533432] rt61pci_probe_hw_mode: 11
[ 780.533434] rt61pci_probe_hw_mode: 11
[ 780.533436] rt61pci_probe_hw_mode: 11
[ 780.533437] rt61pci_probe_hw_mode: 11
[ 780.533439] rt61pci_probe_hw_mode: 11
[ 780.533441] rt61pci_probe_hw_mode: 11
[ 780.533442] rt61pci_probe_hw_mode: 14
[ 780.533444] rt61pci_probe_hw_mode: 14

The power values differ from one channel to another. As I have found, mac80211 takes these random values and treats them as maximum tx power for each channel. So when I try to set 27 dBm at channel 3, it is forced to be 10:

[ 1177.594095] rt61pci_config_channel: 10
[ 1177.600021] rt61pci_config_txpower: 10
[ 1177.600026] rt61pci_config: 10
[ 1177.600029] rt2x00lib_config: 10

This does not apply to 9 dBm, which is passed correctly:

[ 1188.724848] rt61pci_config_channel: 9
[ 1188.732021] rt61pci_config_txpower: 9
[ 1188.732026] rt61pci_config: 9
[ 1188.732029] rt2x00lib_config: 9

Consequently, I have changed rt61pci_probe_hw_mode() so that it returns fake 27 dBm tx power values, and - voila - it works :evil:

Solved. Thank you for your attention. Please feel free to use my results when it'll be time to fix this bug for real, not just by walking around it as I did.

Besides this and the fact that LED's no longer seem to work, the rt61pci driver is excellent - it is a sensitive and stable driver, suitable for use in hard conditions.


Last edited by qduaty on Sun Nov 30, 2008 7:46 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 7:41 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
qduaty wrote:
mac80211 takes these random values and treats them as maximum tx power for each channel.


The value is _not_ random, it is provided by the hardware manufacturer as the correct value for that particular channel.
Valid values depend on hardware capabilities and regulatory domain. Perhaps in the past the driver allowed invalid values to be configured, but it has become more strict since then.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 7:52 pm 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
It's nice someone finally responded. Please note that I, being a regular user, don't care about the validity of these values - my wifi card can operate at 27 dBm and it is the only reason I still keep it in my computer. I need that high tx-power and I'm glad I can use it.

Future versions of the driver should at least support manual override of the txpower value, with a modprobe parameter.


Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 7:55 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
qduaty wrote:
Future versions of the driver should at least support manual override of the txpower value, with a modprobe parameter.


No they should not. What rt2x00 could do at the most, is change the max TXpower value and let the regulatory domain daemon sort the maximum allowed value. But a driver should not enforce illegal actions.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 7:57 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
P.S. Some people are actually busy with work and personal life. So forum responses can sometimes take a few days.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 8:04 pm 
Offline

Joined: Thu Nov 27, 2008 12:47 pm
Posts: 7
10 dBm limit is a severe limitation of this PCI card functionality, because in practice, it would no longer be used for long distance communication. So, I'm just looking for a good solution.

What is the regulatory domain daemon?

BTW. These 10 dBm don't seem to be correct values; we have measured my signal with my ISP and even at 27 dBm, he sees me at -82 dB, and I see him at -76. So, assuming we both have 27 dBm, his decibels seem to be better than mine ;)


Last edited by qduaty on Sun Nov 30, 2008 8:16 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Nov 30, 2008 8:12 pm 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5905
Location: Haarlem, The Netherlands
qduaty wrote:
What is the regulatory domain daemon?


The next kernel will have regulatory domain support to limit the allowed frequencies and txpower based on the current location. There will be a userspace side agent controlling the supported values.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
PostPosted: Thu Jul 16, 2009 9:12 pm 
Offline

Joined: Thu Jul 16, 2009 9:09 pm
Posts: 1
So how is the fixed 27dbm reporting done. You got a diff to share?


Top
 Profile  
 
PostPosted: Thu Sep 17, 2009 5:57 pm 
Offline

Joined: Tue Sep 15, 2009 1:48 pm
Posts: 3
This really is a BIG problem!
This guy is stuck on 10dBm, someone in another thread couldn't get above 7dBm & I'm stuck at 11dBm.
I looked at the regulatory domains & cannot see ANY frequencies(channels) that require this kind of throttling.
In fact the achievable levels seem to be around half that which the regulations require.
I really like the rt2x00 kernel drivers & I do not wish to resort to the legacy packages.
My rt73 windows drivers (Ralink) have their domain properly set but do not limit me to 11dBm, so it is not a regulatory domain issue.
We have plenty of wide open spaces here in Australia & I can use my rt73 across them with windows or linux legacy drivers, yet I have trouble in the room next to my AP with the current kernel drivers!
txpower=decent is all I want & maybe some rx tweaking too!!


Top
 Profile  
 
PostPosted: Mon Oct 05, 2009 10:16 am 
Offline

Joined: Sat Sep 19, 2009 4:10 am
Posts: 7
I worked around the problem with the following patch: 20 seems to be the max tx power for rt73usb. I can hear it working as the proximity of wifi antenna inducts power in my speakers so I can literally hear as my card is working. :) The sound gets lauder on each higher setting of txpower. Thanks qduaty for the hint.
Code:
--- drivers/net/wireless/rt2x00/rt73usb.c.old   2009-10-05 01:16:39.000000000 +0200
+++ drivers/net/wireless/rt2x00/rt73usb.c       2009-10-05 01:18:43.000000000 +0200
@@ -2116,12 +2116,12 @@

        tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_G_START);
        for (i = 0; i < 14; i++)
-               info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]);
+               info[i].tx_power1 = 20;//TXPOWER_FROM_DEV(tx_power[i]);

        if (spec->num_channels > 14) {
                tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
                for (i = 14; i < spec->num_channels; i++)
-                       info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]);
+                       info[i].tx_power1 = 20;//TXPOWER_FROM_DEV(tx_power[i]);
        }

        return 0;


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group