Re: [PATCH rtw-next 2/2] wifi: rtw88: usb: only let the frames a dozing station needs use the after-DTIM queue
From: Mehmet Fide
Date: Sun Sep 06 2026 - 04:23:02 EST
Hi Ping-Ke,
> The existing is messed already. But could please put them in increasing
> alphabet order? (only apply the part of '#include <linux/*')
Will do.
> In reverse X'mas tree order. If you want keep 'struct' and 'unsigned int'
> together individually. We can have
> struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
> struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
> unsigned int paylen = sizeof(rfc1042_header) + sizeof(__be16);
> unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control);
Will use exactly that order (fewer of them after the change below).
> Can we just 'skb->protocol == htons(ETH_P_ARP)' ?
Yes. mac80211 keeps skb->protocol and the network header offset from the
netdev path (ieee80211_build_hdr() only pushes the 802.11 and SNAP headers
in front, the offsets are relative to skb->head), so the SNAP parsing, the
hw_key->iv_len handling and the unaligned.h include can go entirely. For
EAPOL I will test IEEE80211_TX_CTRL_PORT_CTRL_PROTO like
rtw89_core_tx_btc_spec_pkt_notify() does, which also covers a non-default
control port protocol.
> udphdr = udp_hdr(skb); ?
> reference to rtw89_core_tx_btc_spec_pkt_notify().
Will do: skb->protocol == htons(ETH_P_IP), ip_hdr(skb)->protocol ==
IPPROTO_UDP, then udp_hdr(skb) for the 67/68 ports, same shape as the rtw89
helper. The transport header is set by the IP stack for the frames this
matters for (the AP's own DHCP replies).
v2 early next week, with the changes to 1/2 and, if you agree with the
proposal in the other thread, a third patch for REG_ATIMWND.
Mehmet