Re: Wifi rates

2013-07-31 Thread Adrian Chadd
Hi,

Let's merge some more stuff into -HEAD first. it's likely there's some
RF configuration problem which we can dig into in more detail but I
can't do it whilst we've got broken Intel 5100 support (as then MY
laptop doesn't work!)

I have a spectrum analyser and I'm not afraid to use it.



-adrian

On 31 July 2013 06:36, Cedric GROSS  wrote:
> Hello,
>
>>
>> Right, there's HT elements in there, so it looks likely you properly
>> negotiated HT.
>>
>>
>> > And the amrr output :
>> > Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: non-11n node
>> > Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=0, initial rate
>> 0
>>
>> That's the initial "I don't know what you are yet" selection.
>>
>> > Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node Test
>> > kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=16, initial rate 128
>>
>> Here it negotiated 11n. The initial rate is 0x80, so MCS 0.
>>
>
> I made progress :
> Jul 31 14:59:40 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 14:59:48 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 14:59:50 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 14:59:59 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 15:00:01 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 15:00:02 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=158, retrycnt=0
> Jul 31 15:00:02 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=255, retrycnt=0
> Jul 31 15:00:03 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=260, retrycnt=4
> Jul 31 15:00:03 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=160, retrycnt=0
> Jul 31 15:00:04 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=132, retrycnt=0
> Jul 31 15:00:04 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=213, retrycnt=0
> Jul 31 15:00:05 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=203, retrycnt=0
> Jul 31 15:00:05 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=214, retrycnt=0
> Jul 31 15:00:06 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=186, retrycnt=1
> Jul 31 15:00:06 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=216, retrycnt=2
> Jul 31 15:00:07 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=243, retrycnt=1
> Jul 31 15:00:08 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=185, retrycnt=0
> Jul 31 15:00:08 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=122, retrycnt=0
> Jul 31 15:00:09 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=133, retrycnt=0
> Jul 31 15:00:09 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=185, retrycnt=2
> Jul 31 15:00:10 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=165, retrycnt=0
> Jul 31 15:00:11 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=114, retrycnt=0
> Jul 31 15:00:28 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 15:00:29 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=227, retrycnt=0
> Jul 31 15:00:29 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=255, retrycnt=0
> Jul 31 15:00:30 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=241, retrycnt=0
> Jul 31 15:00:30 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=99, retrycnt=0
> Jul 31 15:00:31 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=199, retrycnt=0
> Jul 31 15:00:31 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=111, retrycnt=2
> Jul 31 15:00:32 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=171, retrycnt=0
> Jul 31 15:00:33 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=210, retrycnt=3
> Jul 31 15:00:33 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=122, retrycnt=1
> Jul 31 15:00:34 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=218, retrycnt=0
> Jul 31 15:00:35 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=95, retrycnt=1
> Jul 31 15:00:43 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=11, retrycnt=0
> Jul 31 15:00:44 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
> 15, txcnt=22, retrycnt=0
> Jul 31 15:01:56 Test kernel: wlan0: [60:36:dd:93:34:56] amrr_node_init:
> non-11n node
> Jul 31 15:01:56 Test kernel: wlan0: [60:36:dd:93:34:56] AMRR: nrates=0,
> initial rate 0
>
> File transfer is still chaotic but start well.
> I've done a TCP dump during transfer. It's seem 

RE: Wifi rates

2013-07-31 Thread Cedric GROSS
Hello,

> 
> Right, there's HT elements in there, so it looks likely you properly
> negotiated HT.
> 
> 
> > And the amrr output :
> > Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: non-11n node
> > Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=0, initial rate
> 0
> 
> That's the initial "I don't know what you are yet" selection.
> 
> > Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node Test
> > kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=16, initial rate 128
> 
> Here it negotiated 11n. The initial rate is 0x80, so MCS 0.
> 

I made progress :
Jul 31 14:59:40 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 14:59:48 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 14:59:50 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 14:59:59 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 15:00:01 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 15:00:02 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=158, retrycnt=0
Jul 31 15:00:02 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=255, retrycnt=0
Jul 31 15:00:03 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=260, retrycnt=4
Jul 31 15:00:03 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=160, retrycnt=0
Jul 31 15:00:04 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=132, retrycnt=0
Jul 31 15:00:04 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=213, retrycnt=0
Jul 31 15:00:05 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=203, retrycnt=0
Jul 31 15:00:05 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=214, retrycnt=0
Jul 31 15:00:06 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=186, retrycnt=1
Jul 31 15:00:06 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=216, retrycnt=2
Jul 31 15:00:07 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=243, retrycnt=1
Jul 31 15:00:08 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=185, retrycnt=0
Jul 31 15:00:08 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=122, retrycnt=0
Jul 31 15:00:09 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=133, retrycnt=0
Jul 31 15:00:09 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=185, retrycnt=2
Jul 31 15:00:10 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=165, retrycnt=0
Jul 31 15:00:11 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=114, retrycnt=0
Jul 31 15:00:28 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 15:00:29 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=227, retrycnt=0
Jul 31 15:00:29 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=255, retrycnt=0
Jul 31 15:00:30 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=241, retrycnt=0
Jul 31 15:00:30 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=99, retrycnt=0
Jul 31 15:00:31 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=199, retrycnt=0
Jul 31 15:00:31 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=111, retrycnt=2
Jul 31 15:00:32 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=171, retrycnt=0
Jul 31 15:00:33 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=210, retrycnt=3
Jul 31 15:00:33 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=122, retrycnt=1
Jul 31 15:00:34 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=218, retrycnt=0
Jul 31 15:00:35 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=95, retrycnt=1
Jul 31 15:00:43 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=11, retrycnt=0
Jul 31 15:00:44 Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate
15, txcnt=22, retrycnt=0
Jul 31 15:01:56 Test kernel: wlan0: [60:36:dd:93:34:56] amrr_node_init:
non-11n node
Jul 31 15:01:56 Test kernel: wlan0: [60:36:dd:93:34:56] AMRR: nrates=0,
initial rate 0

File transfer is still chaotic but start well.
I've done a TCP dump during transfer. It's seem that TCP window fill up and
it's why transfer stop and speed going down.
Sometime transfer restart, sometime just hang.

Just to be sure: window size value in TCP packet is the window size
available from emitter ?

> 
> 
> -adrian

Cedric

___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Wifi rates

2013-07-30 Thread Adrian Chadd
On 30 July 2013 02:33, Cedric GROSS  wrote:

> [root@Test]/root#ifconfig -v wlan0 list sta
> ADDR   AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG
> 00:24:d4:97:80:2025   6M 18.50   1162  58480 EP   AQEHTRS
> SSID RATES B22,12,18,24,36> DSPARMS<5> ERP<0x4> XRATES<48,72,96,108> RSN uc:AES-CCMP km:8021X-PS
> K> HTCAP
> HTINFO asicmcs[]> WME cwmin 4 cwmax 10 txop 0] V
> O[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]>

