From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: christophergriffin05@gmail.com,
Jeff Johnson <jjohnson@kernel.org>,
John Crispin <john@phrozen.org>, Kalle Valo <kvalo@kernel.org>,
Shashidhar Lakkavalli <slakkavalli@datto.com>,
P Praneesh <quic_ppranees@quicinc.com>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
linux-kernel@vger.kernel.org,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>,
ath12k@lists.infradead.org
Subject: Re: [PATCH ath-next 1/2] wifi: ath11k: don't bit-reverse the firmware's PPE thresholds
Date: Thu, 5 Nov 2026 22:34:53 +0530 [thread overview]
Message-ID: <b60c4c56-483b-406e-92ab-643b0fdf2dc8@oss.qualcomm.com> (raw)
In-Reply-To: <20261104-ath-ppe-thresholds-bit-order-v1-1-0f569106cbc4@gmail.com>
On 11/5/2026 10:47 AM, Christopher Griffin via B4 Relay wrote:
> From: Christopher Griffin <christophergriffin05@gmail.com>
>
> The firmware reports its PPE thresholds as WMI defines them: in
> ppet16_ppet8_ru3_ru0[nss], each RU has six bits, PPET16 in bits 2:0 and
> PPET8 in bits 5:3, each a 3-bit constellation index. The PPE Thresholds
> field of the HE Capabilities element carries the same two subfields in
> the same order, bit 0 first, and ath11k_peer_assoc_h_he() already
yes, but ath11k_peer_assoc_h_he() logic seems to be too complicated as
well with << 5 and >> 1 for each iteration. Looks we need to simplify
that with just,
val |= ((he_cap->ppe_thres[bit / 8] >> (bit % 8)) & 0x1) << i;
May be in a separate patch.
> converts a peer's field to the WMI layout that way.
>
> ath11k_gen_ppe_thresh(), which builds our own field from the firmware's,
> swaps the two halves and then writes the six bits from the top down.
> That puts PPET16 first again, but with its three bits reversed, and the
> same for PPET8: a threshold of 1 (QPSK) is advertised as 4 (256-QAM),
> 4 as 1, 3 (64-QAM) as 6 (reserved) and 6 as 3. Only 0, 2, 5 and 7 (none)
> come out right, so the bug does not show with firmware that asks for
> 16 us padding at every constellation (PPET16 0, PPET8 7).
>
> Copy the six bits in order.
>
> IPQ8074 (WLAN.HK.2.9.0.1-02146) and QCN9074 (WLAN.HK.2.5.r4-00683)
> firmware report PPET16 0 and PPET8 7 everywhere (iw phy: PPE Threshold
> 0x7b 0x1c 0xc7 0x71 ...), which reads the same either way, so their HE
> capabilities do not change. Compile-tested.
>
> Fixes: 9f056ed8ee01 ("ath11k: add HE support")
> Assisted-by: Claude:claude-opus-5-5
This tag may not be needed as per latest guidelines
> Signed-off-by: Christopher Griffin <christophergriffin05@gmail.com>
> ---
> drivers/net/wireless/ath/ath11k/mac.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
> index 1a237adaa37d1..8b4e992b609a6 100644
> --- a/drivers/net/wireless/ath/ath11k/mac.c
> +++ b/drivers/net/wireless/ath/ath11k/mac.c
> @@ -5825,8 +5825,7 @@ static void ath11k_gen_ppe_thresh(struct ath11k_ppe_threshold *fw_ppet,
> continue;
> val = (fw_ppet->ppet16_ppet8_ru3_ru0[nss] >> (ru * 6)) &
> 0x3f;
> - val = ((val >> 3) & 0x7) | ((val & 0x7) << 3);
> - for (i = 5; i >= 0; i--) {
> + for (i = 0; i < 6; i++) {
> he_ppet[bit / 8] |=
> ((val >> i) & 0x1) << ((bit % 8));
> bit++;
>
--
Ramesh
next prev parent reply other threads:[~2026-11-05 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 5:17 [PATCH ath-next 0/2] wifi: ath11k/ath12k: " Christopher Griffin via B4 Relay
2026-11-05 5:17 ` [PATCH ath-next 1/2] wifi: ath11k: " Christopher Griffin via B4 Relay
2026-11-05 17:04 ` Rameshkumar Sundaram [this message]
2026-11-05 5:17 ` [PATCH ath-next 2/2] wifi: ath12k: " Christopher Griffin via B4 Relay
2026-11-05 17:12 ` [PATCH ath-next 0/2] wifi: ath11k/ath12k: " Rameshkumar Sundaram
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=b60c4c56-483b-406e-92ab-643b0fdf2dc8@oss.qualcomm.com \
--to=rameshkumar.sundaram@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=christophergriffin05@gmail.com \
--cc=jjohnson@kernel.org \
--cc=john@phrozen.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_ppranees@quicinc.com \
--cc=slakkavalli@datto.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®