RE: [PATCH rtw-next v7 2/5] wifi: rtw89: handle negative rate index for injected frames

From: Ping-Ke Shih

Date: Thu Nov 19 2026 - 02:11:55 EST


Enver Ikromov <owner@xxxxxxxxxxxxxx> wrote:
> When user space injects a frame with a radiotap rate that is not
> supported on the current band (for example 1 Mbps CCK on 5 GHz),
> mac80211 sets the rate index to -1. Storing that index in an unsigned
> byte turns it into 0xff and programs an invalid hardware rate into the
> TX descriptor.
>
> Clamp negative rate indices to 0 so the lowest valid band rate (1 Mbps
> on 2.4 GHz, 6 Mbps on 5/6 GHz) is selected.
>
> Fixes: e96abe4fd7cd ("wifi: rtw89: consider data rate/bandwidth/GI for injected packets")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Enver Ikromov <owner@xxxxxxxxxxxxxx>

Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>