Right, there's HT elements in there, so it looks likely you properly
negotiated HT.


> And the amrr output :
> Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: non-11n node
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=0, initial rate 0

That's the initial "I don't know what you are yet" selection.

> Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=16, initial rate 128

Here it negotiated 11n. The initial rate is 0x80, so MCS 0.

> Test kernel: wlan0: [00:24:d4:97:80:20] recv auth frame with algorithm 0 seq
> 2
> Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=16, initial rate 128
> Test kernel: wlan0: link state changed to UP
> Test dhclient: New IP Address (wlan0): 192.168.1.20
> Test dhclient: New Subnet Mask (wlan0): 255.255.255.0
> Test dhclient: New Broadcast Address (wlan0): 192.168.1.255
> Test dhclient: New Routers (wlan0): 192.168.1.254
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate 15, txcnt=12,
> retrycnt=144

The rate index starts at MCS0.

> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR decreasing rate 14 (txcnt=12
> retrycnt=144)
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate 14, txcnt=12,
> retrycnt=192
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR decreasing rate 13 (txcnt=12
> retrycnt=192)
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate 13, txcnt=11,
> retrycnt=176
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR decreasing rate 12 (txcnt=11
> retrycnt=176)
> ...
> And so on until
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate 0, txcnt=11,
> retrycnt=176
> Test last message repeated 2 times
> Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: current rate 0, txcnt=12,
> retrycnt=192

And since there's errors at all transmission rates (look at the
retrycnt), it eventually drops you down to 1mb.

> What is 'nrates' and 'rate' in start of output ? Is nrates an index in rate
> table ?

Yes, look in ieee80211_phy.c .

> After the dhclient, I started a ftp file transfer. As you can see rate
> decrease to 0 very quickly.
> Is the 'current rate' same as initial nrates value ?

Nope. The debugging isn't very clear and I should fix it. But it's
starting in the 11n rate table at MCS0 and it's going down very
quickly into the non-11n rates.

> I've found this for MCS :
> http://www.digitalairwireless.com/wireless-blog/recent/demystifying-modulati
> on-and-coding-scheme-index-values.html

MCS is the 11n encoding scheme.

So you're seeing significant transmit retries. That's worth investigating.

(We still have to merge more code into -HEAD though.)



