Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2370126lqp; Sun, 24 Mar 2024 16:13:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZPjzyptDkatffoq8BSgWwSK1kVkDymbRvJLcQ5vM1NEDdTZ6gmc484vA2oH8creQuxUr3EV5jLl+d6TE2bmIP289pw+fXi1Z207Veew== X-Google-Smtp-Source: AGHT+IHFtbqQvO9r82UBpPGupOCCb4xD1eZKxjGBkoiOFDOv9X2kCqOWrpV7EUfpPA4iXoL5QMCr X-Received: by 2002:a17:902:e5c4:b0:1e0:11a4:30e0 with SMTP id u4-20020a170902e5c400b001e011a430e0mr6700671plf.19.1711322011499; Sun, 24 Mar 2024 16:13:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711322011; cv=pass; d=google.com; s=arc-20160816; b=jPwSMDm5sP9PjD1yUNTNegb0VLNsLTf0nTvYCEGL3SrpB8ZWyXIni1X3G9aZi6ZRpg 0BLD0xAvm/l1Upymmk2mNX1MMZRtFT94ag0jx1VHb1mo0fIxVRIPQ461Jku1KMm9Tyj/ fhVCil+jSfW6rGmhA+QFAqSkn+WZ2AALTg5vFjKPnukbLPmb68U40ya6taAZxUHRmpLN XxkjDTv3kMXZvJTpx1+yLfkjOKj1pPbL5cBeeWl0kWTaAQGfIJIuEPUoh3JHg91xdAms rUiIjb5gqY2LEL1RyDKWnQo9j9rE5OfEHrVWmBcOVen4r1XS+vZgQL55XKAsuzniZpty Qb+Q== 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=NwDj2tsSm3TSzLKAkz60bYerevrw8pwxZ1ZgOp/gQiw=; fh=M9qxfzW7MeBSymdvGjEba3Q+l9uOxUjI2PA7O1cfR6Q=; b=VCJlY19C983ZuvIS0wE7dGisOUWGjRoH+9pEWgxM4gNiXvrsy0QVa2TmwqRsubq7vK chOHnUzO+OX9fOoGVGVUgZ1xZfa2B638weR2q9nZMD/IsmlOsrSUducqgOg+PuEjQfuq GNySeuf1TIlNmXI4Si2nxD/86TOXY+RczABQf1n4Az+LPOM07ueRSh4ql66b1dFhae5A RZV3RZcOgBBnwROb5K4ysns2yj+A62br4rN4lf4feJjOxID04AI2wTcxU5gq3l/G3uTu 3VSa7yv73KeeyrXBDfxTsJMMOVWVOMJpBvPAkiJzUnTXlGKBI2ApikDDsbJ4HthXw6AF 3MMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=os4uNrF2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113057-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113057-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. [139.178.88.99]) by mx.google.com with ESMTPS id im15-20020a170902bb0f00b001ddd40bbd6asi3918829plb.25.2024.03.24.16.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:13:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113057-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=os4uNrF2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113057-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113057-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 71132280E8A for ; Sun, 24 Mar 2024 23:13:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8B23145B3D; Sun, 24 Mar 2024 22:37:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="os4uNrF2" 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 CEFBC145B1B; Sun, 24 Mar 2024 22:37:45 +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=1711319865; cv=none; b=D6Mdh0Zt8HJkY/Cpim6x0W+h6QVrQBU2wlob4KvKpQzQ39djAH3lS7GR5rItOQoRHz7F2/VFfuk6sx7sC9dSlu5VodRDJKjnsqhBgw4ZnoUdUcmKuAeLTwcxysqTm+ywlfkfK+UuSqCo1XqsSLZQeTTy34dQiXwlRyaVIlacqdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319865; c=relaxed/simple; bh=2q6oHfjoHzX8gP5qDR5Um+xcUNC7XmVJXbcW1TFzcOM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d0DADdATAv5G6tYgiVtK2NFKzGTM4QGUPV0CT6wBOn2vr4JgqhjglI4FRSbHn3PY5h8o3aulm2Nh6mPm9CMcGNwTEbfWQfF/YpO3uFnc50fWOYKBcomv0hI0MPAc9uCQj6Gf6mnhM89V2YVE1l0WkYyhORyTGhN70/RJ1ACSARw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=os4uNrF2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DB32C433C7; Sun, 24 Mar 2024 22:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319865; bh=2q6oHfjoHzX8gP5qDR5Um+xcUNC7XmVJXbcW1TFzcOM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=os4uNrF27X8vpdiUuNmGr7rHbMcQ7RgkCxYVv7uXmpoUwiHAjsPX/Bw+iLni4Z++v RKFYnrlyRH6DprlgLPqi9TZTB5v7cj0+wHuAjPCd44vaMHENf66xaxywoEfqdJlg+Y dvGqIcYTc1COLfmxdpVxkNQ4SOrZpe5G8SlYRG8wIQVWSFDAlaZwYM+lJ1b2vFkAbN krrOGTMPIVX9Z06Hif6e3agEF0d+6NrCovGuoBNmhZ6+MyBI33oPanm59eO4An3whT SBXph8xfEa92ui+t4Lkd4oB9BcywIPYhkZ11gknWDyuMWAnlk1I7twsAgdGRZi4ofM VaBL70/d3qG7A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.8 170/715] wifi: iwlwifi: properly check if link is active Date: Sun, 24 Mar 2024 18:25:49 -0400 Message-ID: <20240324223455.1342824-171-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: Miri Korenblit [ Upstream commit 556c7cd721b5262579ba1710c3b4e7ffdb5573ac ] Before sending SESSION PROTECTION cmd the driver verifies that the link for which the cmd is going to be sent is active. The existing code is checking it only for MLD vifs, but also the deflink (in non-MLD vifs) needs to be active in order the have a session protection for it. Fix this by checking if the link is active also for non-MLD vifs Fixes: 135065837310 ("wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd") Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg Link: https://msgid.link/20240205211151.c61820f14ca6.Ibbe0f848f3e71f64313d21642650b6e4bfbe4b39@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c index 98c64ae315e68..da00ef6e4fbcf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -706,8 +706,7 @@ static int iwl_mvm_get_session_prot_id(struct iwl_mvm *mvm, "Invalid link ID for session protection: %u\n", link_id)) return -EINVAL; - if (WARN(ieee80211_vif_is_mld(vif) && - !(vif->active_links & BIT(link_id)), + if (WARN(!mvmvif->link[link_id]->active, "Session Protection on an inactive link: %u\n", link_id)) return -EINVAL; -- 2.43.0