Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
iwx: check for MIMO peer support on MA devices
To:
tech@openbsd.org
Date:
Tue, 10 Mar 2026 10:31:16 +0100

Download raw body.

Thread
In practice, virtually all 11n/11ac APs do support MIMO. But regardless
we should be checking whether MIMO-capable Rx rates were announced before
sending frames using MIMO rates to the AP.

ok?

path + /usr/src
commit - bcd423a398c7cef4cae8fc7ab710c0b896ee8499
blob - a468e32fe4b545158a8fce60bdcdeed7e84349e3
file + sys/dev/pci/if_iwx.c
--- sys/dev/pci/if_iwx.c
+++ sys/dev/pci/if_iwx.c
@@ -6832,8 +6832,16 @@ iwx_mld_add_sta_cmd(struct iwx_softc *sc, struct iwx_n
 	sta_cmd.assoc_id = htole32(IEEE80211_AID(in->in_ni.ni_associd));
 
 	if (in->in_ni.ni_flags & IEEE80211_NODE_HT) {
-		if (iwx_mimo_enabled(sc))
-			sta_cmd.mimo = htole32(1);
+		if (iwx_mimo_enabled(sc)) {
+			if (in->in_ni.ni_flags & IEEE80211_NODE_VHT) {
+				uint16_t rx_mcs = (in->in_ni.ni_vht_rxmcs &
+				    IEEE80211_VHT_MCS_FOR_SS_MASK(2)) >>
+				    IEEE80211_VHT_MCS_FOR_SS_SHIFT(2);
+				if (rx_mcs != IEEE80211_VHT_MCS_SS_NOT_SUPP)
+					sta_cmd.mimo = htole32(1);
+			} else if (in->in_ni.ni_rxmcs[1] != 0)
+				sta_cmd.mimo = htole32(1);
+		}
 
 		mpdu_dens = (in->in_ni.ni_ampdu_param &
 		    IEEE80211_AMPDU_PARAM_SS) >> 2;