RE: [PATCH rtw-next v2 2/3] wifi: rtw88: usb: only let the frames a dozing station needs use the after-DTIM queue

From: Ping-Ke Shih

Date: Wed Sep 09 2026 - 21:31:21 EST


Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> +static bool rtw_usb_bmc_needs_dtim(struct sk_buff *skb)
> +{
> + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
> + struct udphdr *udphdr;
> +
> + if (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)
> + return true;
> +
> + if (skb->protocol == htons(ETH_P_ARP))
> + return true;
> +
> + if (skb->protocol != htons(ETH_P_IP) ||
> + ip_hdr(skb)->protocol != IPPROTO_UDP)

Prefer to list them in positive way.

if (skb->protocol == htons(ETH_P_IP) &&
ip_hdr(skb)->protocol == IPPROTO_UDP) {
udphdr = udp_hdr(skb);

return udphdr->dest == htons(67) || udphdr->dest == htons(68);
}

return false;

> + return false;
> +
> + udphdr = udp_hdr(skb);
> +
> + return udphdr->dest == htons(67) || udphdr->dest == htons(68);
> +}
> +