From 8d1c320f615dac61240aee9c8a1fc6436ca0ca34 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 3 Aug 2026 13:52:48 +0200 Subject: [PATCH] wifi: mac80211: make ieee80211_is_tx_data() internal This function isn't used by any driver, and we may want to change it in the future. Don't expose it. Drivers may still do the same determination based on the flags, but if we'd ever change the encapsulation internally etc. (which I'm considering) then the use in mac80211 may need to change, or the function itself. Link: https://patch.msgid.link/20260803135248.cd23ccac65d7.I1c238c6abe39f5a1ff1b11d8556599d01dd03ff0@changeid Signed-off-by: Johannes Berg --- include/net/mac80211.h | 19 ------------------- net/mac80211/ieee80211_i.h | 9 +++++++++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 638b8aa5214d..f147bc019e7b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -8050,25 +8050,6 @@ void ieee80211_obss_color_collision_notify(struct ieee80211_vif *vif, u64 color_bitmap, u8 link_id); -/** - * ieee80211_is_tx_data - check if frame is a data frame - * - * The function is used to check if a frame is a data frame. Frames with - * hardware encapsulation enabled are data frames. - * - * @skb: the frame to be transmitted. - * - * Return: %true if @skb is a data frame, %false otherwise - */ -static inline bool ieee80211_is_tx_data(struct sk_buff *skb) -{ - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr = (void *) skb->data; - - return info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP || - ieee80211_is_data(hdr->frame_control); -} - /** * ieee80211_set_active_links - set active links in client mode * @vif: interface to set active links on diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d06cb8e7dfb3..04954a963742 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -191,6 +191,15 @@ struct ieee80211_tx_data { unsigned int flags; }; +static inline bool ieee80211_is_tx_data(struct sk_buff *skb) +{ + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + struct ieee80211_hdr *hdr = (void *)skb->data; + + return info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP || + ieee80211_is_data(hdr->frame_control); +} + /** * enum ieee80211_packet_rx_flags - packet RX flags * @IEEE80211_RX_AMSDU: a-MSDU packet