#ifndef _LINUX_IF_HSR_H_
#define _LINUX_IF_HSR_H_
#include <linux/types.h>
struct net_device;
enum hsr_version { … };
struct hsr_tag { … } __packed;
#define HSR_HLEN …
#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);
#else
static inline bool is_hsr_master(struct net_device *dev)
{
return false;
}
static inline int hsr_get_version(struct net_device *dev,
enum hsr_version *ver)
{
return -EINVAL;
}
#endif
#endif