diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-03-31 11:32:44 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-03-31 11:32:44 +0000 |
commit | 08b48a946e0f1618af828e46c6c00b2150573cb3 (patch) | |
tree | 5e6d32fe04889bdb1a1c7823224ff54e3cd1ef47 /sys/dev | |
parent | 30f467a2db0a8bafc7a88cf4fa02bd8a21998c73 (diff) |
Fix MIMO rates with firmware-based rate scaling in iwm(4).
This is the corresponding entry in Intel's non-existent firmware changelog:
- Firmware now requires MIMO support to be enabled via ADD_STA_CMD flags.
ok tobhe tracey
testing by benno
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 9358d07df78..293b8f57cd7 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.301 2020/03/31 07:23:23 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.302 2020/03/31 11:32:43 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5288,6 +5288,17 @@ iwm_add_sta_cmd(struct iwm_softc *sc, struct iwm_node *in, int update) |= htole32(IWM_STA_FLG_MAX_AGG_SIZE_MSK | IWM_STA_FLG_AGG_MPDU_DENS_MSK); + if (!sc->sc_nvm.sku_cap_mimo_disable) { + if (in->in_ni.ni_rxmcs[1] != 0) { + add_sta_cmd.station_flags |= + htole32(IWM_STA_FLG_MIMO_EN_MIMO2); + } + if (in->in_ni.ni_rxmcs[2] != 0) { + add_sta_cmd.station_flags |= + htole32(IWM_STA_FLG_MIMO_EN_MIMO3); + } + } + add_sta_cmd.station_flags |= htole32(IWM_STA_FLG_MAX_AGG_SIZE_64K); switch (ic->ic_ampdu_params & IEEE80211_AMPDU_PARAM_SS) { @@ -6671,6 +6682,14 @@ iwm_run(struct iwm_softc *sc) } } + /* Update STA again, for HT-related settings such as MIMO. */ + err = iwm_add_sta_cmd(sc, in, 1); + if (err) { + printf("%s: could not update STA (error %d)\n", + DEVNAME(sc), err); + return err; + } + /* We have now been assigned an associd by the AP. */ err = iwm_mac_ctxt_cmd(sc, in, IWM_FW_CTXT_ACTION_MODIFY, 1); if (err) { |