Angel Arancibia | 12 May 17:26 2012
Picon

Could not set tx-power over 15 dBM

Hi, 


I got a Atheros AR9285 that i can't increase tx-power level over 15 dBM. The problem is that at such power, the connection is (very) unstable when i'm not near the AP.

when I try to increae tx-power

[root <at> Gauchita etc]# iwconfig wlan0 txpower 16dBM
Error for wireless request "Set Tx Power" (8B26) :
    SET failed on device wlan0 ; Invalid argument.


[root <at> Gauchita etc]# iw reg get
country BO:
        (2402 - 2482 <at> 40), (N/A, 30)
        (5735 - 5835 <at> 40), (N/A, 30)


More info about environment: (using compat-wireless 3.4-rc3-1 )

[root <at> Gauchita etc]# uname -a
Linux Gauchita 3.2-CHAKRA #1 SMP PREEMPT Tue Feb 28 14:55:18 UTC 2012 x86_64 Intel(R) Core(TM) i3-2330M CPU <at> 2.20GHz GenuineIntel GNU/Linux

[root <at> Gauchita etc]# hwinfo --wlan
13: PCI 200.0: 0282 WLAN controller                             
  [Created at pci.319]
  Unique ID: y9sn.apYiokQ9666
  Parent ID: qTvu.lbqpt3ZK2l3
  SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:02:00.0
  SysFS BusID: 0000:02:00.0
  Hardware Class: network
  Model: "Atheros AR9285 Wireless Network Adapter (PCI-Express)"
  Vendor: pci 0x168c "Atheros Communications Inc."
  Device: pci 0x002b "AR9285 Wireless Network Adapter (PCI-Express)"
  SubVendor: pci 0x1a3b 
  SubDevice: pci 0x1089 
  Revision: 0x01
  Driver: "ath9k"
  Driver Modules: "ath9k", "ath9k"
  Device File: wlan0
  Features: WLAN
  Memory Range: 0xd0500000-0xd050ffff (rw,non-prefetchable)
  IRQ: 17 (no events)
  HW Address: 74:2f:68:01:c2:31
  Link detected: yes
  WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
  WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 2.484
  WLAN encryption modes: WEP40 WEP104 TKIP CCMP
  WLAN authentication modes: open sharedkey wpa-psk wpa-eap
  Module Alias: "pci:v0000168Cd0000002Bsv00001A3Bsd00001089bc02sc80i00"
  Driver Info #0:
    Driver Status: ath9k is active
    Driver Activation Cmd: "modprobe ath9k"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #7 (PCI bridge)


[root <at> Gauchita etc]# modinfo ath9k
filename:       /lib/modules/3.2-CHAKRA/updates/drivers/net/wireless/ath/ath9k/ath9k.ko
license:        Dual BSD/GPL
description:    Support for Atheros 802.11n wireless LAN cards.
author:         Atheros Communications
alias:          platform:ar934x_wmac
alias:          platform:ar933x_wmac
alias:          platform:ath9k
alias:          pci:v0000168Cd00000034sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000033sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000032sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000030sv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i*
alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i*
alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i*
depends:        ath9k_hw,ath9k_common,mac80211,ath,cfg80211,compat
vermagic:       3.2-CHAKRA SMP preempt mod_unload modversions 
parm:           debug:Debugging mask (uint)
parm:           nohwcrypt:Disable hardware encryption (int)
parm:           blink:Enable LED blink on activity (int)
parm:           btcoex_enable:Enable wifi-BT coexistence (int)


If you need any other info, please let me know.

Thanks,
_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Holger Schurig | 14 May 09:06 2012

Re: Could not set tx-power over 15 dBM

Why do you use "iw" to display your regulatory domain, but then the
antique "iwconfig" to set it?  "iwconfig" can be deleted from any
moder system, it's outdated and virtually unsupported now.

Do "iw | grep txpower" to see the tx power related capabilities of iw.
If you then get an error, you'll much more likely getting an answer
here.

That said, a quick test of this didn't work for me: "iw wlan0 set
txpower limit 10" or "set txpower fixed 15" and so on always gave me
error -95: Operation not supported.
Angel Arancibia | 14 May 16:46 2012
Picon

Re: Could not set tx-power over 15 dBM



