Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2367540lqp; Sun, 24 Mar 2024 16:05:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJktTjjGXoiYZESaPy3aEvTXRoviMiXFT0HRB77Ur/RIQDoEugURQf5DxvFba35PZi5dxfdjRvUw88mDaIgOZ6F9mahnHU+EiyBtD4CQ== X-Google-Smtp-Source: AGHT+IGZALzqdb/q6fUznOuO140d1uWYVxXo15iRaEr5dZFV+BzC6//iH23cUVp8J/vanyJCD9oj X-Received: by 2002:a17:902:fa0b:b0:1e0:188a:5ade with SMTP id la11-20020a170902fa0b00b001e0188a5ademr4509754plb.11.1711321551252; Sun, 24 Mar 2024 16:05:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711321551; cv=pass; d=google.com; s=arc-20160816; b=CEly09sbBiiXCwqREZa2no71vRL2gOV0Nq2YZoeqHT67AVDr1leog2LRPgxyvHV7QQ fEqZWKA0I4rg2ahNyjVFG6g6D5P5NJUZcuPw0SWYyh7d7OTLpm4gz0mXsGGfahtrfaPy OZEPR06OvAM0qMjjaN0YpFkFs9NvBm5cHoEfjfPLmQ1j+VtaFGE+hHCK7gTF1L0QLldu lIoDPKOGFiWVAGo/HQmTxQwHbCSP3uI5uz8/YchdaKwld2DgZGiYjHxqBXctKc9BnFbI FTeoYjSvAvbreRP3PBy4V2r28K9jiFMVRhbC1wSaiP0iQiq9ssh+nT2nswO1TlscHqQL OZ4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=K9mTGaCKarhYTZ3Pyijcynf7ufQK257CHP89ZGff7tw=; fh=Z94xvPFQbs0Klni/VEcrT1TR0gAI5V32whh661QFVkA=; b=Mw7cg51JBDNPuqlh+ruZlXlvDZe5C470calGgH04I2aoSzleropmKF8HJoW6w9Pyba G+cEvB+h8Q10xZqBcNBYnmP7CPDXoH4DDIagxxFKKK/8tnZF8bpUIZF0LUd0BpkfbnvA i5LnPJYFGM7aQq9eSu50GTADaV0O6fNk4xhZli6fzuwc2OtVi/jGgbl6kZXfNLE0aEoV ssoOCCdJOzE3BYS2H9QDG1ulU5GjthfDCe07M3u21WHJqCKz26mE36R2WKCyx9Jq1Nm0 73l96AVDlPI2JQQ4WiIdEOpk2+FHLYsKaVlQFvrZM/IgzUvpKaCO8lSKCYAh4B3W6qK5 eR2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PES7IwWn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c1-20020a631c01000000b005e2b17cd8a0si6333321pgc.270.2024.03.24.16.05.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PES7IwWn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113019-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D75D4281B9C for ; Sun, 24 Mar 2024 23:05:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0207D4E1AD; Sun, 24 Mar 2024 22:37:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PES7IwWn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E10D13791C; Sun, 24 Mar 2024 22:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319830; cv=none; b=Pcd+Su1EyiY9b2HGldY7lPwZgLychPTf+n+gSen8vn8SrxqeHKLnAO/puAHzzPEGn3LIMi9bme7FSKq3MA/HYa/Clis4LRy92clVTsjJ7dmnvn9p+VtBILVfOnlZ2vDSI9IbrbW8PDXSM3F58kOn5dLVlxC9zO0LIZiAJSO4g40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319830; c=relaxed/simple; bh=/DKVbN6tduAwbcxg3CQbSjcbip6MeRF1LCLPOK6gFqw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mMK+k0V7FaItgPeRyubfGHIP9pEDF5GPKO0yELDT3dCIEBU+x/RauD+25/Jacmgeks5ejDuniqHiU8lmIF8uxgApOMA32/rS7R6dr4ArwU8hoXb53iWiG8clne422qa3L9+u2vxINLlNSFblvf10OKvhbhQiiklvitlsk7S2RQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PES7IwWn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 407D2C433A6; Sun, 24 Mar 2024 22:37:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319830; bh=/DKVbN6tduAwbcxg3CQbSjcbip6MeRF1LCLPOK6gFqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PES7IwWns0Pmim+PGGBhL3OD5iV1/qT7S8qetMYnhfJohWGscrTrqIOi3gpPZkREj d5MV9p0JEtbObBdBlaHBe0I6dtFQsFQ+cdfRKa2lKGXnZ5IkuMsbG2fCabf3R6yWkh yef7cWGIyEaS9Rp6iG0Sn4qblvvWDLDjR7QfQjQyWQeA5CfT1ThBRJJSDEetqjnpqC 3ltt5uses5091ltZEA3enNF8Q4oA+7Y71v/fWGoi22o8UzGe0j4OenySf/SM6HIS93 N4xMJvS0DPZm+QjVaO6D1Er/uuc+V9DA81BhJzc3atNLdZCL4ddKx+Z/p9PB/8a85d 1866ZdKOxTVOQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Emmanuel Grumbach , Johannes Berg , Miri Korenblit , Sasha Levin Subject: [PATCH 6.8 132/715] wifi: iwlwifi: mvm: fix the TLC command after ADD_STA Date: Sun, 24 Mar 2024 18:25:11 -0400 Message-ID: <20240324223455.1342824-133-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Emmanuel Grumbach [ Upstream commit 0fcdf55fced7121c43fa576433986f1c04115b73 ] ADD_STA resets the link quality data inside the firmware. This is not supposed to happen and has been fixed for newer devices. For older devices (AX201 and down), this makes us send frames with rates that are not in the TLC table. Fixes: 5a86dcb4a908 ("wifi: iwlwifi: mvm: update station's MFP flag after association") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240129211905.1deca7eaff14.I597abd7aab36fdab4aa8311a48c98a3d5bd433ba@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 346512696bd1c..f60d4258e1b95 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3809,13 +3809,17 @@ iwl_mvm_sta_state_assoc_to_authorized(struct iwl_mvm *mvm, mvm_sta->authorized = true; - iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); - /* MFP is set by default before the station is authorized. * Clear it here in case it's not used. */ - if (!sta->mfp) - return callbacks->update_sta(mvm, vif, sta); + if (!sta->mfp) { + int ret = callbacks->update_sta(mvm, vif, sta); + + if (ret) + return ret; + } + + iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); return 0; } -- 2.43.0