summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index b352d1d87bf0..fab4bb1948e3 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1939,7 +1939,9 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_sub_if_data *sdata,
he_cap = ieee80211_get_he_iftype_cap(sband,
ieee80211_vif_type_p2p(&sdata->vif));
- if (he_cap) {
+ if (he_cap &&
+ cfg80211_any_usable_channels(local->hw.wiphy, BIT(sband->band),
+ IEEE80211_CHAN_NO_HE)) {
pos = ieee80211_ie_build_he_cap(pos, he_cap, end);
if (!pos)
goto out_err;