> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 60:36:dd:93:34:56 inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 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 NONE mgmt 6 Mb/s mcast 6 Mb/s maxretry 6 11b ucast NONE mgmt 1 Mb/s mcast 1 Mb/s maxretry 6 11g ucast NONE mgmt 1 Mb/s mcast 1 Mb/s maxretry 6 turboA ucast NONE mgmt 6 Mb/s mcast 6 Mb/s maxretry 6 turboG ucast NONE mgmt 1 Mb/s mcast 1 Mb/s maxretry 6 sturbo ucast NONE mgmt 6 Mb/s mcast 6 Mb/s maxretry 6 11na ucast NONE mgmt 12 MCS mcast 12 MCS maxretry 6 11ng ucast NONE mgmt 2 MCS mcast 2 MCS maxretry 6 half ucast NONE mgmt 3 Mb/s mcast 3 Mb/s maxretry 6 quarter ucast NONE mgmt 1 Mb/s mcast 1 Mb/s maxretry 6 scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:11a rssi 7dBm rate 12 Mb/s roam:11b rssi 7dBm rate 1 Mb/s roam:11g rssi 7dBm rate 5 Mb/s roam:turboA rssi 7dBm rate 12 Mb/s roam:turboG rssi 7dBm rate 12 Mb/s roam:sturbo rssi 7dBm rate 12 Mb/s roam:11na rssi 7dBm MCS 1 roam:11ng rssi 7dBm MCS 1 roam:half rssi 7dBm rate 6 Mb/s roam:quarter rssi 7dBm 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:20 2 5 6M 18.5 0 1162 58480 EP AQEHTRS SSID<WLenine> RATES<B2,B4,B11, B22,12,18,24,36> DSPARMS<5> ERP<0x4> XRATES<48,72,96,108> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PS K> HTCAP<cap 0x6c param 0x3 mcsset[0-23,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 5, 0,7,0,0 b asicmcs[]> WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 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]> [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] 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 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 What is 'nrates' and 'rate' in start of output ? Is nrates an index in rate table ? 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 ? I've found this for MCS : http://www.digitalairwireless.com/wireless-blog/recent/demystifying-modulati on-and-coding-scheme-index-values.html _______________________________________________ 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"