Linux wireless drivers development
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Mehmet Fide <mehmet.fide@gmail.com>, Ping-Ke Shih <pkshih@realtek.com>
Cc: "Jes Sorensen" <Jes.Sorensen@gmail.com>,
	"Martin Kaistra" <martin.kaistra@linutronix.de>,
	"Kalle Valo" <kvalo@kernel.org>,
	"Taehee Yoo" <ap420073@gmail.com>,
	"Andrea Merello" <andrea.merello@gmail.com>,
	"Georg Müller" <georgmueller@gmx.net>,
	"Shreyansh Khajanchi" <hi@shreyan.sh>,
	linux-wireless@vger.kernel.org, mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next 2/2] wifi: rtl8xxxu: let the 8188e append the FCS to received frames
Date: Tue, 1 Dec 2026 14:12:00 +0200	[thread overview]
Message-ID: <16b1d1b0-4e83-49c2-ac6a-9d52c07c81e0@gmail.com> (raw)
In-Reply-To: <20261201093430.1771546-3-mehmet.fide@gmail.com>

On 01/12/2026 11:34, Mehmet Fide wrote:
> From: Mehmet Fide <mehmet.fide@screeningeagle.com>
> 
> Without RCR_APPEND_FCS the 8188e reports some MPDUs of an A-MPDU
> 4 bytes short, while their retries have the right length. With CCMP
> such a frame loses the last 4 bytes of its payload when mac80211
> strips the MIC.

There is an old bug report about this:

https://lore.kernel.org/linux-wireless/bfe732f4-60dd-4d78-1259-5f9f6c11adbc@gmail.com/T/#u

> 
> An RTL8188EU station of an MT7921AU AP with WPA2 got the ARP reply of
> the AP 38 bytes long after 5 of 45 connections, and could not reach
> the AP. As an AP, with the AP mode patches for it applied, the
> RTL8188EU got the ARP requests of two MT7921AU stations short after
> 21 of 45 connections.
> 
> Let the 8188e append the FCS, as the vendor driver does, and remove it
> from the length of each received frame. No ARP frame arrived short
> then, in 45 connections as a station and 45 as an AP.
> 
> Fixes: 3dfb8e844fa3 ("wifi: rtl8xxxu: Support new chip RTL8188EU")
> Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> index e578b0aba0ac..afdcb80adfa0 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> @@ -4180,6 +4180,8 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
>  	val32 = RCR_ACCEPT_PHYS_MATCH | RCR_ACCEPT_MCAST | RCR_ACCEPT_BCAST |
>  		RCR_ACCEPT_MGMT_FRAME | RCR_HTC_LOC_CTRL |
>  		RCR_APPEND_PHYSTAT | RCR_APPEND_ICV | RCR_APPEND_MIC;
> +	if (priv->rtl_chip == RTL8188E)
> +		val32 |= RCR_APPEND_FCS;

I think you can add it for all the chips...

>  	rtl8xxxu_write32(priv, REG_RCR, val32);
>  	priv->regrcr = val32;
>  
> @@ -6577,6 +6579,8 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
>  
>  			skb_pull(skb, drvinfo_sz + desc_shift);
>  
> +			if (priv->regrcr & RCR_APPEND_FCS)
> +				pkt_len -= FCS_LEN;

... and set RX_INCLUDES_FCS instead of removing the FCS.

>  			skb_trim(skb, pkt_len);
>  
>  			hdr = (struct ieee80211_hdr *)skb->data;


      reply	other threads:[~2026-12-01 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:34 [PATCH rtw-next 0/2] wifi: rtl8xxxu: A-MPDU sessions per station, 8188e FCS Mehmet Fide
2026-12-01  9:34 ` [PATCH rtw-next 1/2] wifi: rtl8xxxu: keep the A-MPDU session state per station Mehmet Fide
2026-12-01  9:34 ` [PATCH rtw-next 2/2] wifi: rtl8xxxu: let the 8188e append the FCS to received frames Mehmet Fide
2026-12-01 12:12   ` Bitterblue Smith [this message]

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=16b1d1b0-4e83-49c2-ac6a-9d52c07c81e0@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=andrea.merello@gmail.com \
    --cc=ap420073@gmail.com \
    --cc=georgmueller@gmx.net \
    --cc=hi@shreyan.sh \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=martin.kaistra@linutronix.de \
    --cc=mehmet.fide@gmail.com \
    --cc=mehmet.fide@screeningeagle.com \
    --cc=pkshih@realtek.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