-adrian
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


RE: Wifi rates

2013-07-30 Thread Cedric GROSS
> De : adrian.ch...@gmail.com [mailto:adrian.ch...@gmail.com] De la part
> de Adrian Chadd
> Envoyé : lundi 29 juillet 2013 21:08
> À : Cedric GROSS
> Cc : freebsd-wireless@freebsd.org
> Objet : Re: Wifi rates
> 
> 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.

Right :
[root@Test]/root#ifconfig -v wlan0
wlan0: flags=8843 metric 0 mtu 1500
ether 60:36:dd:93:34:56
inet 192.168.1.20 netmask 0xff00 broadcast 192.168.1.255
nd6 options=29
media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
status: associated
ssid WLenine channel 5 (2432 MHz 11g ht/20) bssid 00:24:d4:97:80:20
regdomain 0 country US anywhere -ecm authmode WPA2/802.11i -wps -tsn
privacy ON deftxkey UNDEF
AES-CCM 2:128-bit powersavemode OFF powersavesleep 100 txpower 15
txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 10
11a ucast NONEmgmt  6 Mb/s mcast  6 Mb/s maxretry 6
11b ucast NONEmgmt  1 Mb/s mcast  1 Mb/s maxretry 6
11g ucast NONEmgmt  1 Mb/s mcast  1 Mb/s maxretry 6
turboA  ucast NONEmgmt  6 Mb/s mcast  6 Mb/s maxretry 6
turboG  ucast NONEmgmt  1 Mb/s mcast  1 Mb/s maxretry 6
sturbo  ucast NONEmgmt  6 Mb/s mcast  6 Mb/s maxretry 6
11naucast NONEmgmt 12 MCS  mcast 12 MCS  maxretry 6
11ngucast NONEmgmt  2 MCS  mcast  2 MCS  maxretry 6
halfucast NONEmgmt  3 Mb/s mcast  3 Mb/s maxretry 6
quarter ucast NONEmgmt  1 Mb/s mcast  1 Mb/s maxretry 6
scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250
roam:11a rssi7dBm rate 12 Mb/s
roam:11b rssi7dBm rate  1 Mb/s
roam:11g rssi7dBm rate  5 Mb/s
roam:turboA  rssi7dBm rate 12 Mb/s
roam:turboG  rssi7dBm rate 12 Mb/s
roam:sturbo  rssi7dBm rate 12 Mb/s
roam:11narssi7dBm  MCS  1
roam:11ngrssi7dBm  MCS  1
roam:halfrssi7dBm rate  6 Mb/s
roam:quarter rssi7dBm rate  3 Mb/s
-pureg protmode CTS ht htcompat ampdu ampdulimit 64k ampdudensity NA
-amsdutx amsdurx shortgi htprotmode RTSCTS -puren -smps -rifs wme
-burst -dwds roaming MANUAL bintval 96
AC_BE cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm ack
  cwmin  4 cwmax 10 aifs  3 txopLimit   0 -acm
AC_BK cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm ack
  cwmin  4 cwmax 10 aifs  7 txopLimit   0 -acm
AC_VI cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm ack
  cwmin  3 cwmax  4 aifs  2 txopLimit  94 -acm
AC_VO cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm ack
  cwmin  2 cwmax  3 aifs  2 txopLimit  47 -acm
groups: wlan

[root@Test]/root#ifconfig -v wlan0 list sta
ADDR   AID CHAN RATE RSSI IDLE  TXSEQ  RXSEQ CAPS FLAG
00:24:d4:97:80:2025   6M 18.50   1162  58480 EP   AQEHTRS
SSID RATES DSPARMS<5> ERP<0x4> XRATES<48,72,96,108> RSN HTCAP
HTINFO WME

[root@Test]/root#ifconfig -v wlan0 list chan
Channel   5 : 2432  MHz 11b
Channel   5 : 2432  MHz 11g
Channel   5 : 2432  MHz 11g ht/20
Channel   5 : 2432  MHz 11g ht/40+
Channel   5 : 2432  MHz 11g ht/40-

And the amrr output :
Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: non-11n node
Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=0, initial rate 0
Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node
Test kernel: wlan0: [00:24:d4:97:80:20] AMRR: nrates=16, initial rate 128
Test kernel: wlan0: [00:24:d4:97:80:20] recv auth frame with algorithm 0 seq
2
Test kernel: wlan0: [00:24:d4:97:80:20] amrr_node_init: 11n node
Test kernel: wlan0: [00:24:d4:97:80:20

Re: Wifi rates

2013-07-29 Thread Adrian Chadd
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  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-unsubscr...@freebsd.org"
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"