From owner-freebsd-stable@FreeBSD.ORG Sat Apr 29 23:00:55 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74BE316A402 for ; Sat, 29 Apr 2006 23:00:55 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id B82D743D48 for ; Sat, 29 Apr 2006 23:00:54 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.199] ([10.0.0.199]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k3TN0rB0056267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 29 Apr 2006 16:00:54 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4453F025.90001@errno.com> Date: Sat, 29 Apr 2006 16:00:53 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060308) MIME-Version: 1.0 To: JoaoBR References: <200604252258.k3PMwJ74026969@monk.cnd.dundas.on.ca> <444EF0C7.8040407@errno.com> <200604291825.17780.joao@matik.com.br> In-Reply-To: <200604291825.17780.joao@matik.com.br> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: ath0: ath_chan_set: unable to reset channel 5 (2432 Mhz, flags 0x3e0 hal flags 0x140) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Apr 2006 23:00:55 -0000 JoaoBR wrote: > On Wednesday 26 April 2006 01:02, Sam Leffler wrote: > >> Attached are two patches; one for the ath driver and another for >> sys/net80211/ieee80211.c in releng6 (note changes to the latter in head >> are different). I believe this will resolve your problem; you can check >> by updating your code and looking at what ifconfig ath0 list chan gives >> you. >> > > I checked now with an unaltered ag530 (regdomain18) and look how strange > > Channel 1 : 2412 Mhz 11g Channel 136 : 4942* Mhz 11a > Channel 2 : 2417 Mhz 11g Channel 136 : 4945* Mhz 11a > Channel 3 : 2422 Mhz 11g Channel 136 : 4950* Mhz 11a > Channel 4 : 2427 Mhz 11g Channel 137 : 4955* Mhz 11a > Channel 5 : 2432 Mhz 11g Channel 137 : 4960* Mhz 11a > Channel 6 : 2437 Mhz 11g Channel 137 : 4965* Mhz 11a > Channel 7 : 2442 Mhz 11g Channel 137 : 4970* Mhz 11a > Channel 8 : 2447 Mhz 11g Channel 138 : 4975* Mhz 11a > Channel 9 : 2452 Mhz 11g Channel 138 : 4980* Mhz 11a > Channel 10 : 2457 Mhz 11g Channel 138 : 4985* Mhz 11a > Channel 11 : 2462 Mhz 11g > > the 5,3 and 5.8Ghz range is gone > > > this card should show the 2.4b/g range as usual, the 4.9, the 5.3 and the 5.8 > range regdomain 18 gives you b/g channels 1-11 and public safety channels in the range 4942-4985. What you are seeing is that ifconfig does not know how to handle mapping the public safety channels to ieee channel numbers. > > > > ath sysctl from this machine > > hw.ath.hal.swba_backoff: 0 > hw.ath.hal.sw_brt: 10 > hw.ath.hal.dma_brt: 2 > hw.ath.hal.version: 0.9.16.16 > hw.ath.txbuf: 100 > hw.ath.rxbuf: 40 > hw.ath.regdomain: 0 > hw.ath.countrycode: 0 > hw.ath.xchanmode: 1 > hw.ath.outdoor: 1 > hw.ath.calibrate: 30 > hw.ath.dwell: 200 > user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin: > dev.ath.0.%desc: Atheros 5212 > dev.ath.0.%driver: ath > dev.ath.0.%location: slot=8 function=0 > dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x1186 > subdevice=0x3a14 class=0x020000 > dev.ath.0.%parent: pci0 > dev.ath.0.rate_interval: 1000 > dev.ath.0.rate_raise: 10 > dev.ath.0.rate_raise_threshold: 10 > dev.ath.0.countrycode: 0 > dev.ath.0.regdomain: 18 > dev.ath.0.slottime: 20 > 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: 2 > dev.ath.0.diversity: 0 > 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.monpass: 24 > > > > > setting 0x10 I get then > > Channel 1 : 2412 Mhz 11g Channel 48 : 5240 Mhz 11a > Channel 2 : 2417 Mhz 11g Channel 50 : 5250 Mhz 11a Turbo > Channel 3 : 2422 Mhz 11g Channel 52 : 5260 Mhz 11a > Channel 4 : 2427 Mhz 11g Channel 56 : 5280 Mhz 11a > Channel 5 : 2432 Mhz 11g Channel 58 : 5290 Mhz 11a Turbo > Channel 6 : 2437 Mhz 11g Channel 60 : 5300 Mhz 11a > Channel 7 : 2442 Mhz 11g Channel 64 : 5320 Mhz 11a > Channel 8 : 2447 Mhz 11g Channel 149 : 5745 Mhz 11a > Channel 9 : 2452 Mhz 11g Channel 152 : 5760 Mhz 11a Turbo > Channel 10 : 2457 Mhz 11g Channel 153 : 5765 Mhz 11a > Channel 11 : 2462 Mhz 11g Channel 157 : 5785 Mhz 11a > Channel 36 : 5180 Mhz 11a Channel 160 : 5800 Mhz 11a Turbo > Channel 40 : 5200 Mhz 11a Channel 161 : 5805 Mhz 11a > Channel 42 : 5210 Mhz 11a Turbo Channel 165 : 5825 Mhz 11a > Channel 44 : 5220 Mhz 11a > > ath sysctl from this machine: > > hw.ath.hal.swba_backoff: 0 > hw.ath.hal.sw_brt: 10 > hw.ath.hal.dma_brt: 2 > hw.ath.hal.version: 0.9.16.16 > hw.ath.txbuf: 100 > hw.ath.rxbuf: 40 > hw.ath.regdomain: 0 > hw.ath.countrycode: 0 > hw.ath.xchanmode: 1 > hw.ath.outdoor: 1 > hw.ath.calibrate: 30 > hw.ath.dwell: 200 > dev.ath.0.%desc: Atheros 5212 > dev.ath.0.%driver: ath > dev.ath.0.%location: slot=11 function=0 > dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x1186 > subdevice=0x3a14 class=0x020000 > dev.ath.0.%parent: pci0 > dev.ath.0.rate_interval: 1000 > dev.ath.0.rate_raise: 10 > dev.ath.0.rate_raise_threshold: 10 > dev.ath.0.countrycode: 0 > dev.ath.0.regdomain: 16 > dev.ath.0.slottime: 20 > 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: 0 > 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.monpass: 24 It turns out that handling this correctly is more involved than I remembered. Not only are the public safety channels special in their freq<->ieee# mapping but they also require 1/4- and 1/2-speed tx rates. The linux code handles this but it's done with some awkward code that I'd prefer to cleanup before integrating into freebsd. Regardless I suspect most people aren't going to use these channels since they require a special license (search for "public safety channels" and you'll find the relevant documentation). To be honest I have no idea why vendors are shipping cards with these channels enabled. I can hack the ath driver to just ignore the public safety channels and may do that. Otherwise it seems like the best thing is to change the regdomain in the eeprom (those who don't know how can find it with a search engine). Sam