RE: [PATCH rtw-next v3] wifi: rtw88: usb: don't report the aggregation buffer as a frame

From: Ping-Ke Shih

Date: Sun Nov 01 2026 - 22:12:42 EST



Jie Feng <hjf3108@xxxxxxxxx> wrote:
> On Sun, 1 Nov 2026 at 11:44, Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote:
> >
> > Ho Jie Feng <hjf3108@xxxxxxxxx> wrote:
> > > When rtw_usb_tx_agg_skb() has more than one frame queued, it copies them
> > > into a new buffer. That buffer was also handed to mac80211, as one
> > > additional TX completion.
> > >
> > > Report TX status only for the original frames, and free the aggregate
> > > buffer without passing it to mac80211.
> >
> > The rtw_usb_write_port() might be failed and call ieee80211_purge_tx_queue()
> > to purge txcb->tx_ack_queue list. Should we check if the tail skb of
> > txcb->tx_ack_queue (or just check skb_head) is drv_frame=true?
> I traced ieee80211_purge_tx_queue to ieee80211_report_used_skb, and
> based on the code here:
> https://elixir.bootlin.com/linux/v7.3/source/net/mac80211/status.c#L759
>
> I don't think it fulfills any of the conditions, so drv_frame=true entries
> should just go through a normal skb free path.

Can you add a description in commit message about this?

>
> > > @@ -431,6 +436,9 @@ static bool rtw_usb_tx_agg_skb(struct rtw_usb *rtwusb, struct sk_buff_head *list
> > > goto queue;
> > > }
> > >
> > > + /* report TX status only for the original frames */
> > > + rtw_usb_get_tx_data(skb_head)->drv_frame = true;
> >
> > If we can just check drv_frame by skb_head, just declare a local
> > struct rtw_usb_tx_data *skb_head_tx_data.
> Is this still needed if ieee80211_purge_tx_queue works?

no need.