From nobody@FreeBSD.org  Sun Aug  3 15:32:51 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A828E1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Aug 2008 15:32:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B81C8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Aug 2008 15:32:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m73FWnK7097662
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 3 Aug 2008 15:32:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m73FWn7E097660;
	Sun, 3 Aug 2008 15:32:49 GMT
	(envelope-from nobody)
Message-Id: <200808031532.m73FWn7E097660@www.freebsd.org>
Date: Sun, 3 Aug 2008 15:32:49 GMT
From: Mohammad Ikram <ikram@wideband.com.pk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: txpower problem with Atheros wifi card
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         126214
>Category:       kern
>Synopsis:       [ath] txpower problem with Atheros wifi card
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-wireless
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 03 15:40:02 UTC 2008
>Closed-Date:    Sat Apr 16 05:25:56 UTC 2011
>Last-Modified:  Sat Apr 16 05:25:56 UTC 2011
>Originator:     Mohammad Ikram
>Release:        7.0
>Organization:
WIDEBAND
>Environment:
FreeBSD WIDEBAND-AP.wideand.com.pk 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386   (date and time are not set on the machine)
>Description:
I am using a wireless card. EPI-EN360S1 with Atheros chipset. The card
has a reported ouput power of 27dBm. 

WIDEBAND-AP# ifconfig -v ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:02:6f:4c:83:bd
        inet 192.168.20.1 netmask 0xffffff00 broadcast 192.168.20.255
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11b <hostap>
        status: associated
        ssid WIDEBAND-ATH channel 2 (2417 Mhz 11b) bssid 00:02:6f:4c:83:bd
        authmode OPEN privacy OFF deftxkey UNDEF powersavemode OFF
        powersavesleep 100 txpower 31.5 txpowmax 18.0 rtsthreshold 2346
        fragthreshold 2346 bmiss 7 scanvalid 60 bgscan bgscanintvl 300
        bgscanidle 250 roam:rssi11a 7 roam:rate11a 12 roam:rssi11b 7
        roam:rate11b 1 roam:rssi11g 7 roam:rate11g 5 -pureg protmode RTSCTS
        -ht -htcompat -ampdu ampdulimit 8k ampdudensity - -amsdu -shortgi
        htprotmode RTSCTS -puren -wme burst -ff -dturbo -hidessid apbridge
        dtimperiod 1 doth inact bintval 100

FreeBSD is only able to raise its power to 18dBm as shown by 'ifconfig
-v ath0'.  I tried it on a Linux Machine (madwifi 0.9.4) with same results
maximum 18dBm.  When i used the latest ath9k drivers on a linux machine
it took the power to 27dBm.  I tried the commercial Router OS (Mikrotik)
which suggested that it has take power level to 27dBm.  Now after searching
the mailing lists some people had suggested that whatever the ifconfig
suggests is incorrect and the txpower is up to its full.

