From owner-freebsd-wireless@FreeBSD.ORG Tue Jul 30 17:19:28 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C01CF219 for ; Tue, 30 Jul 2013 17:19:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44E3A2044 for ; Tue, 30 Jul 2013 17:19:28 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id a12so2462476wgh.6 for ; Tue, 30 Jul 2013 10:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=SKHboYZ+XJJbaw6TH5YKWJxqwJFpDNBixRr8XTmRFmk=; b=JuxQQsdJCa6rg2ibqBdF5OfvSSoZGxwb+i2LTy8C78u/ih+/0/LGB7W3itGekGtK6r KJH4/N3kQC+4xt7b8lyyFCmsnIoz3mkAAx21Cxa0AXephEYyxTVhaxE33GSdgZMxJd/l /3xe7nXXK58X2ieziXV43emIdAL9+gxdRHsOJltIEI+7KREnMrz+iSqsIcrGvuH7xMY0 5FPgk8XALjg0J2+baVCHcSnHy4R1l9iCZR1AgvJThZ4n6dHA1hKbkOO7AQ34GG+06H9X 5FE7gmRgu/pwA6NKRT7oZ//nWO6l5miqZqME+vvFhE6QTUq7C2+mLVFx17fSlMZLTh/J p91w== MIME-Version: 1.0 X-Received: by 10.180.39.212 with SMTP id r20mr1691449wik.30.1375204766352; Tue, 30 Jul 2013 10:19:26 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Tue, 30 Jul 2013 10:19:26 -0700 (PDT) In-Reply-To: <000c01ce8d07$d10a6550$731f2ff0$@info> References: <00b101ce8c8b$3db5f200$b921d600$@info> <000c01ce8d07$d10a6550$731f2ff0$@info> Date: Tue, 30 Jul 2013 10:19:26 -0700 X-Google-Sender-Auth: FEyB4CwyuKWt7YNwtFyrVH7EBDE Message-ID: Subject: Re: Wifi rates From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 17:19:28 -0000 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:20 2 5 6M 18.5 0 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