From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis R. Rodriguez Date: Tue, 19 Jan 2010 07:31:43 -0800 Subject: [ath9k-devel] weak signal strength using ar928x In-Reply-To: References: <7F2FE3504A6CB54497542A539E401A7B61190AF4@DEMCHP99E15MSX.ww902.siemens.net> <7F2FE3504A6CB54497542A539E401A7B61190AF8@DEMCHP99E15MSX.ww902.siemens.net> <7F2FE3504A6CB54497542A539E401A7B61190AFA@DEMCHP99E15MSX.ww902.siemens.net> <7F2FE3504A6CB54497542A539E401A7B61190AFD@DEMCHP99E15MSX.ww902.siemens.net> <20100115163039.GB2156@tux> Message-ID: <20100119153143.GA2133@tux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Sun, Jan 17, 2010 at 02:29:20PM -0800, Lorenzo Bianconi wrote: > >> On Fri, Jan 15, 2010 at 06:54:23AM -0800, Porsch, Marco wrote: > >>> >>> Hello list, > >>> >> > >>> >>> i'm experiencing a very weak signal strength using ath9k and ar928x wireless in a wndr3700 router. I placed two of these approximately 3 meters line of sight of each other, and see signal strength of about -90dbm in mesh mode [1]. > >>> >>> The problem counts for sending and receiving, also in bss-mode. I posed my laptop approximately one meter away from the router as ap and measured the signal strength of the netgear firmware (openwrt 7.x with propietary driver) and openwrt (compat-wireless-2010-01-11, compat-wireless-2009-12-05), which gives me 20dbm difference [2]. > >>> >>> Using 'iwlist scan', original firmware shows 14 APs in my neighbourhood, openwrt shows 4. > >>> >> > >>> >> [...] > >>> >> > >>> >> I have taken a further look into the problem and realized, that 'iwconfig txpower' has no affect to the signal strength. I also tried up-down or scanning after change. > >>> >> A test with hacked 'regd.c' (all set to 30dBm, no further limitations) also showed no changes in signal quality. Power management is off. > >>> >> > >>> >> A interesting detail is, that 5GHz (channel 52) also has quiet limited range, but far better than 2,4GHz. 5GHz txpower is set to 30dBm by default. > >>> >> > >>> >> Kernel is Linux OpenWrt 2.6.30.10 #10 Fri Jan 15 11:12:04 CET 2010 mips, wireless now from compat-wireless-2010-01-13. > >>> >> > >>> >> > >>> >> Some debug outputs after 10min of iperf traffic over mesh-link between two identical wndr3700. I have seen no other 5GHz wifi in range. > >>> >> 1) 3 meters line of sight > >>> >> 2) 10 meters with thin glass/metal walls > >>> >> (in both cases 2,4GHz wont communicate at all) > >>> >> > >>> >> > >>> >> 1) > >>> >> [ 3] 0.0-600.0 sec 1.27 GBytes 18.2 Mbits/sec > >>> >> > >>> >> cat /sys/kernel/debug/ath9k/phy1/rcstat > >>> >> HT MCS Rate Success Retries XRetries PER > >>> >> 6.0: 0 0 0 0 > >>> >> 9.0: 0 0 0 0 > >>> >> 12.0: 0 0 0 0 > >>> >> 18.0: 0 0 0 0 > >>> >> 24.0: 1 0 0 0 > >>> >> 36.0: 1 0 0 0 > >>> >> 48.0: 286 19 0 0 > >>> >> 54.0: 1160839 113918 26 7 > >>> >> > >>> >> Station 00:24:b2:58:fb:54 (on imesh5g) > >>> >> inactive time: 570 ms > >>> >> rx bytes: 2907897221 > >>> >> rx packets: 2001025 > >>> >> tx bytes: 422706850 > >>> >> tx packets: 1161637 > >>> >> signal: -67 dBm > >>> >> tx bitrate: 54.0 MBit/s > >>> >> mesh llid: 4935 > >>> >> mesh plid: 19635 > >>> >> mesh plink: ESTAB > >>> >> > >>> >> > >>> >> 2) > >>> >> [ 3] 0.0-600.0 sec 294 MBytes 4.11 Mbits/sec > >>> >> > >>> >> cat /sys/kernel/debug/ath9k/phy1/rcstat > >>> >> HT MCS Rate Success Retries XRetries PER > >>> >> 6.0: 6936 7587 2100 0 > >>> >> 9.0: 17804 18453 5797 0 > >>> >> 12.0: 153370 112773 21194 13 > >>> >> 18.0: 40331 104799 45526 49 > >>> >> 24.0: 94 4822 7450 54 > >>> >> 36.0: 0 15 21 82 > >>> >> 48.0: 0 0 0 0 > >>> >> 54.0: 0 0 0 0 > >>> >> > >>> >> Station 00:24:b2:58:fb:54 (on imesh5g) > >>> >> inactive time: 800 ms > >>> >> rx bytes: 670383000 > >>> >> rx packets: 442114 > >>> >> tx bytes: 18396981 > >>> >> tx packets: 218811 > >>> >> signal: -86 dBm > >>> >> tx bitrate: 12.0 MBit/s > >>> >> mesh llid: 57085 > >>> >> mesh plid: 19775 > >>> >> mesh plink: ESTAB > >>> > >>> >Hi Marco, > >>> > > >>> >I faced the same problem and I solved this issue with this simple patch: > >>> > > >>> >Signed-off-by: Lorenzo Bianconi > >>> >--- > >>> >--- a/drivers/net/wireless/ath/ath9k/main.c > >>> >+++ b/drivers/net/wireless/ath/ath9k/main.c > >>> >@@ -2817,8 +2817,10 @@ > >>> > } > >>> > > >>> > skip_chan_change: > >>> >- if (changed & IEEE80211_CONF_CHANGE_POWER) > >>> >+ if (changed & IEEE80211_CONF_CHANGE_POWER) { > >>> > sc->config.txpowlimit = 2 * conf->power_level; > >>> >+ ath_update_txpow(sc); > >>> >+ } > >>> > > >>> > spin_lock_bh(&sc->wiphy_lock); > >>> > disable_radio = ath9k_all_wiphys_idle(sc); > >>> > > >>> > > >>> >Now "iwconfig wlan0 txpower" works fine. > >>> > > >>> >Regards. > >>> > > >>> >Lorenzo > >>> > >>> Thanks for your reply, > >>> > >>> I applied your patch, but unfortunately i still cannot change my txpower. Even after setting txpower to 0 or off the AP shows the same signal level in 'iwlist scan'. > >> > >> Please see the patch > >> > >> http://bugzilla.kernel.org/attachment.cgi?id=23981 > >> http://bugzilla.kernel.org/show_bug.cgi?id=14642 > >> > >> Power change is reported there to change after a scan, this patch > >> is supposed to fix that upon immediate tx power change but I never > >> got a report of its results. > >> > >> Feel free to follow up on that bug report. If you have something > >> that can actually measure the output power that would be best. > >> > >> Luis > >> _______________________________________________ > >> ath9k-devel mailing list > >> ath9k-devel at lists.ath9k.org > >> https://lists.ath9k.org/mailman/listinfo/ath9k-devel > >> > > > > Hi Luis, > > > > I tested this patch on two Ubiquiti Rocket M devices (AR9280 chipset) > > in this simple network configuration: > > > > Rocket1 <--wireless link--> Rocket2 > > > > I injected packets from kernel space using a VAP in monitor mode on Rocket1 > > and misured the Rx power through another VAP in monitor mode on > > Rocket2 analyzing the RSSI information reported from the driver. I > > obtained the relationship between the Rx power and the Tx one is quite > > linear when the Tx power is in the range from 3dbm to 20dbm whereas I > > got some unexpected results when I set lower Tx power values > > (0dbm-2dbm) > > Tomorrow I am going to test this patch in AP/STA mode. > > > > Regards. > > > > Lorenzo > > > > Hi Luis, > > I carried out some tests in order to verify if this patch works fine > also in AP/STA mode. > Here is my topology: > > AP = PC Engines Wrap with the latest version of OpenWRT trunk > (compat-wireless-2010-01-15) > and MikroTik Router Board R2n (Atheros AR9223 chipset) as miniPCI card > > STA = Dell Studio XPS 13 (Intel Core 2 Duo P8700, 4096MB SDRAM DDR3) > with Debian Lenny (kernel 2.6.32.3) and wireless Dell 1515 (Atheros > AR9280 chipset) > > STA <--Wireless link--> AP > > I gradually decreased the Tx power on the AP and I measured the Rx one > through the information reported by Wicd on my Dell laptop. > I obtained these results: > > 1) iwconfig wlan0 txpower 20 ---> Rx power -37dbm > 2) iwconfig wlan0 txpower 15 ---> Rx power -41dbm > 3) iwconfig wlan0 txpower 10 ---> Rx power -45dbm > 4) iwconfig wlan0 txpower 5 ---> Rx power -51dbm > 5) iwconfig wlan0 txpower 0 ---> Rx power -37dbm ???? > > Ignoring the unexpected behavior I obtained in the latest test, > in my opinion this patch works correctly. Thanks Lorenzo I'll submit this upstream now, the 0 txpower anomoly can be addressed separately. Luis