Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2367195lqp; Sun, 24 Mar 2024 16:05:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/gM7aQTzU3y1snRG6fcATqsXEIEKcD331Jfzm/V+TcNHK7iBeSkaRoaxXreTj/M4PxWyaa/7yUZ3IcUPaGPDDHlyo4Estmd7eJJRu2Q== X-Google-Smtp-Source: AGHT+IGbaR5zzXi1f8zmARiNn2GJuBQF85q6LkuSZ+CNRCO0sQpKGvvoxX75TLiqYIdx+1GffXeG X-Received: by 2002:a17:906:fad6:b0:a46:da87:26e9 with SMTP id lu22-20020a170906fad600b00a46da8726e9mr3024835ejb.77.1711321501996; Sun, 24 Mar 2024 16:05:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711321501; cv=pass; d=google.com; s=arc-20160816; b=Ix58DxiRKMU3Cl97U4El6xdszZ83D+D/IrLpnYg5MWbQYuKg0VEHDzQc86JdKsYgtC oUzzknjMVw6nueT+s+IbF2IOa5tC+f6j8YilVkbsaNrTaBJ8hJNwHw/q7i/9f+YUbJoC U/Whz9x1BG6SvdAYXWTfqZUqbsqhaGAknjFBAEW60WygScqFq+W/Vml58jd/X6aVScrf 4sfrX8+Jbdfey/pN/QmoaT0gKu576ice3F9yYKCxsrOAkb1H8JuAujUEG8qTvBWWKufX IfadXzXFQeolFbgdpvpYAWUhwnzJbSrIJf04JjZHigaXnabE60KAAEC9fYxup77aq+ym 5i2A== 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=r8c0LGb2Kz4/gL0zFMUYDBpyFLjCBx5sqUrIGH+54OI=; fh=wpw9CwByh2VzBg2JAmzRLhCtTGmrj18ge7jA98j6Vjg=; b=Sa5BOhC3+axpLwmzcyc+w0fl6PHivteZ00ScCApHqNS4uNZSyX8eM5f5AKi0+Ksb6m M/umuApH8AxQqNuzqxmGopdeHrq1izPPfC5CntCqPlEwDiLXTpZZ0mlTxvML+r7cxU51 C+54ZDzjLsYiurk3LwQbBLQg8kJjRigxB+xQQDruA3Syb9GSA/VnUpIrqyYnNdPfGneB pxSuLFsoet927A2wLoCMyBT3KpQmdhnt/OHUqCUlz8OiR1lJXAfsKktDoLcGCwDNFgxz DL7g7zmigcZVDHfJxmnhIknoC3N4sBhlIb2EBig99Ronhy1mx3nKQ7WTp5gaarED7ld7 LvPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJUXivtc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gl17-20020a170906e0d100b00a46bb779746si2013499ejb.298.2024.03.24.16.05.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:05:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJUXivtc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113015-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113015-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B1ADD1F261A8 for ; Sun, 24 Mar 2024 23:05:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A7131369B1; Sun, 24 Mar 2024 22:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mJUXivtc" 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 5647A136665; Sun, 24 Mar 2024 22:37:06 +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=1711319826; cv=none; b=GNFp7AzFHc9g8+cmChD+05fVndVHBOA0dhgTy0WzjoHQwPCsSXfzCV/FDumBMJR4bsTcyUFBcfMvGziyMuifzt4v93IJwlwgvqNTb9TeP1a+X0UDM7r4l0BschUD/4BUy8pBYrl3v5Nq01QaO7V2tRlSuGz1d09mPXYkbBxpaHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319826; c=relaxed/simple; bh=Sq1yoVc+QhRAvCHnEwpkbv8UNUqdJphlqJF9/OpnzFY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YeufralqTNuJfiJqxytRfjNv4k6EA1RyFxPzLHELj2bP3l5sBAGqNuKHdFTlwICpRvAjMwLJQX/K79SIPE2qQ4mPUaKE4a/yW7nAHY7szvL2/13n2Wwc+9YBdp7AfZMEso6S608v1zG8I3ekQEg3b4CnJVrF5NFhP0hgD5Jns8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mJUXivtc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 500F1C43394; Sun, 24 Mar 2024 22:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319825; bh=Sq1yoVc+QhRAvCHnEwpkbv8UNUqdJphlqJF9/OpnzFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mJUXivtcn1s3EToq+Zduqj+4VHF+n7IBJtM27GXTxnGMmSjQScdbBlID72amVjYZ7 vJ+l5gpeYUZxi1caQkKcZmi5rZNKlSVbs5+NDlHwSWLQ+xTyIciZoWNpoc2ef1Tnhl lDCl/N+i9I/nPkJP4txytw2w3ZhQwd86B/mFDLTxoXtN19Ka9A3xblEPZTNZ0Fvebe 9Uqx5mD8yDXfkdJroKRIbJgYuB691s0cX8pUSGLyCI0xSOV07gWSuFXNtwnfdp+OBf 5jNldwQOaSWkxQ+LBtwAF8zWIC3x2b99+SeH4uwMez1wOdr1p539DO7MtCX3ZPfwGT jJlkGCX9NKfIQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Johannes Berg , Miri Korenblit , Sasha Levin Subject: [PATCH 6.8 128/715] wifi: iwlwifi: mvm: initialize rates in FW earlier Date: Sun, 24 Mar 2024 18:25:07 -0400 Message-ID: <20240324223455.1342824-129-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: Johannes Berg [ Upstream commit d3b2c6c65bfd3b9616084e91bd0d402964ea7cef ] When connecting to an AP, we currently initialize the rate control only after associating. Since we now use firmware to assign rates to auth/assoc frames rather than using the data in the station and the firmware doesn't know, they're transmitted using low mandatory rates. However, if the AP advertised only higher supported rates we want to use them to be nicer (it still must receive mandatory rates though), so send the information to the firmware earlier to have it know about it and be able to use it. Fixes: 499d02790495 ("wifi: iwlwifi: Use FW rate for non-data frames") Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240128084842.ed7ab1c859c2.I4b4d4fc3905c8d8470fc0fee4648f25c950c9bb7@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 53e26c3c3a9af..346512696bd1c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3698,6 +3698,19 @@ iwl_mvm_sta_state_notexist_to_none(struct iwl_mvm *mvm, if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) mvmvif->ap_sta = sta; + /* + * Initialize the rates here already - this really tells + * the firmware only what the supported legacy rates are + * (may be) since it's initialized already from what the + * AP advertised in the beacon/probe response. This will + * allow the firmware to send auth/assoc frames with one + * of the supported rates already, rather than having to + * use a mandatory rate. + * If we're the AP, we'll just assume mandatory rates at + * this point, but we know nothing about the STA anyway. + */ + iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); + return 0; } -- 2.43.0