From owner-freebsd-wireless@FreeBSD.ORG Mon Jul 29 19:08:09 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 A2EC97F2 for ; Mon, 29 Jul 2013 19:08:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3B2B92993 for ; Mon, 29 Jul 2013 19:08:09 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id f14so1269788wiw.7 for ; Mon, 29 Jul 2013 12:08:07 -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=/eF6Po/rUfht5Atfjkjj9jE2FpBa3Rl5JHMpxvlIfYk=; b=CgmtwIIj1d2iNBmfPq+bhm7fserYpHd1Sn+P32WFqHT2/LcbgmirF/QXmfLwykdfTc V8iAvvG5+ylN5eGajApShrzHKiCzAh/8D1wRmnn7iRoJQ8Yga0FBStaewa32x+fVQgip VkxXVOLrbtCQL8RJEZ39C/wMpOYbz3w8kwXRO20fzSHQti3pe8F3Z5QaHJJU3Lt5+iln IO+fEiwC1U4iy4otQHn/Ah39jtT00HwfIsGKPXQE4FGfN1HdifTIfvbLNxAAEfZDVsww qozGc7GKvp0WmT1wzZJ66E71U2lXBsksm+29tpfqiyuOR4wczfKsLOU+x+MmHyXL/6y7 UabA== MIME-Version: 1.0 X-Received: by 10.180.160.165 with SMTP id xl5mr8081005wib.46.1375124887617; Mon, 29 Jul 2013 12:08:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Mon, 29 Jul 2013 12:08:07 -0700 (PDT) In-Reply-To: <00b101ce8c8b$3db5f200$b921d600$@info> References: <00b101ce8c8b$3db5f200$b921d600$@info> Date: Mon, 29 Jul 2013 12:08:07 -0700 X-Google-Sender-Auth: z4AHTvnndamMlbddoJEaL6HkyEg 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: Mon, 29 Jul 2013 19:08:09 -0000 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-unsubscribe@freebsd.org"