Commit | Line | Data |
---|---|---|
86e8b070 VR |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | /* Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ | |
3 | */ | |
4 | ||
5 | #ifndef DRIVERS_NET_ETHERNET_TI_AM65_CPSW_SWITCHDEV_H_ | |
6 | #define DRIVERS_NET_ETHERNET_TI_AM65_CPSW_SWITCHDEV_H_ | |
7 | ||
8 | #include <linux/skbuff.h> | |
9 | ||
10 | #if IS_ENABLED(CONFIG_TI_K3_AM65_CPSW_SWITCHDEV) | |
11 | static inline void am65_cpsw_nuss_set_offload_fwd_mark(struct sk_buff *skb, bool val) | |
12 | { | |
13 | skb->offload_fwd_mark = val; | |
14 | } | |
15 | ||
16 | int am65_cpsw_switchdev_register_notifiers(struct am65_cpsw_common *cpsw); | |
17 | void am65_cpsw_switchdev_unregister_notifiers(struct am65_cpsw_common *cpsw); | |
18 | #else | |
19 | static inline int am65_cpsw_switchdev_register_notifiers(struct am65_cpsw_common *cpsw) | |
20 | { | |
21 | return -EOPNOTSUPP; | |
22 | } | |
23 | ||
24 | static inline void am65_cpsw_switchdev_unregister_notifiers(struct am65_cpsw_common *cpsw) | |
25 | { | |
26 | } | |
27 | ||
28 | static inline void am65_cpsw_nuss_set_offload_fwd_mark(struct sk_buff *skb, bool val) | |
29 | { | |
30 | } | |
31 | ||
32 | #endif | |
33 | ||
34 | #endif /* DRIVERS_NET_ETHERNET_TI_AM65_CPSW_SWITCHDEV_H_ */ |