sys/iwx: add VHT beamformer and beamformee advertisement

"Kirill A. Korinsky" <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
tech@,

This is one of two fogotten hunk from my 160MHZ large diff for iwx0.

I run it on my laptop for... quite a few months, against different networks.
Works fine.

The idea is following iwlwifi and add VHT beamforming capability
advertisement. Advertise VHT SU beamformer when firmware reports beamformer
support and the LQ SS_PARAMS API. Advertise VHT SU and MU beamformee
capabilities, using the same with Linux hardcoded beamformee STS value of 3.

Ok?

Index: sys/dev/pci/if_iwx.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwx.c,v
diff -u -p -r1.228 if_iwx.c
--- sys/dev/pci/if_iwx.c	2 Apr 2026 11:19:45 -0000	1.228
+++ sys/dev/pci/if_iwx.c	2 Apr 2026 16:09:18 -0000
@@ -3291,8 +3291,20 @@ iwx_setup_vht_rates(struct iwx_softc *sc
 	ic->ic_vhtcaps &= ~(IEEE80211_VHTCAP_RX_ANT_PATTERN |
 	    IEEE80211_VHTCAP_TX_ANT_PATTERN |
 	    IEEE80211_VHTCAP_TX_STBC |
-	    IEEE80211_VHTCAP_RX_STBC_SS_MASK);
-	ic->ic_vhtcaps |= (1 << IEEE80211_VHTCAP_RX_STBC_SS_SHIFT);
+	    IEEE80211_VHTCAP_RX_STBC_SS_MASK |
+	    IEEE80211_VHTCAP_SU_BEAMFORMER |
+	    IEEE80211_VHTCAP_SU_BEAMFORMEE |
+	    IEEE80211_VHTCAP_BEAMFORMEE_STS_MASK |
+	    IEEE80211_VHTCAP_MU_BEAMFORMEE);
+
+	ic->ic_vhtcaps |= (1 << IEEE80211_VHTCAP_RX_STBC_SS_SHIFT) |
+	    IEEE80211_VHTCAP_SU_BEAMFORMEE |
+	    (3 << IEEE80211_VHTCAP_BEAMFORMEE_STS_SHIFT) |
+	    IEEE80211_VHTCAP_MU_BEAMFORMEE;
+
+	if (isset(sc->sc_enabled_capa, IWX_UCODE_TLV_CAPA_BEAMFORMER) &&
+	    isset(sc->sc_ucode_api, IWX_UCODE_TLV_API_LQ_SS_PARAMS))
+		ic->ic_vhtcaps |= IEEE80211_VHTCAP_SU_BEAMFORMER;
 
 	if (num_rx_ant == 1)
 		ic->ic_vhtcaps |= IEEE80211_VHTCAP_RX_ANT_PATTERN;

-- 
wbr, Kirill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.