aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/switchdev.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-01-15 12:46:14 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-01-15 12:46:14 -0500
commit0c49cd295d42d0032af11d55e2140dbec11dc8d0 (patch)
tree1e7d0e50b6b6d6e4de1fb6bb0b6d856c3932da58 /include/net/switchdev.h
parent0c3e99437a66e4c869c60c2398449e6d98f3a988 (diff)
parenteaa27f34e91a14cdceed26ed6c6793ec1d186115 (diff)
Merge tag 'v3.19-rc4' into next
Merge with mainline to bring in the latest thermal and other changes.
Diffstat (limited to 'include/net/switchdev.h')
-rw-r--r--include/net/switchdev.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/net/switchdev.h b/include/net/switchdev.h
new file mode 100644
index 000000000000..8a6d1641fd9b
--- /dev/null
+++ b/include/net/switchdev.h
@@ -0,0 +1,37 @@
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
17int netdev_switch_parent_id_get(struct net_device *dev,
18 struct netdev_phys_item_id *psid);
19int netdev_switch_port_stp_update(struct net_device *dev, u8 state);
20
21#else
22
23static inline int netdev_switch_parent_id_get(struct net_device *dev,
24 struct netdev_phys_item_id *psid)
25{
26 return -EOPNOTSUPP;
27}
28
29static inline int netdev_switch_port_stp_update(struct net_device *dev,
30 u8 state)
31{
32 return -EOPNOTSUPP;
33}
34
35#endif
36
37#endif /* _LINUX_SWITCHDEV_H_ */