2012/5/14 Holger Schurig <holgerschurig <at> googlemail.com>
Why do you use "iw" to display your regulatory domain, but then the
antique "iwconfig" to set it?  "iwconfig" can be deleted from any
moder system, it's outdated and virtually unsupported now.

Do "iw | grep txpower" to see the tx power related capabilities of iw.
If you then get an error, you'll much more likely getting an answer
here.

That said, a quick test of this didn't work for me: "iw wlan0 set
txpower limit 10" or "set txpower fixed 15" and so on always gave me
error -95: Operation not supported.


First of all, thanks for your answer and time.

In second place, i've also try using iw to set tx-power over 15dBM, but whith the same result. The problem was that the reg domain in the EEPROM has that restriction. 

I could finally set grater power level changing the EEPROM reg domain to AR (i'm from Argentina). As far I know ath9k does not support EEPROM writing (in contrast to ath5k, doesn't it?) so I have done it as suggested in dd-wrt forum [1]. After that, i could set using iwconfig and/or iw.

Anyway, the original problem that i was trying to fix was [2] the horrible performance of my AR9285 (if i'm more than 5m .. 10m from the AP, the connection goes down, when others laptops got 40% signal quality), and increasing the tx-power has practicaly no efect on it.

As I has mentioned in [3], it seems not to be a specific issue of ath9k (also happend in windows7 whit the last driver) but a hardware problem.  The connection goes down whit link Quality=33/70  Signal level=-77 dBm. 

Of corse, i'm not sure :) . if Anyone has any suggestion or any help will be apreciated.





_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Holger Schurig | 14 May 17:14 2012

Re: Could not set tx-power over 15 dBM

Maybe you have some similar problem as I, e.g. either an antenna
diversity problem and/or an ANI problem.

If your WLAN device has several antennas and the wrong input is
selected, then the driver is deaf. Moving away this little from the AP
might get you disconnected then.

If your WLAN device detects too much noise (or the noise detection is
buggy), then ANI (adaptive noise immunity) attenuates the incoming
signal. Again you get a bit deaf. But this time by purpose, so that
the reception part of the WLAN chip doesn't get overdriven and into
clipping mode. ANI can be disabled, one of the ath9k-modules (afaik
ath9k_hw) has a disable_ani= command line parameter.

Also, you can turn on ANI debugging to get a bit of output from ANI
with specifing debug=0x40 to the ath9k.ko module.

Note that increasing your own txpower doesn't help against a deaf reception.

--

-- 
http://www.holgerschurig.de
Angel Arancibia | 15 May 00:57 2012
Picon

Re: Could not set tx-power over 15 dBM

Hi, 


Thanks again for your time

2012/5/14 Holger Schurig
Maybe you have some similar problem as I, e.g. either an antenna
diversity problem and/or an ANI problem.

If your WLAN device has several antennas and the wrong input is
selected, then the driver is deaf. Moving away this little from the AP
might get you disconnected then.



There is any way to check this? At least, what is the input selected? I think an antena issue is the most probable reason. 

 
If your WLAN device detects too much noise (or the noise detection is
buggy), then ANI (adaptive noise immunity) attenuates the incoming
signal. Again you get a bit deaf. But this time by purpose, so that
the reception part of the WLAN chip doesn't get overdriven and into
clipping mode. ANI can be disabled, one of the ath9k-modules (afaik
ath9k_hw) has a disable_ani= command line parameter.


I've got something wrong here ...

$ modprobe -r ath9k
$ modprobe -i ath9k_hw disable_ani=1
  ERROR: could not insert 'ath9k_hw': No such file or directory
  (dmesg) : ath9k_hw: Unknown parameter `disable_ani'

 
I can see a ath9k_hw parameter 'force_new_ani' set to 0, but i don't know if it reffers to the same.

$ cat  /sys/module/ath9k_hw/parameters/force_new_ani 
0


Also, you can turn on ANI debugging to get a bit of output from ANI
with specifing debug=0x40 to the ath9k.ko module.


$ modprobe -i ath9k debug=0x40

but ...

$ ls -l /sys/kernel/debug/ieee80211/phy0/
total 0

Where I should look for ANI debug messages?

 

Note that increasing your own txpower doesn't help against a deaf reception.


:)
 
Thanks,
Angel
_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Holger Schurig | 15 May 14:56 2012

Re: Could not set tx-power over 15 dBM

> Where I should look for ANI debug messages?

dmesg !

And the disable_ani thingy is in the procfc, not a command line parameter:

echo 1 >/sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani

--

-- 
http://www.holgerschurig.de
Angel Arancibia | 16 May 00:41 2012
Picon

Re: Could not set tx-power over 15 dBM



2012/5/15 Holger Schurig <holgerschurig <at> googlemail.com>
> Where I should look for ANI debug messages?

dmesg !


And the disable_ani thingy is in the procfc, not a command line parameter:

echo 1 >/sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani




Thats the problem, i don't have the '/sys/kernel/debug/ieee80211/phy0/ath9k/disable_ani' file neither '/sys/kernel/debug/ieee80211/phy0/ath9k' dir.

/sys/kernel/debug/ieee80211/phy0/ is empty

[root <at> Gauchita ~]# ls -l /sys/kernel/debug/ieee80211/phy0/
total 0
 

I need to do something to get that file created? 

Thanks,





_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Holger Schurig | 16 May 08:18 2012

Re: Could not set tx-power over 15 dBM

Hmm, define CONFIG_CFG80211_DEBUGFS, CONFIG_MAC80211_DEBUGFS and
CONFIG_ATH9K_DEBUGFS and recompile?

And maybe you also need to mount /sys/kernel/debugfs in the first
place?  Is that directory empty or not?

What's the contents of /sys/kernel/debug/ieee80211 ? Maybe it's not
phy0, but phy1 or even higher?  Each reloading increases the phy
number, strangely enought.
Angel Arancibia | 16 May 12:31 2012
Picon

Re: Could not set tx-power over 15 dBM



2012/5/16 Holger Schurig <holgerschurig <at> googlemail.com>
Hmm, define CONFIG_CFG80211_DEBUGFS, CONFIG_MAC80211_DEBUGFS and
CONFIG_ATH9K_DEBUGFS and recompile?


I will check that.
 
And maybe you also need to mount /sys/kernel/debugfs in the first
place?  Is that directory empty or not?

What's the contents of /sys/kernel/debug/ieee80211 ? Maybe it's not
phy0, but phy1 or even higher?  Each reloading increases the phy
number, strangely enought.


yep, debugfs is up and running :) . inside /sys/kernel/debug/ieee80211 there is only phy0, but phy0 is empty.

I will check the constant setting when i get back to home.

Thanks

_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Angel Arancibia | 16 May 16:24 2012
Picon

Re: Could not set tx-power over 15 dBM



2012/5/16 Angel Arancibia <angel.arancibia <at> gmail.com>


2012/5/16 Holger Schurig <holgerschurig <at> googlemail.com>
Hmm, define CONFIG_CFG80211_DEBUGFS, CONFIG_MAC80211_DEBUGFS and
CONFIG_ATH9K_DEBUGFS and recompile?


I will check that.
 

seems that they were enable last time i've compiled compat-wireless.

[aragh0rn <at> Gauchita compat-wireless-3.4-rc3-1]$ grep -r  CONFIG_CFG80211_DEBUGFS .
./config.mk:# CONFIG_CFG80211_DEBUGFS=y
./defconfigs/atheros-debug.mk:CONFIG_CFG80211_DEBUGFS=y
./patches/99-change-makefiles.patch: cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o

[aragh0rn <at> Gauchita compat-wireless-3.4-rc3-1]$ grep -r CONFIG_MAC80211_DEBUGFS .
./config.mk:# CONFIG_MAC80211_DEBUGFS=y
./defconfigs/atheros-debug.mk:CONFIG_MAC80211_DEBUGFS=y

[aragh0rn <at> Gauchita compat-wireless-3.4-rc3-1]$ grep -r CONFIG_ATH9K_DEBUGFS .
./config.mk:# CONFIG_ATH9K_DEBUGFS=y
./defconfigs/atheros-debug.mk:CONFIG_ATH9K_DEBUGFS=y





[root <at> Gauchita ~]# ls -l /sys/kernel/debug/ieee80211/
total 0
drwxr-xr-x 2 root root 0 16.05.2012 07:07 phy0/
[root <at> Gauchita ~]# ls -l /sys/kernel/debug/ieee80211/phy0/
total 0

_______________________________________________
ath9k-devel mailing list
ath9k-devel <at> lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Gmane