Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wifi: cfg80211: enforce HE/EHT cap/oper consistency
@ 2026-06-03  9:18 Johannes Berg
  2026-06-03 16:13 ` kernel test robot
  2026-06-03 18:25 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2026-06-03  9:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Xiang Mei

From: Johannes Berg <johannes.berg@intel.com>

Xiang Mei reports that mac80211 could crash if eht_cap is set
but eht_oper isn't. Rather than fixing that for the individual
user(s), enforce that both HE/EHT have consistent elements.

Reported-by: Xiang Mei <xmei5@asu.edu>
Fixes: 22c64f37e1d4 ("wifi: mac80211: Update MCS15 support in link_conf")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/wireless/nl80211.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index dac2e8643c49..76c537a6e8b5 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6714,6 +6714,12 @@ static int nl80211_calculate_ap_params(struct cfg80211_ap_settings *params)
 			return -EINVAL;
 	}
 
+	if (!!params->he_cap != !!params->he_oper)
+		return -EINVAL;
+
+	if (!!params->eht_cap != !!params->eht_oper)
+		return -EINVAL;
+
 	return 0;
 }
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-03 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03  9:18 [PATCH] wifi: cfg80211: enforce HE/EHT cap/oper consistency Johannes Berg
2026-06-03 16:13 ` kernel test robot
2026-06-03 18:25 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox