Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3408823pxb; Mon, 4 Apr 2022 16:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrbPTNFmggXC+FaY59jEXdgoYV6Fg5fyVFb9lmJbBPPgFdSMwsQNpNJhQl3DjahVtXJD9v X-Received: by 2002:a65:5acd:0:b0:399:24bc:bbfd with SMTP id d13-20020a655acd000000b0039924bcbbfdmr393711pgt.323.1649113459541; Mon, 04 Apr 2022 16:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649113459; cv=none; d=google.com; s=arc-20160816; b=SZaoVSeuhWb8pgdZaI+4BqZVio0N2Q/CTEbVwIkl8KPZMHvBHMoXKtraHI7DhvpVdy vwB4xNMqGgVEnl2DOpjuYS7VBNpNg8CdtFauJfW1bAS24uM3M2a3VcTcATIBBMFtLNyt uVomNRRzzrMUs4+1kXwv0GUqSkrJYb+MF1FpbKtsgJDfmet5p13nU9jLRfJFUodHCa1l H4T2fe/AUPMiFxxgETb1NQw+hjV6QZQzCSjQVf/ZH7gBexkoAyJRnuToYT4kTHk3x0w7 Ll0dXge6nKJsaMDP05i6RjqTvILhrasTffhKPZ7oyllWvFDrVK+fZD6ZhwsYiHfk5NFX +Wgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:from; bh=t5LSC0bVJPr2lyP9fNLfvtUWKQ87BaSR0Q6Dq/rAUVY=; b=ziwLmoQjxSRxKDdjysrRlLpbjrOv4r24f8t0vO6gUvdzNHpZGcC85gBzrV6QCrL14f q7HxSRms7zqEaxDVxEorA3fbvEcmH9RuWSE7OzLcKaP72ne3RIcFs8ImZUWySsep3ef9 VvotYRaLbqxEXcy1MNdkiK/nkTGOQo8sbCK1WEfXa6/aODJBznuqDXOptkRn/wgwv6vL ea4QvsUqADk0MbaGgp3jZpUF8glvsqKKYDtYnIKKFsJWaTtCQifjW4ene0xNMOijQaaX 0cQOiwsPHzIE3eFHy/EsLu8UJSNI/w6yuEB3gxOAC+54ejbjAYhX4GXJSD+WUVX5YC91 mGng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toke.dk header.s=20161023 header.b=aWF3yN5E; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=toke.dk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a170902e54300b00156aa95e06dsi4276899plf.310.2022.04.04.16.04.03; Mon, 04 Apr 2022 16:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@toke.dk header.s=20161023 header.b=aWF3yN5E; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=toke.dk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378981AbiDDVSc (ORCPT + 69 others); Mon, 4 Apr 2022 17:18:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379925AbiDDSXW (ORCPT ); Mon, 4 Apr 2022 14:23:22 -0400 Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F21122B20; Mon, 4 Apr 2022 11:21:26 -0700 (PDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1649096484; bh=SLo9d96mThar86dgaQcYX5QHm8tQkuqDH+jBwfpMzbI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aWF3yN5E1EG5YjRBbEsUeRcqbRiOYTHkZ9dONDIoQqc+LuZqSWTWvU+fcoWY3KdZ5 vPUwr6sugS5CjsDG+nVkDYCp1XvAZa7AzTsmXJm8x6j1yBBOhQgg4jxTtB5AdNmeEW Nk/3U1T776AwYYHFrX9RDoDQEkqom7Neh12ITsXxpTOtr2ZI20eaAaeT4HFz6/mlrB uOtQWxEplrTgaSoy/oTqMP4E96Xudy+6X2byJ9uHq1kOt4lJwbNkVgm2iOrayYGZFq ytGzGC6JaGqHlpkOVmYLuju4kGDcS9JE1dhNPkwd9VXbolkDfex+G13UfrycHbUi0C Z0web2oOgDHGg== To: Peter Seiderer , linux-wireless@vger.kernel.org Cc: Kalle Valo , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Johannes Berg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Felix Fietkau Subject: Re: [PATCH v1 2/2] mac80211: minstrel_ht: fill all requested rates In-Reply-To: <20220402153014.31332-2-ps.report@gmx.net> References: <20220402153014.31332-1-ps.report@gmx.net> <20220402153014.31332-2-ps.report@gmx.net> Date: Mon, 04 Apr 2022 20:21:24 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87fsmseml7.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org +Felix Peter Seiderer writes: > Fill all requested rates (in case of ath9k 4 rate slots are > available, so fill all 4 instead of only 3), improves throughput in > noisy environment. How did you test this? Could you quantify the gains in throughput you saw? -Toke > Signed-off-by: Peter Seiderer > --- > net/mac80211/rc80211_minstrel_ht.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c > index 9c6ace858107..cd6a0f153688 100644 > --- a/net/mac80211/rc80211_minstrel_ht.c > +++ b/net/mac80211/rc80211_minstrel_ht.c > @@ -1436,17 +1436,17 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) > /* Start with max_tp_rate[0] */ > minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_tp_rate[0]); > > - if (mp->hw->max_rates >= 3) { > - /* At least 3 tx rates supported, use max_tp_rate[1] next */ > - minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_tp_rate[1]); > - } > + /* Fill up remaining, keep one entry for max_probe_rate */ > + for (; i < (mp->hw->max_rates - 1); i++) > + minstrel_ht_set_rate(mp, mi, rates, i, mi->max_tp_rate[i]); > > - if (mp->hw->max_rates >= 2) { > + if (i < mp->hw->max_rates) > minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate); > - } > + > + if (i < IEEE80211_TX_RATE_TABLE_SIZE) > + rates->rate[i].idx = -1; > > mi->sta->max_rc_amsdu_len = minstrel_ht_get_max_amsdu_len(mi); > - rates->rate[i].idx = -1; > rate_control_set_rates(mp->hw, mi->sta, rates); > } > > -- > 2.35.1