From owner-freebsd-current@FreeBSD.ORG Tue Aug 5 16:05:15 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7B511065671 for ; Tue, 5 Aug 2008 16:05:15 +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 3A0798FC1E for ; Tue, 5 Aug 2008 16:05:15 +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 m75G5Elt051390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Aug 2008 09:05:14 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48987A3A.3030506@freebsd.org> Date: Tue, 05 Aug 2008 09:05:14 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: David Naylor References: <200808042213.19795.naylor.b.david@gmail.com> In-Reply-To: <200808042213.19795.naylor.b.david@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: freebsd-current@freebsd.org Subject: Re: ral, rum and bi-antenna 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: Tue, 05 Aug 2008 16:05:15 -0000 David Naylor wrote: > Hi, > > I happen to have the good fortune of owning a RT2661S (ral driver) and a > RT2601USB (rum driver) [manufactured by Canyon]. Both chipsets have the > ability to handle two antenna. > > Now the good fortune, both chipsets default to the wrong antenna. When I > should be getting a stable connection at about -70dBm instead I am getting > very poor connection (less than 50% connectivity, reported from ping) and > about -90dBm. > > After looking at the FreeBSD driver code (and the [Open/Net]BSD) the antenna > selection is marked as *TBD*. Does anyone know how to add antenna selection > (the ralink linux drivers are a wild maze). I considered trying to do it > myself but I do not know the first thing about kernel hacking (let alone > chipset drivers) and have no idea where to start. > > I was thinking a stop-gap solution will be to have the antenna selectable > using tunables/sysctl? > > Needless to say I am very willing to try any patches (and even attempt to > create one myself if someone could point me in the right direction...). > So far as I know the hardware provides no help in this area; e.g. like switching antenna ports on retry attempts or reporting which antenna was used to tx/rx a frame. I don't even know if the h/w does rx diversity. I believe the ralink drivers for these chips do some form of s/w diversity or antenna switching. Otherwise you can certainly hookup a sysctl to fix the antenna; ath has code to do this you can crib. At some point we'll get around to hooking up ifconfig (I've delayed as MIMO makes this api slightly more involved then pick one of auto, 0, 1). But the bigger question is why you're seeing such a difference when locking tx to one port or another; it sounds like the antenna design on your card is highly directional. This is not unexpected for USB devices where every penny is scrimped in design+manufacture but cardbus cards typically are better. Cardbus cards often have U.FL connectors under the sheath so if you're willing to canibalize your card you can remove the sheath and attach good antennae to see if you get better behaviour. > Regards > > David > > P.S. Anyone know the release schedule for 6.4 and 7.1? >