summaryrefslogtreecommitdiff
path: root/include/net/cfg802154.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-05-19 13:20:54 -0700
committerDavid S. Miller <davem@davemloft.net>2022-05-22 21:51:54 +0100
commitc304eddcecfe2513ff98ce3ae97d1c196d82ba08 (patch)
treeb790596c2d45437fa59fd108d0bc5ef25edca060 /include/net/cfg802154.h
parent5ff851b7be752a6d607c289b489c40f96f9dc489 (diff)
net: wrap the wireless pointers in struct net_device in an ifdef
Most protocol-specific pointers in struct net_device are under a respective ifdef. Wireless is the notable exception. Since there's a sizable number of custom-built kernels for datacenter workloads which don't build wireless it seems reasonable to ifdefy those pointers as well. While at it move IPv4 and IPv6 pointers up, those are special for obvious reasons. Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> # ieee802154 Acked-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/cfg802154.h')
-rw-r--r--include/net/cfg802154.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 85f9e8417688..d8d8719315fd 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -373,6 +373,7 @@ struct wpan_dev {
#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
+#if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN)
static inline int
wpan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
const struct ieee802154_addr *daddr,
@@ -383,6 +384,7 @@ wpan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
return wpan_dev->header_ops->create(skb, dev, daddr, saddr, len);
}
+#endif
struct wpan_phy *
wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size);