From owner-freebsd-wireless@FreeBSD.ORG Tue Apr 17 18:12:51 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 383CF1065673 for ; Tue, 17 Apr 2012 18:12:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4D68FC12 for ; Tue, 17 Apr 2012 18:12:51 +0000 (UTC) Received: by dadz14 with SMTP id z14so28737636dad.17 for ; Tue, 17 Apr 2012 11:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=IYRAQbVn8pqrrnBQifylp61h53W9kZDMHoaAuIiOixY=; b=ry0oAPb8MpNvAq3hMjNEpFRrM5Og9BIAJ5TUJX5b+pvqtUrT3Thdk8l4K8J5u4bCMv x3L5WSbAS7YX+ES1aTMpqCU6JrTf9B3ryzRJ1j8Si+2Za6G2jmSTf1P7OZWe0CS1BweX FhSD7PvgU+cVEsaO63X7wkHmwTi8LIESHpFAPC/muXQrqQ5FhZtAum7glSoZuMa5vlru OV0sM2YccqgYMJ0Yw6ONCrpdy0JUZN4UhUpqztzF3cEBo+pzOr0n6ZlPt3oe2AKXsAq8 INSmEJebCtH443WrVVLamcdU2TY5mBmn+s2D+n0+bPxQ3+RQ8txv6EPv2k755zYuNKSp e42w== MIME-Version: 1.0 Received: by 10.68.202.168 with SMTP id kj8mr38154027pbc.86.1334686369813; Tue, 17 Apr 2012 11:12:49 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Tue, 17 Apr 2012 11:12:49 -0700 (PDT) Date: Tue, 17 Apr 2012 11:12:49 -0700 X-Google-Sender-Auth: XtRzQHiy2_9Kxhg_tPh0iJt7ww4 Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Question: IEEE80211_RATE_BASIC versus IEEE80211_RATE_MCS ? X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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, 17 Apr 2012 18:12:51 -0000 Hi, So after doing some digging into the rate representation, I've discovered that both IEEE80211_RATE_BASIC and IEEE80211_RATE_MCS are represented as the high bit set (ie, 0x80.) My query is - how exactly should we be representing rates, and is there a clear, consistent, non-overlapping use case for where each is used? This shows up in setbasicrates(), where the 11na/11ng modes have the OFDM/CCK (respectively) rates set as basic, just like for 11a/11bg, however the high bit is set. ifconfig(8) at least just looks at the tx rateset list (which setbasicrates is setting up for us) and mis-interpreting the high bit as MCS, rather than as "basic". Any ideas/suggestions? I'd be tempted to create a 'ratecode_t' that is a uint8_t struct, then finding/fixing all instances where ratecode is being passed in as a uint8_t, but that may be slightly overkill. Adrian