[PATCH wireless-next] wifi: mac80211: make ieee80211_is_tx_data() internal
Johannes Berg <[email protected]> Mon, 3 Aug 2026 13:52:48 +0200
| Newsgroups | org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <20260803135248.cd23ccac65d7.I1c238c6abe39f5a1ff1b11d8556599d01dd03ff0@changeid> |
From: Johannes Berg <[email protected]> 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. Signed-off-by: Johannes Berg <[email protected]> --- 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 9d1fac6e8082..f65ddbe99b3e 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -8058,25 +8058,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 5761e9621491..e86d8697f614 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 -- 2.55.0