In the offloading case the network driver needs to inspect the HSR header to find out if the encapsulated type is a PTP packet where it needs suppress offloading of the packet. Move the header so it can be included the driver. Signed-off-by: Sebastian Andrzej Siewior --- include/linux/if_hsr.h | 6 ++++++ net/hsr/hsr_main.h | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/if_hsr.h b/include/linux/if_hsr.h index 7b6b60ef592db..f81323f10eecc 100644 --- a/include/linux/if_hsr.h +++ b/include/linux/if_hsr.h @@ -3,6 +3,7 @@ #define _LINUX_IF_HSR_H_ #include +#include #include struct net_device; @@ -39,6 +40,11 @@ struct hsr_tag { #define HSR_HLEN 6 +struct hsr_ethhdr { + struct ethhdr ethhdr; + struct hsr_tag hsr_tag; +} __packed; + #if IS_ENABLED(CONFIG_HSR) extern bool is_hsr_master(struct net_device *dev); extern int hsr_get_version(struct net_device *dev, enum hsr_version *ver); diff --git a/net/hsr/hsr_main.h b/net/hsr/hsr_main.h index 53e95bae0ee27..36eb82774000c 100644 --- a/net/hsr/hsr_main.h +++ b/net/hsr/hsr_main.h @@ -72,11 +72,6 @@ static inline void set_hsr_tag_LSDU_size(struct hsr_tag *ht, u16 LSDU_size) 0xF000) | (LSDU_size & 0x0FFF)); } -struct hsr_ethhdr { - struct ethhdr ethhdr; - struct hsr_tag hsr_tag; -} __packed; - struct hsr_vlan_ethhdr { struct vlan_ethhdr vlanhdr; struct hsr_tag hsr_tag; -- 2.55.0