Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0eb686e authored by Johannes Berg's avatar Johannes Berg Committed by Gerrit - the friendly Code Review server
Browse files

cfg80211: reject HT/VHT capabilities on 6 GHz band

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: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: 461ce35d5535c1479384f67fcf4bfc3f3610edca
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git


CRs-Fixed: 2743684
Change-Id: Ifa43d1fc10c35cee2778e27a212fe6e1ad70d487
Signed-off-by: default avatarVinita S. Maloo <vmaloo@codeaurora.org>
parent 519988fe
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
 * Copyright 2006-2010		Johannes Berg <johannes@sipsolutions.net>
 * Copyright 2013-2014  Intel Mobile Communications GmbH
 * Copyright 2015-2017	Intel Deutschland GmbH
 * Copyright (C) 2018-2020 Intel Corporation
 */

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -761,6 +762,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