From: Shaul Triebitz <shaul.triebitz@xxxxxxxxx> The HE 6GHz capability IE should be added to the association request only when operating in the 6GHz band. Signed-off-by: Shaul Triebitz <shaul.triebitz@xxxxxxxxx> Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx> --- net/mac80211/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 0a0481f5af48..a0ff27487686 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -6,7 +6,7 @@ * Copyright 2007 Johannes Berg <johannes@xxxxxxxxxxxxxxxx> * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * utilities for mac80211 */ @@ -2950,6 +2950,9 @@ void ieee80211_ie_build_he_6ghz_cap(struct ieee80211_sub_if_data *sdata, if (!sband) return; + if (sband->band != NL80211_BAND_6GHZ) + return; + iftd = ieee80211_get_sband_iftype_data(sband, iftype); if (WARN_ON(!iftd)) return; -- 2.32.0