From owner-freebsd-current@FreeBSD.ORG Sat Sep 2 04:07:56 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 976A416A4DE for ; Sat, 2 Sep 2006 04:07:56 +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 F282043D46 for ; Sat, 2 Sep 2006 04:07:55 +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 k8247tgB037290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Sep 2006 21:07:55 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44F9039C.7060001@errno.com> Date: Fri, 01 Sep 2006 21:07:56 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: dandee@volny.cz References: <00d501c6cdfc$0d18ce60$6508280a@tocnet28.jspoj.czf> In-Reply-To: <00d501c6cdfc$0d18ce60$6508280a@tocnet28.jspoj.czf> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: current@freebsd.org Subject: Re: atheros driver: countrycode and athdebug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Sep 2006 04:07:56 -0000 Daniel Dvořák wrote: > Hello Sam, > > may I ask you for countrycode and how it works. In the madwifi driver, > currently, their driver does not work with loading the kernel module with > parametr countrycode=something, but on the madwifi.org web site, there is > information that this feature worked in past, they remarked it worked until > new hal 0.9.16.3 was committed to their source tree and it does not work > until now, when 0.9.17.2 hal is. > > http://madwifi.org/ticket/120 > > I tried to watch the problem on my FreeBSD systems and I found out that in > the FreeBSD driver, there is not chance to change anything because read-only > oid. > > roztyly# sysctl hw.ath.countrycode=203 > sysctl: oid 'hw.ath.countrycode' is read only > roztyly# sysctl dev.ath.0.countrycode > dev.ath.0.countrycode: 0 > > Is this feature planned for FreeBSD atheros driver in the future ? You can override the country code but the potential values depends on the regdomain. I thought hw.ath.countrycode was r/w but it appears you can only set via the tunable api (kenv hw.ath.countrycode=XXX). The dev.ath mib must be r/o since you cannot (yet) change this after attaching the device (the driver does not implement it). Adding support to do this is not a big deal but hasn't been done; feel free to supply a patch. > > And second question about athdebug > > It seems it does not work at all, but there are flags or bitmaps defined. > > # athdebug -i ath0 > athdebug: sysctl-get(dev.ath.0.debug): No such file or directory > # athdebug -i ath0 xmit > athdebug: sysctl-get(dev.ath.0.debug): No such file or directory > > # uname -a > FreeBSD *.*.* 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #5: Tue Aug 29 00:38:54 > CEST 2006 > /usr/obj/usr/src/sys/mykernel i386 > > # cat /usr/src/tools/tools/ath/athdebug/athdebug.c | grep "athdebug.c" > * $FreeBSD: src/tools/tools/ath/athdebug/athdebug.c,v 1.2.2.1 2006/01/31 > 20:48:20 sam Exp $ > > In the madwifi 0.9.1 release, there is propably newer version, could it help > it to commit ? > > # cat /usr/src/madwifi-0.9.1/tools/athdebug.c | grep "athdebug.c" > * $Id: athdebug.c 1539 2006-05-05 04:17:59Z jbicket $ > > > Thank you for your hard work. option ATH_DEBUG is required in your kernel config. If building as a module you'll need to patch the Makefile when it creates opt_ath.h (not sure how avoid this). Sam