From owner-svn-src-all@FreeBSD.ORG Mon Jul 28 21:18:27 2014 Return-Path: Delivered-To: svn-src-all@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 ESMTPS id F3751256; Mon, 28 Jul 2014 21:18:26 +0000 (UTC) Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EEFA24AC; Mon, 28 Jul 2014 21:18:26 +0000 (UTC) Received: by mail-qg0-f54.google.com with SMTP id z60so9650140qgd.27 for ; Mon, 28 Jul 2014 14:18:25 -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:message-id:subject :from:to:cc:content-type; bh=xC4y0CCiWQ4JehinQcB1i+vqTRs6jlQXBd0QnDkM4Tc=; b=Zu8lVxeFKoNovWt6L2FmsENZONepeyg2JKgkIh2hrvkieh8UtYvOj30dtC75HLzUh0 FZigCQOf3vD7+ZbFZluoXmX+CqOVhhk8WS7nONIIC9hxlrIMsX96yOM17Bv5UpQg7DB3 EJvYFqWIrNlxGCBAj8fdD9+8UmHZ8oI4ITz3V+L5ayjnSJdpwtQsJlEjL6MM2PZ8QG3Q osL+tA8OnxQCCep0qc5vBNYsk/E2iJycKLM81jJOU6GUgq97jBpABUCudubnbbIEwFdm kPTQjoaFdaeYzD0Sx2bMFnQc13a6aJy6yc1OcjD8fscAiYy0GjY4iXJH/7YcvPuLsoVZ hUMg== MIME-Version: 1.0 X-Received: by 10.224.171.197 with SMTP id i5mr64957377qaz.55.1406582305672; Mon, 28 Jul 2014 14:18:25 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.1.6 with HTTP; Mon, 28 Jul 2014 14:18:25 -0700 (PDT) In-Reply-To: <53D6BB0B.4010604@selasky.org> References: <201407261606.s6QG61le092895@svn.freebsd.org> <53D3FDEC.5040000@selasky.org> <53D55CD9.4000408@selasky.org> <53D6B784.6080102@selasky.org> <53D6BB0B.4010604@selasky.org> Date: Mon, 28 Jul 2014 14:18:25 -0700 X-Google-Sender-Auth: USTKhQzvpsddWkscgnPRKnINOGA Message-ID: Subject: Re: svn commit: r269127 - head/sys/dev/usb/wlan From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2014 21:18:27 -0000 On 28 July 2014 14:05, Hans Petter Selasky wrote: > On 07/28/14 22:52, Adrian Chadd wrote: >> >> The whole rate control thing from net80211 has to be upgraded. Drivers >> shouldn't be using ni->ni_txrate for anything other than informational >> purposes, yet .. well, that's not the case. > > > Hi, > > Should the rate be extracted from the NET80211 header instead, and if yes, > how? It's a little more complicated than that. The problem is that in an SMP world, ni_txrate can change at any point due to decisions made in other threads. So for control lookups, it can't just be some thing in the struct, it has to be something serialised behind locks. Ideally the ratectl API stuff will be extended to return a list of rates to use and _that_ function can do the sanity checking and locking and such. It's just unfortunate that the ni_txrate stuff was used in a lot of wifi drivers. :( -a