Re: [PATCH rtw-next v5 02/10] wifi: rtw89: handle negative rate index for injected frames

From: Enver Ikromov

Date: Mon Nov 16 2026 - 10:30:25 EST


On Sun, Nov 15, 2026 at 03:38:45AM +0000, Ping-Ke Shih wrote:
> I don't prefer to describe function name in commit message. Just
> describe the problem you encountered and how to fix it.
> [...]
> How about just set idx = 0 if idx < 0? The existing code can select valid rate,
> since any rate is well for the case idx < 0.

Agreed, clamping negative idx to 0 with max_t(s8, ..., 0) selects 1M
on 2.4 GHz and 6M on 5/6 GHz via the existing path. Tested on RTL8852AE
across 2.4 GHz and 5 GHz. I will also rewrite all commit messages in v6
to be short and direct without function-level flow.

Thanks,
Enver