Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2417296rbb; Wed, 28 Feb 2024 00:42:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4rcHdYaEOyxQ3OFnOaTs4kH3gohzIKPgE+7N9OmhsYJ8iUvJBK4BWRUKN+X8pTTJcSbep6nwTRMsTBxjDZnGF57stKL2dHseuN/DX4g== X-Google-Smtp-Source: AGHT+IHJy7byN3SipikAt/CpRn9eYf3fy7eldTP9bHmGLCMku3OwEIK9K+vExhkwqv4WosB3zJJp X-Received: by 2002:a17:906:4557:b0:a43:1099:7e72 with SMTP id s23-20020a170906455700b00a4310997e72mr1475921ejq.35.1709109767172; Wed, 28 Feb 2024 00:42:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709109767; cv=pass; d=google.com; s=arc-20160816; b=leddFzvG1QZucbehiBGWiQvzSKYFBbwcdKN2FDoKaWNE3qasvZfpKvjIbwnNNvKQzR b9RVL333s3DkvmPw1DLCGpKCxFO73+FiQoDOxjnBeZao5OKeLL20nuSUpM6mqDBle511 EFDM8576KA9fdLIxEqtuM09EnoEvOdht7FSIUKbVlbUZV/htQR2iYMl1XjSbLfIEAbtU pdk6j24eItpFfLgHbvWiKz/blYWPIUpVu9OthH+UIljl9+bgflBQKH8Ow/2BnkrIwETk Q/c4GR+ttV8X1UE/6Allo7s1qOEx7ifWy3T7HzVTjzLX6995YycDsMfynOad8C8AfKPw x1cg== 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=6kCKtxJaSY0/XGNMynEdzrZHbPPrHCM5s06E9TQopE4=; fh=0ZKV22Mpi0Z+/zRlCC9GRUAKl0wLMxmYgR1nXO1NAEs=; b=JHxgjpnl44w6P7oiS8FCi58vq0n7q7xGDnbgfwfl8OGRYQaqx7awGaylaf0UXe2qP4 E9PcKhFfk7AowUfvk+0k4zMdnMRXyPyqrLzpoF0jWRZ/fuLwroaGJKNOOX2n+4cWZ1/O OWpVJNZV8fzWxO0BuG927f0YQpWgxFghlPZpBvVEdewvEtWeP0p21K60QzobxGnjwQrj ix2+F7/4K8ErxIES5q78HyXGgpyb7TNBtiM3KE4oQoB59C88+PKEQgB/ao4FZWTsXWPR ZHaIxtinzkVXof4B839e6W6ggWSRIFqNMq1DekKpndx/wk4gRP6GrMi0Ygm7wbUk/mL0 TQiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ktTf0hUy; 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-4138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4138-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cm27-20020a170906f59b00b00a4306aea0bcsi1501179ejd.146.2024.02.28.00.42.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:42:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ktTf0hUy; 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-4138-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4138-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 362461F282A7 for ; Wed, 28 Feb 2024 08:42:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CB3F2E62E; Wed, 28 Feb 2024 08:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ktTf0hUy" 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 A941A2D052 for ; Wed, 28 Feb 2024 08:42:14 +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=1709109737; cv=none; b=RoPZzjz/Fimj/34MZ2sCd/b/pVKVVObK5Ow0Nq//vEsdtZojXAZt9QjrYc4NMzyq1F0CT7GRSV5DyqzcxN6PHZ0nNxQLZN5iCrGBTe22UcdVjLqvZTkafSx7LVjZ3tCVBMkI9osJXLogmSKdqCzHgkqlCBqYF31RgmLHbPPTvZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709109737; c=relaxed/simple; bh=UKePmUgJH05HarTc1LPIGnmKWcg26cLLRz0nb5GzBEI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Toc/oIZcQjbd8FQt4QeGB+58BuT6SHTiOrdsI5ZYodHqOh4gwzrJB2ZB5YTmSQrw+SxeeYx0pR9f5rDy9+xQbBkFeorIx6E+rCB/2cS73tCah5g54pN7+FLCWpjagBtO3eBeSCYfCxIJDody62UUEp1sSLXzmsnfZw+DJ1Oa6rM= 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=ktTf0hUy; 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=6kCKtxJaSY0/XGNMynEdzrZHbPPrHCM5s06E9TQopE4=; t=1709109734; x=1710319334; b=ktTf0hUypkAczE+Q3enft/ztxB8Ev6X+Sn2jPjPq5eyBtfm 91ercVX6VhB7Y/Bo57DA/wG757i3rf8rM+9zdbkLyy565brYXAckVd8gm9qpBOWsBGdBtZFbgGUcW BkiJMKCiQP2e6QcPFArzrokLNfOparPQCTR9jAJIMe0iyfSVaZ5QJwEqikGL3HvSA/h7PJiMyGBbU SW4GhRYC9oQFebghCRu0xnOzTUay1arqunQaJA053kr+ZdmgaZl2g0kbglo0OLIzNpFKQwywDx1Vj /WuxcbloUSAjZPSegY2x9OxvkLZYeHmgOZ3BaCwuBdjG72OMjczfUIQWB6EVm2jw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rfFVz-0000000BzmR-0F61; Wed, 28 Feb 2024 09:42:11 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH 1/2] wifi: mac80211: don't add VHT capa on links without them Date: Wed, 28 Feb 2024 09:40:51 +0100 Message-ID: <20240228094207.bfe4283bcde7.Ib70a558bc6bdbcec3d9e663079229dfcc2493682@changeid> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228084207.18142-4-johannes@sipsolutions.net> References: <20240228084207.18142-4-johannes@sipsolutions.net> 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 a link doesn't have VHT capability, before the rework we'd have set IEEE80211_CONN_DISABLE_VHT, but now with the linear progression of 'mode', we no longer have that. Add an explicit check for VHT being supported, so we don't add a zeroed VHT capabilities element where it shouldn't be. Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process") Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5f2e9f5e1779..fa0d679b78f4 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1319,7 +1319,8 @@ static size_t ieee80211_assoc_link_elems(struct ieee80211_sub_if_data *sdata, offset); if (sband->band != NL80211_BAND_6GHZ && - assoc_data->link[link_id].conn.mode >= IEEE80211_CONN_MODE_VHT) { + assoc_data->link[link_id].conn.mode >= IEEE80211_CONN_MODE_VHT && + sband->vht_cap.vht_supported) { bool mu_mimo_owner = ieee80211_add_vht_ie(sdata, skb, sband, &assoc_data->link[link_id].ap_vht_cap, -- 2.43.2