All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@kernel.org>
To: Jonas Jelonek <jelonek.jonas@gmail.com>, linux-wireless@vger.kernel.org
Cc: thomas.huehn@hs-nordhausen.de, nbd@nbd.name, kvalo@kernel.org,
	johannes.berg@intel.com, lorenzo@kernel.org,
	Jonas Jelonek <jelonek.jonas@gmail.com>
Subject: Re: [PATCH] ath9k: fix per-packet TX-power cap for TPC
Date: Thu, 30 Mar 2023 11:31:38 +0200	[thread overview]
Message-ID: <87wn2ymvph.fsf@toke.dk> (raw)
In-Reply-To: <20230330071854.757154-1-jelonek.jonas@gmail.com>

Jonas Jelonek <jelonek.jonas@gmail.com> writes:

> Fix incorrect usage of plain rate_idx as index into the max (power) per
> rate lookup table.
>
> For transmit power control (TPC), the ath9k driver maintains internal
> tables (in struct ath_hw) to store the max allowed power level per rate.
> They are used to limit a given TX-power according to regulatory and user
> limits in the TX-path per packet. The tables are filled in a predefined
> order, starting with values for CCK + OFDM rates and followed by the
> values for MCS rates. Thus, the maximum power levels for MCS do not
> start at index 0 in the table but are shifted by a fixed value.
>
> The TX-power limiting in ath_get_rate_txpower did not apply this shift,
> thus retrieved the incorrect maximum power level. For example, the
> maximum power for OFDM rate 0 was used for MCS rate 0. If STBC was used,
> the power was mostly limited to 0 because the STBC table is zeroed for
> legacy CCK/OFDM rates. This patch fixes this table lookup.
>
> Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>

So what effect does this bug have in practice? Also, how did you test
the patch? :)

-Toke

  reply	other threads:[~2023-03-30  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  7:18 [PATCH] ath9k: fix per-packet TX-power cap for TPC Jonas Jelonek
2023-03-30  9:31 ` Toke Høiland-Jørgensen [this message]
2023-03-30 10:37   ` Jonas Jelonek
2023-03-30 12:34     ` Toke Høiland-Jørgensen
2023-03-30 13:21       ` Jonas Jelonek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn2ymvph.fsf@toke.dk \
    --to=toke@kernel.org \
    --cc=jelonek.jonas@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=thomas.huehn@hs-nordhausen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.