From patchwork Fri Jan 24 09:31:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 232918 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=unavailable 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 CB650C2D0DB for ; Fri, 24 Jan 2020 11:28:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9852120704 for ; Fri, 24 Jan 2020 11:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579865337; bh=ZJaRqJzYv8tsnPKHc+A1qzDDOHv1/2eppo6VQU2hfTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fxKno1F+v6wH3lqQ4+M6QDeH/OA4UFb3o6tBIb6HQbt1YshLOFNsqxC5sBGgA6bj7 vll6Y1oq4HK5sy18VD4PfEFGocbsRc4cvMveR712TyDlfRGdsADQQvW8NaBrrzpdUN XElnXfqDJrkwzcBfTsUDB45Niqi2FQ6WeqPg0Lms= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391422AbgAXL2x (ORCPT ); Fri, 24 Jan 2020 06:28:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:45270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391727AbgAXL2w (ORCPT ); Fri, 24 Jan 2020 06:28:52 -0500 Received: from localhost (ip-213-127-102-57.ip.prioritytelecom.net [213.127.102.57]) (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 6E98B206D4; Fri, 24 Jan 2020 11:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579865332; bh=ZJaRqJzYv8tsnPKHc+A1qzDDOHv1/2eppo6VQU2hfTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AfMNQdaggQbeLABirjaMm01Lg5aPMi3OU+lg0/u4x1UzME0KewEuxsg1iqEecooq+ Ccpau9VQ+45FhhYKRQvxEwXyxnssy1ZtqDvNRHHYUmTZxf79Qr4gsDeiYuriVqgqri 2d7UsWps2XkYR6o2oNUtlZ4q1OjbHQXJp3zSuo1Q= 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.19 517/639] mac80211: minstrel_ht: fix per-group max throughput rate initialization Date: Fri, 24 Jan 2020 10:31:27 +0100 Message-Id: <20200124093153.554354323@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124093047.008739095@linuxfoundation.org> References: <20200124093047.008739095@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 3d5520776655d..0b60e330c115b 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -529,7 +529,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 (!(mi->supported[group] & BIT(i)))