On Tue, May 18, 2021 at 01:19:46PM +0200, Johannes Berg wrote: > On Tue, 2021-05-18 at 13:17 +0200, Felix Fietkau wrote: > > > > Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header, > > so please change the check something like this: > > > > if ((info->flags & IEEE80211_TX_CTL_NO_ACK) && > > ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > > ieee80211_is_data(hdr->frame_control))) > > Maybe we should consider some kind of inline helper? > > static inline bool ieee80211_is_tx_data(struct sk_buff *skb) > { > ... *info = ... > ... *hdr = (void *)skb->data; > > return (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > ieee80211_is_data(hdr->frame_control); > } A frame with IEEE80211_TX_CTL_HW_80211_ENCAP set is always a data frame? Should I put the definition of the function into include/net/mac80211.h?