batman-adv: update to version 2023.1
[feed/routing.git] / batman-adv / src / compat-hacks.h
index 646e179b0d0f825836ef847a2815ab97691d8e67..ee51b8748d4a8d3541659c6f9e0869c9861511d2 100644 (file)
@@ -71,6 +71,20 @@ static inline u32 batadv_get_random_u32_below(u32 ep_ro)
 
 #endif /* LINUX_VERSION_IS_LESS(6, 2, 0) */
 
+#if LINUX_VERSION_IS_LESS(6, 4, 0)
+
+#include <linux/if_vlan.h>
+
+/* Prefer this version in TX path, instead of
+ * skb_reset_mac_header() + vlan_eth_hdr()
+ */
+static inline struct vlan_ethhdr *skb_vlan_eth_hdr(const struct sk_buff *skb)
+{
+       return (struct vlan_ethhdr *)skb->data;
+}
+
+#endif /* LINUX_VERSION_IS_LESS(6, 4, 0) */
+
 /* <DECLARE_EWMA> */
 
 #include <linux/version.h>