All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Jiaxin Li <18135327133@163.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH v2] wifi: rtl8180: reject RX frames longer than MAX_RX_SIZE
Date: Wed, 21 Oct 2026 01:36:52 +0000	[thread overview]
Message-ID: <d34e4cc538314c3e906d22f1b5506c44@realtek.com> (raw)
In-Reply-To: <20261020115938.1433-1-18135327133@163.com>

Jiaxin Li <18135327133@163.com> wrote:
> @@ -255,7 +255,13 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
>                         goto done;
>                 else {
>                         struct ieee80211_rx_status rx_status = {0};
> -                       struct sk_buff *new_skb = dev_alloc_skb(MAX_RX_SIZE);
> +                       struct sk_buff *new_skb;
> +                       u32 rx_len = flags & 0xFFF;

nit: in reverse X'mas.

> +
> +                       if (unlikely(rx_len > MAX_RX_SIZE))
> +                               goto done;
> +
> +                       new_skb = dev_alloc_skb(MAX_RX_SIZE);
> 
>                         if (unlikely(!new_skb))
>                                 goto done;

      reply	other threads:[~2026-10-21  1:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 11:59 [PATCH v2] wifi: rtl8180: reject RX frames longer than MAX_RX_SIZE Jiaxin Li
2026-10-21  1:36 ` Ping-Ke Shih [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=d34e4cc538314c3e906d22f1b5506c44@realtek.com \
    --to=pkshih@realtek.com \
    --cc=18135327133@163.com \
    --cc=linux-wireless@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.