linux/include/linux/if_hsr.h
<<
>>
Prefs
   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 */
   6enum hsr_version {
   7        HSR_V0 = 0,
   8        HSR_V1,
   9        PRP_V1,
  10};
  11
  12#if IS_ENABLED(CONFIG_HSR)
  13extern bool is_hsr_master(struct net_device *dev);
  14extern int hsr_get_version(struct net_device *dev, enum hsr_version *ver);
  15#else
  16static inline bool is_hsr_master(struct net_device *dev)
  17{
  18        return false;
  19}
  20static 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