Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2335963ybx; Fri, 8 Nov 2019 02:58:33 -0800 (PST) X-Google-Smtp-Source: APXvYqySjrL5IG53/Ow4pehLpUehY9VkVEWJMAxOWyZvK7awa32WVSMtFZKPeUBu3KpKvAnKH7R8 X-Received: by 2002:a17:906:1e02:: with SMTP id g2mr7976694ejj.6.1573210713277; Fri, 08 Nov 2019 02:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573210713; cv=none; d=google.com; s=arc-20160816; b=M1xs4saMwsn6k8MOF3aCX+X7Xt7W+nVjGNnMuXMVBURwC2bl8s6KoGkmlW2j/Qt+ta UMfZdeDHPuNQOHe/C0Rj7FcuqWeLB9A9vh8mqr2KBdbQ9mzGO7oto+s17zUqSV61gkfV M6F76p/nH6NEiqegM5patpB1hq44dofVRgVspEtvbJGppQrhlXxe2WD3S4erNIlPPrTD PjDkjgGw7TdTzkCgwL1CJtLUuJsxqYjoaZOhVoAYoWzEB3GSxmfYopyBYlXFLmpXh7vc PtwW72yaADN5KL1A8KQItVIXH/WoVraZ8Kb8CcT38OvHzM9rp0hGipP/3aQgKPHOHVbt 3Zuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=yMM+NKnPDZjpZ1HuPVvrp3eIKB5TZVDqPwIMBKS0k+g=; b=PeBzxTgl3EqBihr31N/7EPZSiTrPLCI1B7lOMMntfYaC+f6BbHpRsxQu4tZvH6TpLW +xoHbvCog9OoKZyGb6+iqRrDf5CLAsiZxFWhqgxVRkF/8m69RGZJH0hZd+rGhql8iAAi mxdD7TZOQVEcayxt4KrDGAt75YaL9oYU3TRhxVyYK0TPK3QGFANABYmuL9KW96RBJuY2 2KPM4iXOLME6MWTC8CLp4WBTi4CKYGjUteMPl754PRhrAC3gCRJpYZ7n+EBBUM4O739q xhKUuwfLKFkYIuX245OHTpZPpDT/CK9/xKaYVOkJdaajg7HURTsNQGh+AukDmtJQ9ZrN w2pQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si3876179edd.8.2019.11.08.02.58.08; Fri, 08 Nov 2019 02:58:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728513AbfKHK57 (ORCPT + 99 others); Fri, 8 Nov 2019 05:57:59 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:54884 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbfKHK57 (ORCPT ); Fri, 8 Nov 2019 05:57:59 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.3) (envelope-from ) id 1iT1xk-00006s-GM; Fri, 08 Nov 2019 11:57:56 +0100 Message-ID: <4ce4c199522ef112362efb8db8823e31d5c41944.camel@sipsolutions.net> Subject: Re: [PATCH v6 2/4] mac80211: Import airtime calculation code from mt76 From: Johannes Berg To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Kan Yan , Rajkumar Manoharan , Kevin Hayes Date: Fri, 08 Nov 2019 11:57:54 +0100 In-Reply-To: <87d0e2fxi0.fsf@toke.dk> References: <157182473951.150713.7978051149956899705.stgit@toke.dk> <157182474174.150713.17459330922820192258.stgit@toke.dk> <42266e95f45d5772e04c9c016bd6179ea14ffefa.camel@sipsolutions.net> <87d0e2fxi0.fsf@toke.dk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2019-11-08 at 11:55 +0100, Toke Høiland-Jørgensen wrote: > Johannes Berg writes: > > > On Wed, 2019-10-23 at 11:59 +0200, Toke Høiland-Jørgensen wrote: > > > From: Toke Høiland-Jørgensen > > > > > > Felix recently added code to calculate airtime of packets to the mt76 > > > driver. Import this into mac80211 so we can use it for airtime queue limit > > > calculations later. > > > > > > The airtime.c file is copied verbatim from the mt76 driver, and adjusted to > > > use mac80211 data structures instead (which is fairly straight forward). > > > The per-rate TX rate calculation is split out to its own > > > function (ieee80211_calc_tx_airtime_rate()) so it can be used directly for > > > the AQL calculations added in a subsequent patch. > > > > Any way it could be exposed by mac80211 back to the drivers, perhaps, to > > share it? > > Didn't I already export some of the functions? My intention was to do > that, certainly, and to patch mt76 to switch to using them once the > trees have converged... Yeah, I think you did. Sounds good. johannes