]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: remove iw_public_data from struct net_device
authorJohannes Berg <johannes.berg@intel.com>
Mon, 7 Oct 2024 19:35:25 +0000 (21:35 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 8 Oct 2024 19:53:40 +0000 (21:53 +0200)
Given the previous patches, we no longer need the
struct iw_public_data etc., it's only used by the
old Intel drivers (and ps3_gelic creates it but
then doesn't use it). Remove all of that, including
the pointer in struct net_device.

Link: https://patch.msgid.link/20241007213525.8b2d52b60531.I6a27aaf30bded9a0977f07f47fba2bd31a3b3330@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Documentation/networking/net_cachelines/net_device.rst
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
drivers/net/ethernet/toshiba/ps3_gelic_wireless.h
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2100.h
drivers/net/wireless/intel/ipw2x00/ipw2200.c
drivers/net/wireless/intel/ipw2x00/ipw2200.h
drivers/net/wireless/intel/ipw2x00/libipw_spy.c
include/linux/netdevice.h
include/net/iw_handler.h

index 22b07c814f4a4575d255fdf472d07c549536e543..b7d1d4c7a1ab1cc4fad3e707bec4a8b0cab7af44 100644 (file)
@@ -51,7 +51,6 @@ struct_net_device_core_stats*       core_stats
 atomic_t                            carrier_up_count                                                
 atomic_t                            carrier_down_count                                              
 struct_iw_handler_def*              wireless_handlers                                               
-struct_iw_public_data*              wireless_data                                                   
 struct_ethtool_ops*                 ethtool_ops                                                     
 struct_l3mdev_ops*                  l3mdev_ops                                                      
 struct_ndisc_ops*                   ndisc_ops                                                       
index 44488c153ea25fa9431f4a94e7225c909a3241d1..4fbe4b7cd12a1880b3e2b3022f4141a0a945d4b4 100644 (file)
@@ -2566,7 +2566,6 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev)
 
        netdev->ethtool_ops = &gelic_wl_ethtool_ops;
        netdev->netdev_ops = &gelic_wl_netdevice_ops;
-       netdev->wireless_data = &wl->wireless_data;
        netdev->wireless_handlers = &gelic_wl_wext_handler_def;
 }
 
index 1f203d1ae8dbdfb68ec8b7c814a952edae90e7bc..dbabf538e10a7b919c2ce7ac00464546c07fdb74 100644 (file)
@@ -276,7 +276,6 @@ struct gelic_wl_info {
        u8 active_bssid[ETH_ALEN]; /* associated bssid */
        unsigned int essid_len;
 
-       struct iw_public_data wireless_data;
        struct iw_statistics iwstat;
 };
 
index a89e06c1b8eee142cfac3704549af6bc9a36b88b..15bf35f2de2add6b3bf58f643e122b340cececbb 100644 (file)
@@ -6022,8 +6022,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
        dev->netdev_ops = &ipw2100_netdev_ops;
        dev->ethtool_ops = &ipw2100_ethtool_ops;
        dev->wireless_handlers = &ipw2100_wx_handler_def;
-       priv->wireless_data.libipw = priv->ieee;
-       dev->wireless_data = &priv->wireless_data;
        dev->watchdog_timeo = 3 * HZ;
        dev->irq = 0;
        dev->min_mtu = 68;
index b34085ade3aa18fdc85e6f2d6289ed5064cf5c84..6f81f509b9cbf7028f3ce1e9e3f8e5f6c2fea5cf 100644 (file)
@@ -554,8 +554,6 @@ struct ipw2100_priv {
        struct net_device *net_dev;
        struct iw_statistics wstats;
 
-       struct iw_public_data wireless_data;
-
        struct tasklet_struct irq_tasklet;
 
        struct delayed_work reset_work;
index c0e9d2109e341b5712da2261c1e75897560aa636..be1d971b3d32da8451d22135cafe8ada9f6de44c 100644 (file)
@@ -11645,7 +11645,6 @@ static int ipw_pci_probe(struct pci_dev *pdev,
 
        net_dev->netdev_ops = &ipw_netdev_ops;
        priv->ieee->spy_enabled = true;
-       net_dev->wireless_data = &priv->wireless_data;
        net_dev->wireless_handlers = &ipw_wx_handler_def;
        net_dev->ethtool_ops = &ipw_ethtool_ops;
 
index 46f119123b4930604b4cb12e258112618c0d4073..d3db54e6d37ccd7ad381e8774d7ef8ae53cab690 100644 (file)
@@ -1274,8 +1274,6 @@ struct ipw_priv {
 
        struct iw_statistics wstats;
 
-       struct iw_public_data wireless_data;
-
        int user_requested_scan;
        u8 direct_scan_ssid[IW_ESSID_MAX_SIZE];
        u8 direct_scan_ssid_len;
index 979aeb10aeeb4107feb41ea6ed771a2ede8eb5a3..ba876e92f7f6acdf83a88c4464953eebd7205ec0 100644 (file)
 
 static struct iw_spy_data *get_spydata(struct net_device *dev)
 {
-       if (dev->wireless_data && dev->wireless_data->libipw &&
-           dev->wireless_data->libipw->spy_enabled)
-               return &dev->wireless_data->libipw->spy_data;
+       struct libipw_device *ieee = netdev_priv(dev);
+
+       if (ieee->spy_enabled)
+               return &ieee->spy_data;
        return NULL;
 }
 
index e87b5e4883259a0723278ae3f1bee87e940af895..f0abed1e6e45b20d0469df4d36537220d52f8c68 100644 (file)
@@ -1773,7 +1773,6 @@ enum netdev_reg_state {
  *     @wireless_handlers:     List of functions to handle Wireless Extensions,
  *                             instead of ioctl,
  *                             see <net/iw_handler.h> for details.
- *     @wireless_data: Instance data managed by the core of wireless extensions
  *
  *     @netdev_ops:    Includes several pointers to callbacks,
  *                     if one wants to override the ndo_*() functions
@@ -2150,7 +2149,6 @@ struct net_device {
 
 #ifdef CONFIG_WIRELESS_EXT
        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
index a7b502958d27626827ba78c1df021c26d840dafa..fc44fcca1d5ce0598ed9cce2823d8472fe2e683f 100644 (file)
@@ -404,24 +404,6 @@ struct iw_spy_data {
        u_char                  spy_thr_under[IW_MAX_SPY];
 };
 
-/* --------------------- DEVICE WIRELESS DATA --------------------- */
-/*
- * This is all the wireless data specific to a device instance that
- * is managed by the core of Wireless Extensions or the 802.11 layer.
- * We only keep pointer to those structures, so that a driver is free
- * to share them between instances.
- * This structure should be initialised before registering the device.
- * Access to this data follow the same rules as any other struct net_device
- * data (i.e. valid as long as struct net_device exist, same locking rules).
- */
-/* Forward declaration */
-struct libipw_device;
-/* The struct */
-struct iw_public_data {
-       /* Legacy structure managed by the ipw2x00-specific IEEE 802.11 layer */
-       struct libipw_device *          libipw;
-};
-
 /**************************** PROTOTYPES ****************************/
 /*
  * Functions part of the Wireless Extensions (defined in net/wireless/wext-core.c).