RE: [PATCH rtw-next 4/5] wifi: rtlwifi: rtl8192du: enable USB RX aggregation

From: Ping-Ke Shih

Date: Sun Nov 08 2026 - 21:04:43 EST


Jie Feng <hjf3108@xxxxxxxxx> wrote:
> On Mon, 9 Nov 2026 at 08:44, Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote:
> >
> > Ho Jie Feng <hjf3108@xxxxxxxxx> wrote:
> > > Allow RX aggregation of up to 48 pages of 128 bytes or 24 with two MACs.
> >
> > You can describe a little bit how you build separate skb, especially
> > the last one.
> >
> > >
> > > Test results (2.4 GHz):
> > > before after
> > > TX 5.2 6.4
> > > RX 27.1 32.0
> > >
> > > Signed-off-by: Ho Jie Feng <hjf3108@xxxxxxxxx>
> >
> > Acked-by is given, but some minor comments.
> >
> > Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> >
> > > +void rtl92du_rx_segregate_hdl(struct ieee80211_hw *hw, struct sk_buff *skb,
> > > + struct sk_buff_head *queue)
> > > +{
> > > + struct rtl_priv *rtlpriv = rtl_priv(hw);
> > > + unsigned int offset = 0, pkt_size;
> > > + struct sk_buff *new_skb;
> > > + __le32 *rxdesc;
> > > +
> > > + while (skb->len - offset >= RTL_RX_DESC_SIZE) {
> > > + rxdesc = (__le32 *)(skb->data + offset);
> > > + pkt_size = RTL_RX_DESC_SIZE +
> > > + get_rx_desc_drv_info_size(rxdesc) *
> > > + RX_DRV_INFO_SIZE_UNIT +
> > > + get_rx_desc_shift(rxdesc) +
> > > + get_rx_desc_pkt_len(rxdesc);
> > > +
> > > + if (get_rx_desc_pkt_len(rxdesc) == 0 ||
> > > + pkt_size > skb->len - offset) {
> > > + rtl_dbg(rtlpriv, COMP_RECV, DBG_WARNING,
> > > + "bad frame at %u of %u, size %u\n",
> > > + offset, skb->len, pkt_size);
> > > + break;
> > > + }
> > > +
> > > + /* The last frame keeps the original skb. */
> > > + if (ALIGN(pkt_size, RTL92DU_RX_AGG_ALIGN) >= skb->len - offset) {
> > > + skb_pull(skb, offset);
> > > + skb_trim(skb, pkt_size);
> > > + __skb_queue_tail(queue, skb);
> > > + return;
> > > + }
> > > +
> > > + new_skb = dev_alloc_skb(pkt_size + RTL92DU_RX_HEADROOM);
> >
> > What is the purpose of RTL92DU_RX_HEADROOM ?
> This is for the radiotap header, like in usb.c.
>
> I could drop it, or add comments or a commit description to describe it?

Why not just naming RADIOTAP like usb.c ?

>
> https://github.com/pkshih/rtw/blob/rtw-next/drivers/net/wireless/realtek/rtlwifi/usb.c#L582

I don't remember I have tried monitor mode with rtlwifi. Can you give it a try?