From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAF58C2B9F8 for ; Tue, 25 May 2021 13:00:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2C226141C for ; Tue, 25 May 2021 13:00:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232956AbhEYNBb (ORCPT ); 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