diff mbox series

[01/31] mac80211: add HE 6GHz cap IE in 6GHz band only

Message ID iwlwifi.20210618133832.290bf5c87030.I178aff1c3a6e32456d4ac9238e4a2eb47d209ccd@changeid
State New
Headers show
Series cfg80211/mac80211 patches from our internal tree 2021-06-18 | expand

Commit Message

Luca Coelho June 18, 2021, 10:41 a.m. UTC
From: Shaul Triebitz <shaul.triebitz@intel.com>

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@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/util.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

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@sipsolutions.net>
  * 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;