Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2368082lqp; Sun, 24 Mar 2024 16:07:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6hP7Z1qrpt4BHiOSIdY2UVyj6GTefQVPHKgZ5MoAkpS2tMxucLIDIztey5cfU5kYF/TOapFXonQyTyl2lTCeUrQkgri+LccE2HDTeOA== X-Google-Smtp-Source: AGHT+IGfk0rgBntxXHDQlP/PieAnrcdQRfX3xOf2A5ulCfYadoLXjowh87LbPWgbcz4Uyy72ExGs X-Received: by 2002:a17:903:120f:b0:1de:f82b:4c53 with SMTP id l15-20020a170903120f00b001def82b4c53mr7687705plh.12.1711321644238; Sun, 24 Mar 2024 16:07:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711321642; cv=pass; d=google.com; s=arc-20160816; b=V8nA1WRZrhGbkAkxkE2a09Cy1LGHz5QMceulh5proT4rUCE9qK9rj62wQdY0sNKFQc GIOa6VK1r3yfMG9pHB0EJbF5rl2wOMLlPWtoLISJBqMX0DKkwdt5NMPpwQOg3//xm2F0 r4bKtf0zH3Psv+QAp/X+8D+Hw1B00uwYgEitEOaZLc3MQPnFX7CxYuNRA4vHcp9nniIa rlEiFukvfXNBGv8LwaXQ761+nUEilaoP8VeN0/w+C+dqN7r5u96F741IwfkbbjqEe0fK /+K25iQtJb7VTAlFNwvQTQQHB+GY0NCypY0iEy3z4I6NInRtneNrzjisXrQt8Rxnu0bO 2/gw== 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=y0zFEfNxIsNljW1Q/PTQNurfzoXCDPx7P7obPqjn8RM=; fh=Cx50qj1G5Zg1LTUBMyT5IdiHsjsegDh2lHwMe/nYNl0=; b=AI8TkN6ZqqY8AJmWEa0FCb+XHJ7KnhLI/BCzZ2p9E4Au8HFOP6POz6GSdoLtFrzWvA HdCC/VlmR/LFx4sMckzv8oiw2jd7wwT9ww3zPu7cW5t+btDXVbEOtu4eeR7ZCJD0kVe6 K7qvQW4A7P0YJIj2cQKesFgrnhHMHdJjcGpzFS+DRo7FTV7CsF5IR17dZ2CJ+oMOhg1B hjzWPU8HWRxJllVvzIgqFlSgqqHfSQxKyNvI2aQ9A1Gspjzk6olD+9JrNfTmDCHBpJKL 4wQY2QoF9bqYFO3PrDWWTGnY9i9XNWYXZW0m9qbudlqL5HlPfpRW7VHQ3xdvo90Ju+XK 0pqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DX7AAySb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jf20-20020a170903269400b001e05d7b6a38si3851898plb.400.2024.03.24.16.07.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DX7AAySb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112979-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B34CEB20FB3 for ; Sun, 24 Mar 2024 22:56:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F416F12C53F; Sun, 24 Mar 2024 22:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DX7AAySb" 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 1A6DE12BF16; Sun, 24 Mar 2024 22:36:31 +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=1711319792; cv=none; b=MdWdVpGiMmd8m+TA1pykoYSk0PJvK2JVYW63LLhz7+NTXT4ZEmEFprTcujPBBa7G5TxKZms1q/08NO3ipjaUuZ3Ly5Gx4Q/OFCxi9M4AR5VkbGzKwAEJHLCMK6zalbIVE4OScgNOPHlfMtRbAtFkirnhhj3Q6VXpnoyx92aqtzU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319792; c=relaxed/simple; bh=FWe9WRlEAvGjT19jcAwd238r8ebAAw8RYSXfaycOTi4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K4en68KYkJvqm20Stjn3s2ZlCQ4YppDcA91FRC+kjbQyjivpFC1eqUZ0Z4+08998epfQVMADvUTDxUXP8cLkrxpCLGiB8PTysI47m62T0npolzrr3syBeGfPSJHncG7KXAnpctcWQyLpCuHPG2DsGP+jIcVYkIcqOIan9kX9aGY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DX7AAySb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE8B9C43394; Sun, 24 Mar 2024 22:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319791; bh=FWe9WRlEAvGjT19jcAwd238r8ebAAw8RYSXfaycOTi4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DX7AAySbcDl6ynvue4E5RWH/Id+rg1JyYFX6+azWIDfo1wgiE2eFHwcEO2IG1RDIh RMjS8OF5sp3rGQnJmDOuWnem/YDbwNdWP10n0mZlHlDjvHi2exyOaSrrcSCIQ0T4+K Ksnvtl/CT/p4ktn50M8F4zr96P0kVGvOih/hucGEz5f5TVPfooLtSmuY/g7otw3sjA t2MIaa5agdKKGr4jxdx7qqszvSo/6ic0+i4/J+ZK5zDor66VGpnbM+WyRtfSiT2QHZ 3naRXf4OXKhqmDUEj8Vghc/rp076jHYpzVUvqdL+ubtCKXUrJiapkMtfwokCVA4mJz P0DJFjUfr2O2A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Benjamin Berg , Ilan Peer , Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.8 092/715] wifi: mac80211: use deflink and fix typo in link ID check Date: Sun, 24 Mar 2024 18:24:31 -0400 Message-ID: <20240324223455.1342824-93-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: Benjamin Berg [ Upstream commit e10322810ce0d0d4a5a319458c4e1e052c6fe9be ] This does not change anything effectively, but it is closer to what the code is trying to achieve here. i.e. select the link data if it is an MLD and fall back to using the deflink otherwise. Fixes: 0f99f0878350 ("wifi: mac80211: Print local link address during authentication") Signed-off-by: Benjamin Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20240111181514.4c4b1c40eb3c.I2771621dee328c618536596b7e56232df42a79c8@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2022a26eb8811..20d863370796d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -7523,10 +7523,10 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata, if (err) goto err_clear; - if (req->link_id > 0) + if (req->link_id >= 0) link = sdata_dereference(sdata->link[req->link_id], sdata); else - link = sdata_dereference(sdata->link[0], sdata); + link = &sdata->deflink; if (WARN_ON(!link)) { err = -ENOLINK; -- 2.43.0