From patchwork Wed Dec 23 08:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1419836 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D16jN5jTtz9sVJ; Wed, 23 Dec 2020 20:04:56 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ks04e-00043R-9j; Wed, 23 Dec 2020 09:04:48 +0000 Received: from mail-pl1-f175.google.com ([209.85.214.175]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1krzzf-0000QV-7l for kernel-team@lists.ubuntu.com; Wed, 23 Dec 2020 08:59:39 +0000 Received: by mail-pl1-f175.google.com with SMTP id v3so8787973plz.13 for ; Wed, 23 Dec 2020 00:59:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E1+9s3OOrfM0dOPADN0rsXlV+Hpze97LOeZE3AXl3Cc=; b=SNjaqgNjcasYjT385gZSuEwqNH38/p2ikKCh+cdwFXZsZsx7Vp3fPSrnh8/1rF9VFs EACqMJavAHHI5I99//AUZsvCfr4ANLo+IgmLNyJiGo4nH2UvlkFwDmiofwbH/vZ69tUh akp7h0UdQX5TxmIWO0VcSYdXzNXyOhG1xUeb8UjRNPO6/kRy22s5VIXpJSK41XUVhJP0 ow+QN1tf5OZ4Qw+3HR+bLzxPqg2WyvZk+TcMe2ZVuOqWmyKjzSIF8aB4uC+LHSyRAPU6 zyc3jRZQIX5ykjAk0itd5ZloHBneobcxMEY6DVA9anGswH4UnznAEIeipztPMlNrlMlz Ts7w== X-Gm-Message-State: AOAM53344nFbI2VMdhmsHwVq7mx2uGG4LkbiDM8ZJSlwRDzsfijsPSTb jdAIneBGmQ2+yl0j1TWRD/YkHlOJrEgo5npZ X-Google-Smtp-Source: ABdhPJzEVrL/gOZ3JU3hSZk3Ojk+Ius0aIjHMtb0au6kGRXF5qlWB6JMQ0KR1KJ7KmYDatmrrIfxug== X-Received: by 2002:a17:902:6b87:b029:dc:3402:18af with SMTP id p7-20020a1709026b87b02900dc340218afmr20394481plk.29.1608713962241; Wed, 23 Dec 2020 00:59:22 -0800 (PST) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id c13sm23397830pfp.147.2020.12.23.00.59.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 00:59:21 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 168/379][SRU][OEM-5.6] cfg80211: reject HT/VHT capabilities on 6 GHz band Date: Wed, 23 Dec 2020 16:48:21 +0800 Message-Id: <20201223085152.554896-169-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223085152.554896-1-vicamo.yang@canonical.com> References: <20201223085152.554896-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.214.175; envelope-from=vicamo@gmail.com; helo=mail-pl1-f175.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Johannes Berg BugLink: https://bugs.launchpad.net/bugs/1879633 On the 6 GHz band, HE should be used, but without any direct HT/VHT capabilities, instead the HE 6 GHz band capabilities will capture the relevant information. Reject HT/VHT capabilities here. Link: https://lore.kernel.org/r/20200528213443.bfe89c35459a.Ibba5e066fa0087fd49d13cfee89d196ea0c68ae2@changeid Signed-off-by: Johannes Berg (cherry picked from commit 461ce35d5535c1479384f67fcf4bfc3f3610edca) Signed-off-by: You-Sheng Yang --- net/wireless/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/wireless/core.c b/net/wireless/core.c index ee5bb8d8af04..8c2828b5241f 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -5,7 +5,7 @@ * Copyright 2006-2010 Johannes Berg * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -804,6 +804,11 @@ int wiphy_register(struct wiphy *wiphy) !sband->n_bitrates)) return -EINVAL; + if (WARN_ON(band == NL80211_BAND_6GHZ && + (sband->ht_cap.ht_supported || + sband->vht_cap.vht_supported))) + return -EINVAL; + /* * Since cfg80211_disable_40mhz_24ghz is global, we can * modify the sband's ht data even if the driver uses a