Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3912258pxb; Tue, 26 Jan 2021 07:46:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIvRwzpJUho4Sc8U+xbdFwf3xd3YhyjeXM+PP8VlovLRIK1ML523Cp2esSdG/I2qhE0XJ6 X-Received: by 2002:a17:906:ff43:: with SMTP id zo3mr3803045ejb.542.1611676019373; Tue, 26 Jan 2021 07:46:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611676019; cv=none; d=google.com; s=arc-20160816; b=fpucqDX1kuAGmOV6HSE9/Y20ATTSog0p8S10AyZ8aHgT7FUepxqGnimmZwApQtaLir K6sGCU1uUMoIR9eReJqOp2odiLozP9xdsnQYo5b6p0dl36eU6zFQSkl17i9+AKQQpwpc xgXL34v/5CQgM0dP18t2q+pjttDrQc/hyyKCPtBZjO4NkQFAjtITBbBqGXLUcbGKl8R3 kXi/3lAnUuJQEoodo0w5+d1rS2cA/EeqPfaErQ+kllrSB8iyo3iMx4gBMvJ381+bRDj1 e1P6Dsg5OiF3yY43V1qLVR+am408gwROBLLPaKlq32YDTJzG6grmCV7bXH++Uo9w7Sst TJ0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XAOl6Gr+MjIDiMkLNr0RdlUD3qcUIb5ZRjkvkP9PH5I=; b=d46tGgjs2zLrsarVaID/p/dyvch2Z6bYJ3nbL5oLWqK+iaol2N69FD9Xdmp24R8509 VR8JvRS8HQOm0SG5t4M1Dq7OABkOfk3X3gV9fmuwnTEAKvqOx5e7V7/UQTFq+6pFEDXf uPBmVf8TDHrwoy7ddLar2BBcmB4OoZoa/ygzptr99UWdirERAmgT21/T/7qotX+bCSio JdIaqN4KHVClo9jUt6uKE+SXKxzirTSwfgrfCc+lOHyWXYsu9+D0WKj/Vg6LETmx+N4b iqa/wpRHO11KZ3AIa+kxror9XFKbhVQuGFVvh7xKHlewBc0zMno+RYALhgAyr5XXzq/w 5qPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=gK3Cb5Xu; 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 o27si9421632edz.400.2021.01.26.07.46.30; Tue, 26 Jan 2021 07:46:59 -0800 (PST) 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=gK3Cb5Xu; 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 S2391255AbhAZPp2 (ORCPT + 99 others); Tue, 26 Jan 2021 10:45:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391958AbhAZPpL (ORCPT ); Tue, 26 Jan 2021 10:45:11 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8986C061A29 for ; Tue, 26 Jan 2021 07:44:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XAOl6Gr+MjIDiMkLNr0RdlUD3qcUIb5ZRjkvkP9PH5I=; b=gK3Cb5Xu0e7hnoonpVYvyGNMSr 5B9FnRbus3Jg5Mq/FTwug+VURfxO7hQNIjzur63pRrbWC0bFlVjD9XSBc4YMIkkcthNX9Mq+W2Rbt MbFI8/eo2hXogX51ZBfl3pctgPhzDKtWzgZCx/BqYCjEbSm/TGKcFZl+06LwIUosrBVM=; Received: from p54ae953c.dip0.t-ipconnect.de ([84.174.149.60] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1l4QVo-0007Dc-Vg; Tue, 26 Jan 2021 16:44:13 +0100 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH] mac80211: minstrel_ht: fix regression in the max_prob_rate fix Date: Tue, 26 Jan 2021 16:44:09 +0100 Message-Id: <20210126154409.6755-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Since mi->max_prob_rate is overwritten after the loop that calls minstrel_ht_set_best_prob_rate, the new best rate needs to be written to *dest Fixes: a7fca4e4037f ("mac80211: minstrel_ht: fix max probability rate selection") Signed-off-by: Felix Fietkau --- 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 8e9e30c468a6..d48798fa15cb 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -545,7 +545,7 @@ minstrel_ht_set_best_prob_rate(struct minstrel_ht_sta *mi, u16 *dest, u16 index) cur_tp_avg = minstrel_ht_get_tp_avg(mi, cur_group, cur_idx, mrs->prob_avg); if (cur_tp_avg > tmp_tp_avg) - mi->max_prob_rate = index; + *dest = index; max_gpr_tp_avg = minstrel_ht_get_tp_avg(mi, max_gpr_group, max_gpr_idx, -- 2.28.0