#306: Can't set txpower by iwconfig command
------------------------------------+---------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: dyqith
Type: defect | Status: assigned
Priority: major | Milestone:
Component: madwifi: other | Version: trunk
Resolution: | Keywords: txpower
Patch_attached: 0 |
------------------------------------+---------------------------------------
Comment (by [EMAIL PROTECTED]):
Got a workaround. I knew this had something to do with time. Something
is not ready, and is not reporting a problem. It's odd, that it takes the
ESSID without the wait, but the channel request
will not take without it, and subseqently the txpower fails. If you wait
15 seconds (gosh that is a LONG time) life is good. I stopwatched myself
typing the stuff in. Takes longer than I thought to type the lines by
hand :).
~ 15 seconds would seem to be magic on this one, and it must be after the
ifconfig up. Running it after the module has no effect. I wonder if
there is a CPU speed thing happening here, ie shorter on a faster CPU or
something. I started with 30, and worked my way down. My original *long*
sleeps were 10 seconds, evidently this was not long enough *every time*.
Sometimes it worked, sometimes it didn't. Perhaps something in the init
routine on "up".
Simply taking the interface down and then running the ifconfig up and
iwconfig commands does not require the sleep in order to work, so it's
first time initialization.
Note: Shortened the dmesg tail, no need to see 3 instances of load/unload.
No other activity on this box to glob things up.
{{{
[netstation]/tmp<100>cat madwifi-test
#!/bin/sh
modprobe ath_pci autocreate=none
dmesg | tail -20
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0
athctrl -i wifi0 -d 300
iwpriv ath0 mode 11a
ifconfig ath0 up
sleep 15
iwconfig ath0 essid CasaFiestaA
iwconfig ath0 channel 161
iwconfig ath0
iwconfig ath0 txpower 25
iwconfig ath0
[netstation]/tmp<101>sh -x ./madwifi-test
+ modprobe ath_pci autocreate=none
Note: /etc/modules.conf is more recent than
/lib/modules/2.4.31/modules.dep
Warning: loading /lib/modules/2.4.31/misc/ath_hal.o will taint the kernel:
non-GPL license - Proprietary
See http://www.tux.org/lkml/#export-tainted for information about
tainted modules
Module ath_hal loaded, with warnings
Module wlan loaded, with warnings
Module ath_rate_sample loaded, with warnings
Module ath_pci loaded, with warnings
+ dmesg
+ tail -20
ath_rate_sample: unloaded
wlan: driver unloaded
ath_hal: driver unloaded
ath_hal: 0.9.16.16 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413,
RF5413)
wlan: 0.8.4.2 (svn 1500)
ath_rate_sample: 1.2 (svn 1500)
ath_pci: 0.9.4.5 (svn 1500)
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps
24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
wifi0: Use hw queue 1 for WME_AC_BE traffic
wifi0: Use hw queue 0 for WME_AC_BK traffic
wifi0: Use hw queue 2 for WME_AC_VI traffic
wifi0: Use hw queue 3 for WME_AC_VO traffic
wifi0: Use hw queue 8 for CAB traffic
wifi0: Use hw queue 9 for beacons
wifi0: Atheros 5212: mem=0x80080000, irq=9
+ wlanconfig ath0 create wlandev wifi0 wlanmode ap
ath0
+ iwconfig ath0
ath0 IEEE 802.11b ESSID:""
Mode:Master Channel:0 Access Point: 00:00:00:00:00:00
Bit Rate:0 kb/s Tx-Power:50 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
+ athctrl -i wifi0 -d 300
Setting distance on interface wifi0 to 300 meters
+ iwpriv ath0 mode 11a
+ ifconfig ath0 up
+ sleep 15
+ iwconfig ath0 essid CasaFiestaA
+ iwconfig ath0 channel 161
+ iwconfig ath0
ath0 IEEE 802.11a ESSID:"CasaFiestaA"
Mode:Master Frequency:5.805 GHz Access Point:
00:0B:6B:33:5A:D0
Bit Rate:0 kb/s Tx-Power:14 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
+ iwconfig ath0 txpower 25
+ iwconfig ath0
ath0 IEEE 802.11a ESSID:"CasaFiestaA"
Mode:Master Frequency:5.805 GHz Access Point:
00:0B:6B:33:5A:D0
Bit Rate:0 kb/s Tx-Power=17 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/94 Signal level=-95 dBm Noise level=-95 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
}}}
--
Ticket URL: <http://madwifi.org/ticket/306>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity