diff options
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r-- | include/net/switchdev.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h new file mode 100644 index 000000000000..7a52360a1446 --- /dev/null +++ b/include/net/switchdev.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * include/net/switchdev.h - Switch device API | ||
3 | * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | */ | ||
10 | #ifndef _LINUX_SWITCHDEV_H_ | ||
11 | #define _LINUX_SWITCHDEV_H_ | ||
12 | |||
13 | #include <linux/netdevice.h> | ||
14 | |||
15 | #ifdef CONFIG_NET_SWITCHDEV | ||
16 | |||
17 | int netdev_switch_parent_id_get(struct net_device *dev, | ||
18 | struct netdev_phys_item_id *psid); | ||
19 | |||
20 | #else | ||
21 | |||
22 | static inline int netdev_switch_parent_id_get(struct net_device *dev, | ||
23 | struct netdev_phys_item_id *psid) | ||
24 | { | ||
25 | return -EOPNOTSUPP; | ||
26 | } | ||
27 | |||
28 | #endif | ||
29 | |||
30 | #endif /* _LINUX_SWITCHDEV_H_ */ | ||