Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp577476rdb; Mon, 29 Jan 2024 11:01:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IENF0UZUKqFjHPwgqxY2g3GKdAKJx59y4jGZzvvmQK9hs1bFfZOHZAywswUVwpJlzZgYVhq X-Received: by 2002:a17:907:a0d3:b0:a35:278:1c23 with SMTP id hw19-20020a170907a0d300b00a3502781c23mr8702936ejc.35.1706554866749; Mon, 29 Jan 2024 11:01:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706554866; cv=pass; d=google.com; s=arc-20160816; b=scfHHzEE3MJqoBDv7c7odxt2V+YQFgUP28+DcfvhqgugSt/IIePlEhksctMdt6W4Tq oMnZLeG2rJFp9UdUEUPtqJg46bi7wi3QnlvJJh49K1VQTZCHB1oG6jrlwP0v/PK8acP1 f5JhqH33P3PU3MUQz7BhfcHKl+BKpJX4lytNpGGGKAyoun0GdSRgRCda06IOSIYJBs+w K6NvgtRPwceheN9pFOIINdb3hawmrKvrPyrpgfeT/1OgPifvz/sgfUJkdusebkaz+p8l WY/wUFFVQp3B8ItvzFIqY47HDZAH7cXhlS6fj67e37fhNp9hasSubYh0EPT213QIZnkO HBcQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=rRcn+qgYpoXfyfNOBOtN2tvNKZ4+uKF2SFfvhVq6eWk=; fh=zDtiOOxtaLTZzex/pgpjhENubnC5l3z3mK6kfqXHC1I=; b=mXECMqrTDz6c2AuWi5QN3gwMA+3hFf0iTzzeIlTqp9a8ABYUvGoKnmKwd24zUx0wdg zq14jo0B2RPaytFalTLOqPJy95jUG+3AbLbodsqRRcSUVm06ipEw+O/VdEEiR7hlF6M1 L2xfdX/HgO7luDT3tZsHSD6gI+5GQ0jKT44rTTco1sCyEnbeUTsXaocIYACQn6vHeQh8 eUEgt5yeetn02MNqZvfr6hGR4/dpgXG1evfJqKGsUFt3HkaWjLfjXcdXH2CXZxEoF3BQ 73/F1jpDd0dxUEb+01dUiGhekG2zkQeNd91Ru88fmZoarb9Xl5nwO6Sab7jGkoOyt9Bi ZxBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=htFUGfmj; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-2702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net X-Forwarded-Encrypted: i=1; AJvYcCUaLQFTmPKuuRKStCXgEoIGxdltzuUoSNvMfixwz5qMIs0d9v3S5SBTsa3oDSniLKAXWrapOFHqv8nOpOu7ZE/HVnPfGGbbNAHkK0KyOA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u26-20020a1709063b9a00b00a35a09a326dsi1473091ejf.961.2024.01.29.11.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 11:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2702-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=@sipsolutions.net header.s=mail header.b=htFUGfmj; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-2702-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 75E511F222BB for ; Mon, 29 Jan 2024 19:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E1BADDBC; Mon, 29 Jan 2024 19:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="htFUGfmj" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 D5A632E84D for ; Mon, 29 Jan 2024 19:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706554862; cv=none; b=iF/JRS75uD3g1oTBAYCqyn03xblZ8RolJW88Qvhq8/cN7LFJamHz9KpUyPW5EOHP7pV60c9OnKdrFxjeKdOsaGFQA8MX/1ihUKm1eQLkW+GUNrUC12Ey9fiV5oZrkWi77TziUVKipvpSsJIA3ApPSkWInRpAW+jJz0tb72ZvnyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706554862; c=relaxed/simple; bh=mPa10nyf13l86zZZOqYww/Dw0Gtbihdyr/EQYTCqpV8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qq9eW/VhfCxVE63yQcm1+eiGOFSWgvTzIoTpE5S8GWMseH9+Gt9/xOs+s+pNbxRwsQStx68tSmHSYPECAiL2x7ibMMhUO/W1xviZMQxNCQKN9/EvXMlRxLjJH8wWLPjiO1sVcDCFqHAmUhCeOOjqZ2XIfJmgD6L//lFT9VNJ054= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=htFUGfmj; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=rRcn+qgYpoXfyfNOBOtN2tvNKZ4+uKF2SFfvhVq6eWk=; t=1706554860; x=1707764460; b=htFUGfmj3JcZS0KxITjNuU00ktf3hHKb2DzQP4TxcxsscTql38g7U3Kk3SUhE0UDSfvuQ0TNmFu 3mirppL3ivsGCLPPswIRgmAujjRwUiJOEA15KnkXVzrEzxQfxcCe7gB8IContG/iHIhqrTcp6QOAg T5HHM5SIKdndUPTLj31Fn76n+E0s7c7OOSPhM9VtXiYRUrZRTp7qcFvE1jYwI9KqbA886RCNNkUxS FawBXeGoDbawd7JbYKTZf4zv7ST/c6TsiAH4sOGmNezF1Bw8H897Y+nFey1xNnWQdg3ssNIVdKl4j PZvPSH5HDfgiKK8fUYnKMza+HNo4935MIXyw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rUWsM-00000004zxs-0wBJ; Mon, 29 Jan 2024 20:00:58 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 1/2] wifi: mac80211_hwsim: enable all links only in MLO Date: Mon, 29 Jan 2024 20:00:52 +0100 Message-ID: <20240129200054.f5459f6c29c8.I397814449e17950fcf882ef44a1e790a71aa1dce@changeid> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Miri Korenblit The existing code is enabling all usable links when moving to authorized state, but this should happen only for MLO connections. Fix this. Signed-off-by: Miri Korenblit --- drivers/net/wireless/virtual/mac80211_hwsim.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 59ec6aa5ac26..907c0842fee7 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -4,7 +4,7 @@ * Copyright (c) 2008, Jouni Malinen * Copyright (c) 2011, Javier Lopez * Copyright (c) 2016 - 2017 Intel Deutschland GmbH - * Copyright (C) 2018 - 2023 Intel Corporation + * Copyright (C) 2018 - 2024 Intel Corporation */ /* @@ -2671,10 +2671,11 @@ static int mac80211_hwsim_sta_state(struct ieee80211_hw *hw, return mac80211_hwsim_sta_add(hw, vif, sta); /* - * when client is authorized (AP station marked as such), - * enable all links + * in an MLO connection, when client is authorized + * (AP station marked as such), enable all links */ - if (vif->type == NL80211_IFTYPE_STATION && + if (ieee80211_vif_is_mld(vif) && + vif->type == NL80211_IFTYPE_STATION && new_state == IEEE80211_STA_AUTHORIZED && !sta->tdls) ieee80211_set_active_links_async(vif, ieee80211_vif_usable_links(vif)); -- 2.43.0