RE: [PATCH rtw-next 3/3] wifi: rtl8xxxu: honour the bandwidth of injected frames on gen1 chips

From: Ping-Ke Shih

Date: Sat Nov 21 2026 - 21:06:09 EST


Ahmet Zeren via B4 Relay <devnull+niko3x.proton.me@xxxxxxxxxx> wrote:
> From: Ahmet Zeren <niko3x@xxxxxxxxx>
>
> Injected frames are always sent at 20 MHz, even when they ask for 40 MHz
> on a 40 MHz channel, because only QoS data frames get the 40 MHz bits in
> the TX descriptor.
>
> Set them for injected frames with IEEE80211_TX_RC_40_MHZ_WIDTH.
>
> Tested on RTL8192CU (0bda:8178) on channel 6 HT40+ and HT40-, received
> by a second radio sniffing at 40 MHz: MCS 0 and 7 requested at 40 MHz
> arrive at 40 MHz (without this patch: 20 MHz), requested at 20 MHz they
> stay at 20 MHz.
>
> Signed-off-by: Ahmet Zeren <niko3x@xxxxxxxxx>

A small nit. Otherwise looks good to me

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

> ---
> drivers/net/wireless/realtek/rtl8xxxu/core.c | 23 ++++++++++++++---------
> 1 file changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> index b159d9b64c..2eef4585a8 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> @@ -5281,7 +5281,7 @@ rtl8xxxu_fill_txdesc_v1(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
> u32 rate = 0;
> u16 seq_number;
> int retries;
> - bool inject;
> + bool inject, bw40;

To be in reverse X'mas order, declare it in another line.

>
> inject = rtl8xxxu_tx_rate_inject(tx_info, &rate, &sgi);
> retries = rtl8xxxu_tx_retry_inject(tx_info);

[...]

pw-bot: cr