I do not have any spectrum analyzer to measure the output power, but the
results the with ROUTER OS were much much better (at the distance of
1.2 Km i was able to establish a link of 4 Mbps with ROUTER OS & with
FreeBSD a sloppy 256 Kbps (AP ROUTER OS & FreeBSD with omni/client
Windows Dell D505 Laptop).

I tried PFSense but with same results.

I tried many different parameters (antenna, diversity, tpc etc) with
sysctl, but just could not get any close to what ROUTER OS was able to
perform, here is the ouput from

WIDEBAND-AP# sysctl -a | grep ath
kern.clockrate: { hz = 1000, tick = 1000, profhz = 666, stathz = 133 }
kern.init_path: /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall
kern.module_path: /boot/kernel;/boot/modules
vfs.nfs.diskless_rootpath:
vfs.cache.numfullpathfound: 45
vfs.cache.numfullpathfail4: 0
vfs.cache.numfullpathfail2: 0
vfs.cache.numfullpathfail1: 0
vfs.cache.numfullpathcalls: 45
vfs.nfsrv.gatherdelay_v3: 0
vfs.nfsrv.gatherdelay: 10000
net.inet.tcp.path_mtu_discovery: 1
net.inet.sctp.path_rtx_max: 5
net.wlan.0.%parent: ath0
debug.disablefullpath: 0
hw.ath.hal.swba_backoff: 0
hw.ath.hal.sw_brt: 10
hw.ath.hal.dma_brt: 2
hw.ath.hal.version: 0.9.20.3
hw.ath.txbuf: 200
hw.ath.rxbuf: 40
hw.ath.regdomain: 0
hw.ath.countrycode: 0
hw.ath.xchanmode: 1
hw.ath.outdoor: 1
hw.ath.calibrate: 30
user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin:
dev.npx.0.%desc: math processor
dev.ath.0.%desc: Atheros 5212
dev.ath.0.%driver: ath
dev.ath.0.%location: slot=1 function=0
dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x168c subdevice=0x2051 class=0x020000
dev.ath.0.%parent: pci4
dev.ath.0.smoothing_rate: 95
dev.ath.0.sample_rate: 10
dev.ath.0.countrycode: 0
dev.ath.0.regdomain: 55
dev.ath.0.slottime: 9
dev.ath.0.acktimeout: 48
dev.ath.0.ctstimeout: 48
dev.ath.0.softled: 0
dev.ath.0.ledpin: 0
dev.ath.0.ledon: 0
dev.ath.0.ledidle: 2700
dev.ath.0.txantenna: 0
dev.ath.0.rxantenna: 1
dev.ath.0.diversity: 1
dev.ath.0.txintrperiod: 5
dev.ath.0.diag: 0
dev.ath.0.tpscale: 0
dev.ath.0.tpc: 0
dev.ath.0.tpack: 63
dev.ath.0.tpcts: 63
dev.ath.0.fftxqmin: 2
dev.ath.0.fftxqmax: 50
dev.ath.0.monpass: 24
WIDEBAND-AP#


>How-To-Repeat:
Just add a high power PCI Atheros based Card
>Fix:
Maximum txpower should be ablel to be achived.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-net 
Responsible-Changed-By: remko 
Responsible-Changed-When: Sun Aug 3 16:03:26 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126214 
Responsible-Changed-From-To: freebsd-net->freebsd-wireless 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Mon Apr 11 23:26:05 UTC 2011 
Responsible-Changed-Why:  
change resp. to new mailing list 

http://www.freebsd.org/cgi/query-pr.cgi?pr=126214 

From: Adrian Chadd <adrian@freebsd.org>
To: Mohammad Ikram <ikram@wideband.com.pk>
Cc: bug-followup@freebsd.org
Subject: Re: kern/126214: [ath] txpower problem with Atheros wifi card
Date: Wed, 13 Apr 2011 09:51:37 +0800

 --001517448092a1223404a0c30cd9
 Content-Type: text/plain; charset=ISO-8859-1
 
 Hi,
 
 I've been looking at fixing the issues with the atheros driver/HAL code.
 
 Do you still have the card? Would you mind trying out -HEAD?
 
 Please note that if it's an AR5212 then ath9k shouldn't be working with it
 as ath9k only supports AR5416 and later NICs.
 
 I've verified that the AR5213-based SR-2 from Ubiquiti works at its rated TX
 power.
 
 Thanks,
 
 
 Adrian
 
 --001517448092a1223404a0c30cd9
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Hi,<br><br>I&#39;ve been looking at fixing the issues with the atheros driv=
 er/HAL code.<br><br>Do you still have the card? Would you mind trying out -=
 HEAD?<br><br>Please note that if it&#39;s an AR5212 then ath9k shouldn&#39;=
 t be working with it as ath9k only supports AR5416 and later NICs.<br>
 <br>I&#39;ve verified that the AR5213-based SR-2 from Ubiquiti works at its=
  rated TX power.<br><br>Thanks,<br><br><br>Adrian<br>
 
 --001517448092a1223404a0c30cd9--
State-Changed-From-To: open->closed 
State-Changed-By: adrian 
State-Changed-When: Sat Apr 16 05:24:35 UTC 2011 
State-Changed-Why:  
Unresolved - senders domain doesn't resolve any longer. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=126214 
>Unformatted:
