Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1528503pxj; Wed, 19 May 2021 07:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkvo8r1x0NbomDoxpdpB05NFZzs9uU/rX2lM49YWIuogR87mTeEsc4eL6F5CDLSSWI35Bq X-Received: by 2002:a92:c52d:: with SMTP id m13mr4881869ili.191.1621436368969; Wed, 19 May 2021 07:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621436368; cv=none; d=google.com; s=arc-20160816; b=zKKGj+HeWcdywducfD9NGDKIS0FAVXU7spN5FLwjOhwh9nGgX3NnnuAXPI/1WkJREn o8Kg2ToIr8ow7MC8GYFcjlDseRpiJdNrAthxwFY2RT6WFkwXNP2tJapiIvc/jV9XayM6 4NQaSaOfp3qu361krfj/1VgqyoVGlOy2vYRyVLsrBx0CtCwfa1dSN3Zxrye9ElZr5p/R MoHlwNEIDwxhnxx6NvFzfHqfwYrO6f9pGLl+D7V7/OVn+jEinC2ymcAabWTvytf4PYW0 pBNhZ1OGa5d5yOI0QGWUS6b6Raa2gmNsmMk2YoSlZBXHezzLigq0vGQQi3X+8D1RrHn6 IB2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:dkim-signature; bh=YWIOjiaBpbdUgeRNWpsSftzM0rNUGXuC8WZElBYWACU=; b=YFP4TnQKKqlyFxRBD3j1URA+SWRaFUK1NdVfTwGIpQnRDQtjpdGgvEppnuoWvnKCxe Ykufn5BiMjTEkA+uXom/P/fIFSzdy056W9DdfbfiEKXogFC33wodCZiLrTxP604kmxtp OeI/r/j3mJ/ka4LZMIi0pDNzeOgwHBuKCwGALgGV2ofyoHieysTLNNtWagp4tLX1faSE 9NTbpFXM+1rDvV8U4gN9QCBuZVN00a3HyBdHSjCd2a9SVL/wHrwUcebM2CX960glKjDL K/gnlVvITXIdCK0HQ8oW+rM5wHqGyR93Hb+l9kh5ZonJtM0qWn2JgHklzm64HQwat6Lb DyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=g4nYkcZq; 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 g6si25705389ild.152.2021.05.19.07.58.54; Wed, 19 May 2021 07:59:28 -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; dkim=fail header.i=@nbd.name header.s=20160729 header.b=g4nYkcZq; 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 S243308AbhERLS4 (ORCPT + 99 others); Tue, 18 May 2021 07:18:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237443AbhERLS4 (ORCPT ); Tue, 18 May 2021 07:18:56 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85D3EC061573 for ; Tue, 18 May 2021 04:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:Subject:From:References:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YWIOjiaBpbdUgeRNWpsSftzM0rNUGXuC8WZElBYWACU=; b=g4nYkcZq1mWI9uAbox+Xl5Razq dJ06cMsKGR11Cxcxo1L0x51VcdOZXASBrEXY4AdFR2tY7B4jFjWzO7SqUuAdvBNn80k4oUMANt83q kAebDqAant8PsljyxA1RKZyHaKdh0lj892c7x6laNRku0A4JKg4/vWxaUwX13HsLInG0=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lixjD-0007ER-1f; Tue, 18 May 2021 13:17:35 +0200 To: Philipp Borgers , Johannes Berg Cc: linux-wireless@vger.kernel.org References: <20210518110755.43077-1-borgers@mi.fu-berlin.de> From: Felix Fietkau Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag Message-ID: Date: Tue, 18 May 2021 13:17:34 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210518110755.43077-1-borgers@mi.fu-berlin.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-05-18 13:07, Philipp Borgers wrote: > Data Frames with no ack flag set should be handle by the rate controler. > Make sure we reach the rate controler by returning early from > rate_control_send_low if the frame is a data frame with no ack flag. > > Signed-off-by: Philipp Borgers > --- > net/mac80211/rate.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c > index 63652c39c8e0..4f5b35a0ea28 100644 > --- a/net/mac80211/rate.c > +++ b/net/mac80211/rate.c > @@ -391,11 +391,16 @@ static bool rate_control_send_low(struct ieee80211_sta *pubsta, > struct ieee80211_tx_rate_control *txrc) > { > struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb); > + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) txrc->skb->data; > struct ieee80211_supported_band *sband = txrc->sband; > struct sta_info *sta; > int mcast_rate; > bool use_basicrate = false; > > + if (ieee80211_is_data(hdr->frame_control) && > + (info->flags & IEEE80211_TX_CTL_NO_ACK)) > + return false; Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header, so please change the check something like this: if ((info->flags & IEEE80211_TX_CTL_NO_ACK) && ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || ieee80211_is_data(hdr->frame_control))) Same applies to the other patch. There are other places in the code where this kind of change needs to be done, but it would be good if at least newly added code handles it properly. - Felix