diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 78a09af89e39..06020bde9c6e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2232,10 +2232,9 @@ struct net_device { atomic_t carrier_up_count; atomic_t carrier_down_count; -#ifdef CONFIG_WIRELESS_EXT + /* Android KMI hack to allow vendors to have their own wifi changes in modules */ const struct iw_handler_def *wireless_handlers; struct iw_public_data *wireless_data; -#endif const struct ethtool_ops *ethtool_ops; #ifdef CONFIG_NET_L3_MASTER_DEV const struct l3mdev_ops *l3mdev_ops; @@ -2308,9 +2307,8 @@ struct net_device { #if IS_ENABLED(CONFIG_AX25) void *ax25_ptr; #endif -#if IS_ENABLED(CONFIG_CFG80211) + /* Android KMI hack to allow vendors to have their own wifi changes in modules */ struct wireless_dev *ieee80211_ptr; -#endif #if IS_ENABLED(CONFIG_IEEE802154) || IS_ENABLED(CONFIG_6LOWPAN) struct wpan_dev *ieee802154_ptr; #endif diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2b54fdd8ca15..da8b0b26580c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -8862,9 +8862,7 @@ int cfg80211_register_netdevice(struct net_device *dev); */ static inline void cfg80211_unregister_netdevice(struct net_device *dev) { -#if IS_ENABLED(CONFIG_CFG80211) cfg80211_unregister_wdev(dev->ieee80211_ptr); -#endif } /** diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index 96a412beab2d..02f86ff64f00 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -309,11 +309,9 @@ static bool batadv_is_cfg80211_netdev(struct net_device *net_device) if (!net_device) return false; -#if IS_ENABLED(CONFIG_CFG80211) /* cfg80211 drivers have to set ieee80211_ptr */ if (net_device->ieee80211_ptr) return true; -#endif return false; } diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index a09d507c5b03..2604ada38d41 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -770,14 +770,10 @@ static const struct attribute_group wireless_group = { static bool wireless_group_needed(struct net_device *ndev) { -#if IS_ENABLED(CONFIG_CFG80211) if (ndev->ieee80211_ptr) return true; -#endif -#if IS_ENABLED(CONFIG_WIRELESS_EXT) if (ndev->wireless_handlers) return true; -#endif return false; }