Subject: Re: ral, hostap and netbsd..
To: None <>
From: David Young <>
List: tech-net
Date: 12/09/2005 17:26:58
On Fri, Dec 09, 2005 at 10:18:59PM +0000, Martijn van Buul wrote:
> Hi.
> Now that I finally have an internet connection at home again, I picked up
> my efforts to get my wireless network into shape again. I used to be using
> a dedicated AP (Well, a wireless router, really, but I wasn't using the
> router functionality), but I wasn't overly happy with the result; I wanted
> more flexibility than it could offer me, and since my parents' router gave
> way, I donated it to them and decided to roll my own. For various reasons,
> I chose a ral-based card. First of all, I had good experiences with them,
> having used a ral-based cardbus card for quite a while on my laptop, secondly
> they're cheap, and furthermore it's the only wireless card my local hardware
> shop was selling that I was *sure* of that it was based on a supported
> chipset (Most of the rest is broadcomm).
> So, now I'm trying to have a cardbus-based ral-card talk to a PCI-based
> ral-card, and I'm not much luck. Surely, the cards do connect, but the
> result is mediocre at best. It actually works if the two machines are
> physically close to eachother, but even a single wall makes things 
> problematic. The connection becomes spotty, and will sometimes be dead
> for minutes, after which it will return to work for a while. Anything that
> might have an impact on reception will render things broken again. 
> I have no proof whatsoever, but I've got a hunch that the interfaces have
> problems negotiating a common connection speed, and will loose track of
> eachother once one of them decides that the signal strength has dropped
> under a certain threshold, only to accidentally land on the same speed after 
> a while.

The adapters don't have to match their bitrates.  Adapter A can talk
to adapter B at 5.5 Mb/s, and B to A at 1 Mb/s, and it doesn't make
a difference.

It *is* very important that adapter A does not choose a bitrate, or any
other parameter, that adapter B does not support.  net80211, if it is
used correctly by ral, will choose the bitrates and other parameters
that both adapters support.  You can view that information with wlanctl.

> Using 11b instead of 11g makes things *slightly* better, but doesn't
> solve it.  Oddly, when my laptop is running Windows, the connection is a 
> little bit more stable, and outages most definately do not last as long as 
> when it's running NetBSD. When I put a borrowed (but unconnected) access 
> point as an intermediate, things work like a charm. 

ral uses rssadapt to adapt the bit rate.  I'm telling you as the author
of rssadapt, it's not based on the latest, greatest research in bit-rate
adaptation.  Maybe rssadapt is getting mal-adapted to conditions at your
home, and causing your ral woes?  There are debug knobs that can show
you what rates it is selecting.

A better link adaptation is John Bicket's SampleRate, which is
in sys/dev/ic/athrate-sample.c.  Even better adaptations than it
are possible.  It is possible to adapt SampleRate for use by other
drivers.  atw, ral, and rtw would all benefit from a generic SampleRate
implementation; maybe others, too.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933