mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
BACKPORT: 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. Bug: 163110886 Link: https://lore.kernel.org/r/20200528213443.5881cb3c8c4a.I583b54172f91f98d44af64a16c5826fe458cbb27@changeid Signed-off-by: Johannes Berg <[email protected]> Change-Id: I6091b10c85d34eb7ec8324a8e6d5ea3e1efecedc (cherry picked from commit f438136528482f98535889c9a6f99bbacdd92870) Signed-off-by: Vamsi Krishna <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
09d507219a
commit
5f6376aaae
1 changed files with 10 additions and 0 deletions
|
|
@ -788,6 +788,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)
|
||||
|
|
@ -853,8 +854,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue