diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2011-11-25 09:40:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-26 14:48:16 -0500 |
commit | d11ead75672d655652dbfc1b1a2c359e5b65536d (patch) | |
tree | 5b70f38a5650839c104a3a2355794f7dd726e164 /include/linux/netdevice.h | |
parent | 34a430d7bd26b35ca3a7d3fc83663de8ea6e33f6 (diff) |
net: Use IS_ENABLED() in netdevice.h as appropriate
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 87f7353a2407..ac9a4b9344ca 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -144,22 +144,20 @@ static inline bool dev_xmit_complete(int rc) | |||
144 | * used. | 144 | * used. |
145 | */ | 145 | */ |
146 | 146 | ||
147 | #if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 147 | #if defined(CONFIG_WLAN) || IS_ENABLED(CONFIG_AX25) |
148 | # if defined(CONFIG_MAC80211_MESH) | 148 | # if defined(CONFIG_MAC80211_MESH) |
149 | # define LL_MAX_HEADER 128 | 149 | # define LL_MAX_HEADER 128 |
150 | # else | 150 | # else |
151 | # define LL_MAX_HEADER 96 | 151 | # define LL_MAX_HEADER 96 |
152 | # endif | 152 | # endif |
153 | #elif defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) | 153 | #elif IS_ENABLED(CONFIG_TR) |
154 | # define LL_MAX_HEADER 48 | 154 | # define LL_MAX_HEADER 48 |
155 | #else | 155 | #else |
156 | # define LL_MAX_HEADER 32 | 156 | # define LL_MAX_HEADER 32 |
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ | 159 | #if !IS_ENABLED(CONFIG_NET_IPIP) && !IS_ENABLED(CONFIG_NET_IPGRE) && \ |
160 | !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \ | 160 | !IS_ENABLED(CONFIG_IPV6_SIT) && !IS_ENABLED(CONFIG_IPV6_TUNNEL) |
161 | !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \ | ||
162 | !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE) | ||
163 | #define MAX_HEADER LL_MAX_HEADER | 161 | #define MAX_HEADER LL_MAX_HEADER |
164 | #else | 162 | #else |
165 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 163 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
@@ -922,7 +920,7 @@ struct net_device_ops { | |||
922 | int (*ndo_get_vf_port)(struct net_device *dev, | 920 | int (*ndo_get_vf_port)(struct net_device *dev, |
923 | int vf, struct sk_buff *skb); | 921 | int vf, struct sk_buff *skb); |
924 | int (*ndo_setup_tc)(struct net_device *dev, u8 tc); | 922 | int (*ndo_setup_tc)(struct net_device *dev, u8 tc); |
925 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 923 | #if IS_ENABLED(CONFIG_FCOE) |
926 | int (*ndo_fcoe_enable)(struct net_device *dev); | 924 | int (*ndo_fcoe_enable)(struct net_device *dev); |
927 | int (*ndo_fcoe_disable)(struct net_device *dev); | 925 | int (*ndo_fcoe_disable)(struct net_device *dev); |
928 | int (*ndo_fcoe_ddp_setup)(struct net_device *dev, | 926 | int (*ndo_fcoe_ddp_setup)(struct net_device *dev, |
@@ -937,7 +935,7 @@ struct net_device_ops { | |||
937 | unsigned int sgc); | 935 | unsigned int sgc); |
938 | #endif | 936 | #endif |
939 | 937 | ||
940 | #if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE) | 938 | #if IS_ENABLED(CONFIG_LIBFCOE) |
941 | #define NETDEV_FCOE_WWNN 0 | 939 | #define NETDEV_FCOE_WWNN 0 |
942 | #define NETDEV_FCOE_WWPN 1 | 940 | #define NETDEV_FCOE_WWPN 1 |
943 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, | 941 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, |
@@ -1076,7 +1074,7 @@ struct net_device { | |||
1076 | 1074 | ||
1077 | /* Protocol specific pointers */ | 1075 | /* Protocol specific pointers */ |
1078 | 1076 | ||
1079 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 1077 | #if IS_ENABLED(CONFIG_VLAN_8021Q) |
1080 | struct vlan_group __rcu *vlgrp; /* VLAN group */ | 1078 | struct vlan_group __rcu *vlgrp; /* VLAN group */ |
1081 | #endif | 1079 | #endif |
1082 | #if IS_ENABLED(CONFIG_NET_DSA) | 1080 | #if IS_ENABLED(CONFIG_NET_DSA) |
@@ -1242,7 +1240,7 @@ struct net_device { | |||
1242 | struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE]; | 1240 | struct netdev_tc_txq tc_to_txq[TC_MAX_QUEUE]; |
1243 | u8 prio_tc_map[TC_BITMASK + 1]; | 1241 | u8 prio_tc_map[TC_BITMASK + 1]; |
1244 | 1242 | ||
1245 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 1243 | #if IS_ENABLED(CONFIG_FCOE) |
1246 | /* max exchange id for FCoE LRO by ddp */ | 1244 | /* max exchange id for FCoE LRO by ddp */ |
1247 | unsigned int fcoe_ddp_xid; | 1245 | unsigned int fcoe_ddp_xid; |
1248 | #endif | 1246 | #endif |