From owner-freebsd-mobile@FreeBSD.ORG Sat Mar 15 16:28:43 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2563106564A for ; Sat, 15 Mar 2008 16:28:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 74D368FC15 for ; Sat, 15 Mar 2008 16:28:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m2FGSg45066380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Mar 2008 09:28:42 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <47DBF93A.3060905@freebsd.org> Date: Sat, 15 Mar 2008 09:28:42 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Markus Dolze References: <20080315133937.139370@gmx.net> In-Reply-To: <20080315133937.139370@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: freebsd-mobile@freebsd.org Subject: Re: ath card with two antennas and rfkill question X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 16:28:43 -0000 Markus Dolze wrote: > Hello, > > I recently got a Compex WLM54G mini-pci card for my Toshiba 6100. I connected the two internal antennas the laptop has and the card if working fine, except that the laptop's "wireless switch" does not work. I cannot turn the radio off (better this than the other way round). I remember having read that this switch is connected to one of the mini-pci pins and signals the card to turn off the radio. Why doesn't it work then? Or is it a software / driver issue? > rfkill is handled several different ways and there is no automatic way for the driver to arrange handling (e.g. by reading the eeprom). If the switch is delivering a gpio interrupt then the current driver doesn't support that. What you need to do is identify the gpio pin+polarity and then add a handler to ath_intr to turn the radio on+off. If you want to pursue that contact me off-line for help (none of my laptops have this setup). > My system is: 'FreeBSD kirika.zzz.de 6.3-RELEASE FreeBSD 6.3-RELEASE #2: Mon Jan 21 23:49:38 CET 2008 root@zzz.de:/usr/obj/usr/src/sys/KIRIKA i386' > > 'sysctl dev.ath.0' shows (amoung others): > dev.ath.0.%desc: Atheros 5212 > dev.ath.0.%driver: ath > dev.ath.0.%location: slot=10 function=0 handle=\_SB_.PCI0.PCIB.MPC0 > dev.ath.0.%pnpinfo: vendor=0x168c device=0x001a subvendor=0x168c subdevice=0x2052 class=0x020000 > dev.ath.0.%parent: pci2 > dev.ath.0.countrycode: 0 > dev.ath.0.txantenna: 0 > dev.ath.0.rxantenna: 1 > dev.ath.0.diversity: 1 > > I am wondering as well: What are the countrycode, tx/rxantenna and diversity settings for? I found no documentation about these. Or are these settings read-only? How are the antenna numbers counted? Should I have 'txantenna=1'? > > What does the 'countrycode' do and should I set any value (like 49 for Germany)? > The initial values are those read from the eeprom. They define the set of channels and tx power caps for the device. It's possible to override them but your existing setup should give you coverage for Germany (google for help or look in my sam_vap branch in p4). Diversity controls rx diversity. If the hardware has fast diversity support then it'll be set; otherwise the driver will compensate w/ a software algorithm. This sysctl is r/w. txantenna controls whether a fixed transmit antenna is used on outbound frames. Leave it as zero so the hardware will automatically flip antenna ports on retransmits unless you've got an application that uses a single antenna (e.g. p2p link). rxantenna identifies the default rx antenna the hardware will use. When diversity is enabled this is not important. sysctl -d should give explanations of all sysctl knobs. There are plans to promote some of these sysctl knobs to the net80211 layer and expose them through ifconfig at which point they'll be documented in the man page. Sam