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

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

cfg80211: require HE capabilities for 6 GHz band

On 6 GHz band, HE capabilities must be available for all of
the interface types, otherwise we shouldn't use 6 GHz. Check
this.

Link: https://lore.kernel.org/r/20200528213443.5881cb3c8c4a.I583b54172f91f98d44af64a16c5826fe458cbb27@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Git-commit: f438136528482f98535889c9a6f99bbacdd92870
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git


CRs-Fixed: 2743684
Change-Id: Ib3215998292cbe792172670ca6a1d99b191812a4
Signed-off-by: default avatarVinita S. Maloo <vmaloo@codeaurora.org>
parent f0eb686e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -746,6 +746,7 @@ int wiphy_register(struct wiphy *wiphy)
	/* sanity check supported bands/channels */
	for (band = 0; band < NUM_NL80211_BANDS; band++) {
		u16 types = 0;
		bool have_he = false;

		sband = wiphy->bands[band];
		if (!sband)
@@ -811,8 +812,17 @@ int wiphy_register(struct wiphy *wiphy)
				return -EINVAL;

			types |= iftd->types_mask;

			if (i == 0)
				have_he = iftd->he_cap.has_he;
			else
				have_he = have_he &&
					  iftd->he_cap.has_he;
		}

		if (WARN_ON(!have_he && band == NL80211_BAND_6GHZ))
			return -EINVAL;

		have_band = true;
	}