Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 09:28:42 -0700
From:      Sam Leffler <sam@freebsd.org>
To:        Markus Dolze <bsdfan@nurfuerspam.de>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: ath card with two antennas and rfkill question
Message-ID:  <47DBF93A.3060905@freebsd.org>
In-Reply-To: <20080315133937.139370@gmx.net>
References:  <20080315133937.139370@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47DBF93A.3060905>