1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_IF_HSR_H_
3 #define _LINUX_IF_HSR_H_
4 
5 /* used to differentiate various protocols */
6 enum hsr_version {
7 	HSR_V0 = 0,
8 	HSR_V1,
9 	PRP_V1,
10 };
11 
12 #if IS_ENABLED(CONFIG_HSR)
13 extern bool is_hsr_master(struct net_device *dev);
14 extern int hsr_get_version(struct net_device *dev, enum hsr_version *ver);
15 #else
is_hsr_master(struct net_device * dev)16 static inline bool is_hsr_master(struct net_device *dev)
17 {
18 	return false;
19 }
hsr_get_version(struct net_device * dev,enum hsr_version * ver)20 static inline int hsr_get_version(struct net_device *dev,
21 				  enum hsr_version *ver)
22 {
23 	return -EINVAL;
24 }
25 #endif /* CONFIG_HSR */
26 
27 #endif /*_LINUX_IF_HSR_H_*/
28