Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4342018pxj; Tue, 25 May 2021 06:00:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXbtrK2RVHq85mO8iiXDMNXsFKarykqMh53m+1aHfl550byk9lFCfMmCAvvS7Kl/fGo0mx X-Received: by 2002:a17:907:a048:: with SMTP id gz8mr27931372ejc.380.1621947659496; Tue, 25 May 2021 06:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621947659; cv=none; d=google.com; s=arc-20160816; b=V24ixkE+GUgnAVsxzVg/q4yxfvRBezvcw+9BWXhNM6YPo+5nywEoaoz0mQfJcuyqgz TYARYVIxA7WpUpxp3q5iDu4dGEVWrfXP1HNp8DI4T5JU+PugE5dNSHW2ZYgTh4UeUzwc Q3U90klV1phLrK5X5ZRjZsYggS0ZyDSYCoYXcarfyGCCuuUDTXY8NeRsAiqU9I8q5Gce moDwX9I5JiHoz4VXo9w3CWI40WoRyUHD6aSJxO9JUjCbWcbLtp1Ax6cB1t9VgMk3nSy0 2UHkh6nYIiceuxhw7FIDVysVNWCUFs020yC/8kJrbcn8gYkoLybJHEFMpGH+PRgxPxcF yTQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=3NNY8aQ4xh2XFp1j3ineIZLEJEEtThiPHYWn1Rwcc0M=; b=NUFqgKx7b0gUE8S9hayBZoPZjTEPNNxzzkefMYsTn5m5h/RcVduPXv01Wr+X14YRI1 84wNbEY28P2YCVoD/pNZJJoGSfDY/u81Fwt+NpxaosVgGXB/OcX3fpfOCatK1TODcg1B w8PDzAXx43ocOjCdTIfU3JSjav5N18jSu6tbW+bUT9a9JnD/PENCRycgXzvC5MZsE3wi lUwnk4wqWsYn3i+2T7/hwBDyUN3rBemg1n6BZR4YC28cymMh4CH5EOZrVGI1pV0Cz2pc LBZ5fG9pvecLN3aTFPkWS4rvlOmMo2ycTjfaKKdrBYAHKb78evEU+5xixOfq3Erllpx5 ZWSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si16290455ejb.401.2021.05.25.06.00.35; Tue, 25 May 2021 06:00:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbhEYNBb (ORCPT + 99 others); Tue, 25 May 2021 09:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbhEYNBa (ORCPT ); Tue, 25 May 2021 09:01:30 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A008AC061574 for ; Tue, 25 May 2021 06:00:00 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1llWey-00EOir-E1; Tue, 25 May 2021 14:59:48 +0200 Message-ID: Subject: Re: [RFC PATCH 1/4] mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue From: Johannes Berg To: Ryder Lee , Felix Fietkau Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , Bo Jiao , Sujuan Chen , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org Date: Tue, 25 May 2021 14:59:46 +0200 In-Reply-To: (sfid-20210519_215633_470280_525C572D) References: (sfid-20210519_215633_470280_525C572D) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2021-05-20 at 03:56 +0800, Ryder Lee wrote: > > +static ieee80211_tx_result > +ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata, > + struct sta_info *sta, u8 pn_offs, > + struct ieee80211_key *key, > + struct ieee80211_tx_data *tx) >  { > + struct sk_buff *skb = tx->skb; >   struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); >   struct ieee80211_hdr *hdr = (void *)skb->data; >   u8 tid = IEEE80211_NUM_TIDS; >   > > > > + if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) > + if (ieee80211_tx_h_rate_ctrl(tx) != TX_CONTINUE) > + return TX_DROP; Probably nicer to roll that into one condition: if (!...() && ..._rate_ctrl(tx) != ...) return TX_DROP; johannes