Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2013 12:08:07 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Cedric GROSS <cg@cgross.info>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: Wifi rates
Message-ID:  <CAJ-Vmo=y609_w2dMyLkgOpd24poRJKqn=LPW%2BQGi7z346xTZrQ@mail.gmail.com>
In-Reply-To: <00b101ce8c8b$3db5f200$b921d600$@info>
References:  <00b101ce8c8b$3db5f200$b921d600$@info>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

So the trick here is that iwn uses the net80211 rate control API for
doing things.

Look at if_iwn.c for "ratectl". There's a spot in the TX path where it
calls it to look up the rate.

It then converts that rate to the iwn PLCP format for the given
transmission rate. You can google "PLCP". Intel has a few extra bits
in that field for controlling the NIC behaviour. THat bit is straight
forward.

Anyway - the trick here is that the net80211 rate control (amrr by
default) is going to be selecting transmission rates. You can see the
current rate by doing 'ifconfig wlan0 list sta'. Now, if you're
running -HEAD net80211 / iwn then AMRR knows about 11n and if_iwn will
happily use it. In the past it was hackier - AMRR didn't know about
11n rates and so iwn "faked" things by pretending it was doing
non-11n, and then translating these to 11n rates. Hopefully you're
running -HEAD and this is no longer a problem.

So - do an "ifconfig -v wlan0 list sta" to list the station
negotiation. It looks like it's doing 11ng but its downgraded to 11n.

If you have IEEE80211_DEBUG defined in your kernel config - and you're
building the modules correctly, rather than just "make" in the modules
directory, which is _not the correct way_ - then you can use
"wlandebug -i wlanX +rate" to see the AMRR rate selection debugging.
Do that before you associate and it'll tell you as it's making rate
decisions.

HTH,



-adrian


On 29 July 2013 11:41, Cedric GROSS <cg@cgross.info> wrote:
> Hello,
>
>
>
> Part of splitting work, I continue to investigate on my side for my NIC
> (Centrino 2230).
>
>
>
> I notice that from ifconfig wlan0 :
>
> media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11ng
>
>
>
> Rate is very slow and should be 54Mbps.
>
>
>
> I try to understand how rates is determined but it's really a mess.
>
> So first question : From where ifconfig get rate ?
>
>
>
> What's CCK, MCS, plcp stand for and what is relationship with rate ?
>
>
>
> I try following linux kernel also but it's  a nightmare.
>
>
>
> Thanks.
>
>
>
> Cedric
>
> _______________________________________________
> freebsd-wireless@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=y609_w2dMyLkgOpd24poRJKqn=LPW%2BQGi7z346xTZrQ>