Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1164414lqb; Thu, 18 Apr 2024 01:53:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWonCCuTZzi/CVEK2TtVRqRrvgKtUmv3SY34rwktV08J18vCSg2VFO3hJ5hoNhaiMq2zXFKWg5H3XOkwyKrUGXYy/nGJGMMe/4EtRdMbw== X-Google-Smtp-Source: AGHT+IFdzQj1pTh/kvx6rl8DB8KljFbSynIBATYrcwD/4wPEUzCoAibjGLce14AzGduq7vE380Oj X-Received: by 2002:a17:90a:6282:b0:2a9:e879:c83d with SMTP id d2-20020a17090a628200b002a9e879c83dmr2495870pjj.5.1713430401703; Thu, 18 Apr 2024 01:53:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713430401; cv=pass; d=google.com; s=arc-20160816; b=KjuQ4Qzv9vZVrfN50Zj7HA50SVMESuwH29h/fwdF93sRMz9oVdNlcmDYU7l/J8ZsoH dQQEZ/LcqzVkM4xgcRfShgOt6KRomc/JJEWXEhifDIMnS/EnMowLqPJen/nRXzcs507N 7ge85hpM/cTiGXwEIAcsWHnW3LRzpPa7Ledrjwhl0Y4jHaz//yuW44MbdnZrhpE2Qagc wPaybn7pWD7hyd3Q4o3a54Qkm4dIqFUH/7An8UAz9m2Bazf4w1UVlErD5TiPelRGK8s/ lmMzdZHUI4aMgdyihvshXFRBl9FbCa9QFVnhn4Bg/OI3ag18GkGQPX75soCl5J5RfSbH Iqug== 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=QU2gUPFup3r6nTJn+Hbmd95Utnrgxk9QPq90kMGKeSk=; fh=0ZKV22Mpi0Z+/zRlCC9GRUAKl0wLMxmYgR1nXO1NAEs=; b=i8u1o1d1a1X3p8MFgu6M8zNx/CUAHG0TJUdZB08kMjfYd/OD/OImommul7mj+Cvkgi y69/F7YSdBTOXpCgqo46UOgM5Brv1WJFlR0k8GJN3m7+4aOf66DS7a2tbWJPAq6c5tLA gZiGwQ0jKpvsygKzBCWpVPEFvum6SFsgWM1R6XG0k+qcyAHtTmusH7AuETrphezWQGm5 1EuuQTWIrXuItHQ7gMqsWw7dk69t97ImRudxwVXng9XbG1QtP+9yQXfuR71k+4Iw8nFx x0NkN/46umxDrb8H7Mzd0VU/95o5m3lfY3aMH3LH4O34Be/7T4myxBdkLVEnQpf31ZVM rwfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=LIGL2uMz; 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-6507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k2-20020a632402000000b005dc47b71821si1017072pgk.572.2024.04.18.01.53.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 01:53:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6507-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=@sipsolutions.net header.s=mail header.b=LIGL2uMz; 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-6507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6507-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0FAE5B22476 for ; Thu, 18 Apr 2024 08:52:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AABF215AADD; Thu, 18 Apr 2024 08:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="LIGL2uMz" 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 CF4D115AAB2 for ; Thu, 18 Apr 2024 08:52:33 +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=1713430356; cv=none; b=sEnZzm9cB6cfuFBZzhvkqPlbY+EmQhmg7LWeufPCqP6rELdlu5Ocle1aPXu/+bGq0dCTu7ZooKNKmg+mN1kxymVIIjQm5iSw40q3KC7rWypXhVjpILbZXn1WkTd0xOhMwu2XjLwzbc5sxwybFqMGc6ARFv5BIk/K3lG1lOsFNj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713430356; c=relaxed/simple; bh=FZWjRDeZ7I3Jm48qImbEx1ZJtfTBKfdaZZR1Si5EMds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G7pi5YrCusOybkC5qaB+Jit/DHHWbx08GTSFdf679bqM8tgMY4X5SVGs+DpQZJ7++3FzzSZc1zp0v5WOjUt1vdZTW7OOtLhgu8dOK9WPW4vfxN6sWLeJ7pwWf/Kyh7ZvdZvJio2LebTQAZu57QjvvGhS3c5mW9OUQFM4X9GpN1I= 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=LIGL2uMz; 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: References:In-Reply-To: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; bh=QU2gUPFup3r6nTJn+Hbmd95Utnrgxk9QPq90kMGKeSk=; t=1713430353; x=1714639953; b=LIGL2uMzPmI7FafcJ3o0eDl4Kyq/gYZzcX4QPH1poQetZ/k d0Rbnv+UkLRa1NejMT1+crJm8ZkDN9WbPSSJppZCpEzfaadZbTUirpebVz3TqAee2pG5mObH0LANE +iDhEC/7q52vp7kXM/u5sGHt6F2hleF6ww2X8i9fD034uHi7mjVBNhu2wrWw6KUdMxgcDBWphGwa6 9TzEywqSUtdjpcbc+oPy9Sa9tAdH+pimzyCexDv7MQvlsXO0buORbm58W/GlhySQ2NebNeuZcHoML YeGf+DMCQ4AnEBRDRiEhTgwO/qB6d1WVFGsdh0OzNPn1vFn0bHHsdY4UUTiVvn/Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rxNVI-0000000CIvO-3vD7; Thu, 18 Apr 2024 10:52:25 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH wireless 2/8] wifi: mac80211: mlme: re-parse with correct mode Date: Thu, 18 Apr 2024 10:52:20 +0200 Message-ID: <20240418105220.5e0d1fcb5622.Ib0673e0bc90033fd6d387b6a5f107c040eb907cf@changeid> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240418105220.90df97557702.I05d2228ce85c203b9f2d6da8538cc16dce46752a@changeid> References: <20240418105220.90df97557702.I05d2228ce85c203b9f2d6da8538cc16dce46752a@changeid> 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: Johannes Berg When doing re-parsing in ieee80211_determine_chan_mode(), the conn->mode is changed, and the whole point of doing the parsing again was to parse as the downgraded mode. However, that didn't actually work, because the setting was copied before and never changed again. Fix that. Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process") Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index db7128f6c901..98cb475a14c8 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -616,7 +616,6 @@ ieee80211_determine_chan_mode(struct ieee80211_sub_if_data *sdata, .from_ap = true, .start = ies->data, .len = ies->len, - .mode = conn->mode, }; struct ieee802_11_elems *elems; struct ieee80211_supported_band *sband; @@ -625,6 +624,7 @@ ieee80211_determine_chan_mode(struct ieee80211_sub_if_data *sdata, int ret; again: + parse_params.mode = conn->mode; elems = ieee802_11_parse_elems_full(&parse_params); if (!elems) return ERR_PTR(-ENOMEM); -- 2.44.0