From: kevlo Date: Thu, 27 Apr 2023 03:28:34 +0000 (+0000) Subject: Fix logic error in rtwn_r92e_get_txpower(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c0ae0cef134fa3836ee9f04fa89e4d351881705f;p=openbsd Fix logic error in rtwn_r92e_get_txpower(). The RTL8192EU is up to two stream TX/RX (so MCS0->15). ok stsp@ --- diff --git a/sys/dev/ic/rtwn.c b/sys/dev/ic/rtwn.c index e3cbda3e656..bf5d79a0c5d 100644 --- a/sys/dev/ic/rtwn.c +++ b/sys/dev/ic/rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtwn.c,v 1.55 2023/04/27 03:19:45 kevlo Exp $ */ +/* $OpenBSD: rtwn.c,v 1.56 2023/04/27 03:28:34 kevlo Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -2233,7 +2233,7 @@ rtwn_r92e_get_txpower(struct rtwn_softc *sc, int chain, } } - for (ridx = RTWN_RIDX_MCS0; ridx < RTWN_RIDX_MCS15; ridx++) { + for (ridx = RTWN_RIDX_MCS0; ridx <= RTWN_RIDX_MCS15; ridx++) { power[ridx] = (ridx < RTWN_RIDX_MCS8) ? htpow : htpow2s; if (power[ridx] > R92C_MAX_TX_PWR) power[ridx] = R92C_MAX_TX_PWR;