From 9fb1f10bfcbfc611a885a088a1658b52427addcb Mon Sep 17 00:00:00 2001 From: stsp Date: Mon, 26 Feb 2024 18:00:09 +0000 Subject: [PATCH] fix Tx rate selection for management frames in iwx(4) The Tx rate index stored in ni->ni_txrate is not intended for use with management frames, yet iwx_tx_fill_cmd() was using it anyway. Use the minimum basic rate selected within iwx_tx_fill_cmd() instead. --- sys/dev/pci/if_iwx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 2166d47151a..a2ed6b9e626 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.181 2024/02/16 11:44:52 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.182 2024/02/26 18:00:09 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -6085,13 +6085,12 @@ iwx_tx_fill_cmd(struct iwx_softc *sc, struct iwx_node *in, } else if (sc->sc_rate_n_flags_version >= 2) rate_flags |= IWX_RATE_MCS_LEGACY_OFDM_MSK; - rval = (rs->rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL); if (sc->sc_rate_n_flags_version >= 2) { if (rate_flags & IWX_RATE_MCS_LEGACY_OFDM_MSK) { - rate_flags |= (iwx_fw_rateidx_ofdm(rval) & + rate_flags |= (iwx_fw_rateidx_ofdm(rinfo->rate) & IWX_RATE_LEGACY_RATE_MSK); } else { - rate_flags |= (iwx_fw_rateidx_cck(rval) & + rate_flags |= (iwx_fw_rateidx_cck(rinfo->rate) & IWX_RATE_LEGACY_RATE_MSK); } } else -- 2.20.1