From patchwork Tue Jan 28 14:05:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232642 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 C1818C2D0DB for ; Tue, 28 Jan 2020 14:24:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90DD02468A for ; Tue, 28 Jan 2020 14:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221462; bh=yjiDfEnBImHmLBETyrn1Ft8yQxUTC7g8GV5oackgyF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SD9rWs/n+Qvu9JzM5C8IcEAmQIe0VSPVKGEXK9lGyDEUdqZpnTpeaOpwn98VSAnqV 6SeVbO8KIEN4sOOYxDd/XH9JXcwMynHGfqV/9Mz6yO3HQjMszFE6RRKvdxIInI9ef1 Cedtr5nU6h2kHZwk0J2L2ua/OS+ZWXX7ZYx4dNn8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbgA1OYV (ORCPT ); Tue, 28 Jan 2020 09:24:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:51000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731508AbgA1OYU (ORCPT ); Tue, 28 Jan 2020 09:24:20 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1A7E2468A; Tue, 28 Jan 2020 14:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221460; bh=yjiDfEnBImHmLBETyrn1Ft8yQxUTC7g8GV5oackgyF8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KgHoQcG0w/AYrGwqgwdPyg9Uub/6VGeV5rth7cLdiTLsnBEUrBVqbqlbpXHHBFwhE e9UBIP9sSWRINJGazHFIfrx3NkukBh687alSrQYnPma8SLDA7H3WVc0AoYjv9A/Qgz f2Z1JORgsR8QPJ4cDz2DU2Y7dsnrsH9WBl1Lax5k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Johannes Berg , Sasha Levin Subject: [PATCH 4.9 186/271] mac80211: minstrel_ht: fix per-group max throughput rate initialization Date: Tue, 28 Jan 2020 15:05:35 +0100 Message-Id: <20200128135906.414211395@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Felix Fietkau [ Upstream commit 56dd918ff06e3ee24d8067e93ed12b2a39e71394 ] The group number needs to be multiplied by the number of rates per group to get the full rate index Fixes: 5935839ad735 ("mac80211: improve minstrel_ht rate sorting by throughput & probability") Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20190820095449.45255-1-nbd@nbd.name Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 593184d14b3ef..e1b0e26c1f174 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -547,7 +547,7 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) /* (re)Initialize group rate indexes */ for(j = 0; j < MAX_THR_RATES; j++) - tmp_group_tp_rate[j] = group; + tmp_group_tp_rate[j] = MCS_GROUP_RATES * group; for (i = 0; i < MCS_GROUP_RATES; i++) { if (!(mg->supported & BIT(i)))