From ffa040899fed0c6822649299ea84b28e10b71a53 Mon Sep 17 00:00:00 2001 From: stsp Date: Sun, 18 Jul 2021 12:21:49 +0000 Subject: [PATCH] Set MIMO-related flags in the iwx(4) ADD_STA command. Not sure how we ended up missing these. MIMO apparently works without the flags set, and setting them doesn't seem to have any immediately visible effect on firmware. But let's be consistent with iwm(4) and iwlwifi. --- sys/dev/pci/if_iwx.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 0183a8b58c7..332d49f38ce 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.66 2021/07/18 12:03:57 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.67 2021/07/18 12:21:49 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -5173,6 +5173,17 @@ iwx_add_sta_cmd(struct iwx_softc *sc, struct iwx_node *in, int update) |= htole32(IWX_STA_FLG_MAX_AGG_SIZE_MSK | IWX_STA_FLG_AGG_MPDU_DENS_MSK); + if (iwx_mimo_enabled(sc)) { + if (in->in_ni.ni_rxmcs[1] != 0) { + add_sta_cmd.station_flags |= + htole32(IWX_STA_FLG_MIMO_EN_MIMO2); + } + if (in->in_ni.ni_rxmcs[2] != 0) { + add_sta_cmd.station_flags |= + htole32(IWX_STA_FLG_MIMO_EN_MIMO3); + } + } + add_sta_cmd.station_flags |= htole32(IWX_STA_FLG_MAX_AGG_SIZE_64K); switch (ic->ic_ampdu_params & IEEE80211_AMPDU_PARAM_SS) { -- 2.20.1