summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/hostap/hostap.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_pci.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_plx.c3
5 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/hostap/hostap.c b/drivers/net/wireless/hostap/hostap.c
index 366cefbaca5..ea30ba80605 100644
--- a/drivers/net/wireless/hostap/hostap.c
+++ b/drivers/net/wireless/hostap/hostap.c
@@ -137,6 +137,7 @@ struct net_device * hostap_add_interface(struct local_info *local,
if (strchr(dev->name, '%'))
ret = dev_alloc_name(dev, dev->name);
+ SET_NETDEV_DEV(dev, mdev->class_dev.dev);
if (ret >= 0)
ret = register_netdevice(dev);
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index f915f0c75cf..649502488d5 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -725,7 +725,8 @@ static int prism2_config(dev_link_t *link)
}
/* Need to allocate net_device before requesting IRQ handler */
- dev = prism2_init_local_data(&prism2_pccard_funcs, 0);
+ dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
+ &handle_to_dev(link->handle));
if (dev == NULL)
goto failed;
link->priv = dev;
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 039ef7f61be..7572050db32 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -3268,7 +3268,8 @@ static void prism2_clear_set_tim_queue(local_info_t *local)
static struct net_device *
-prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx)
+prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx,
+ struct device *sdev)
{
struct net_device *dev;
struct hostap_interface *iface;
@@ -3439,6 +3440,7 @@ while (0)
rtnl_lock();
ret = dev_alloc_name(dev, "wifi%d");
+ SET_NETDEV_DEV(dev, sdev);
if (ret >= 0)
ret = register_netdevice(dev);
rtnl_unlock();
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c
index 3a208989333..c4c7b2f2e8a 100644
--- a/drivers/net/wireless/hostap/hostap_pci.c
+++ b/drivers/net/wireless/hostap/hostap_pci.c
@@ -308,7 +308,8 @@ static int prism2_pci_probe(struct pci_dev *pdev,
pci_set_master(pdev);
#endif /* PRISM2_BUS_MASTER */
- dev = prism2_init_local_data(&prism2_pci_funcs, cards_found);
+ dev = prism2_init_local_data(&prism2_pci_funcs, cards_found,
+ &pdev->dev);
if (dev == NULL)
goto fail;
iface = netdev_priv(dev);
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c
index ec33501e094..e29ac2271bd 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -522,7 +522,8 @@ static int prism2_plx_probe(struct pci_dev *pdev,
* not present; but are there really such cards in use(?) */
}
- dev = prism2_init_local_data(&prism2_plx_funcs, cards_found);
+ dev = prism2_init_local_data(&prism2_plx_funcs, cards_found,
+ &pdev->dev);
if (dev == NULL)
goto fail;
iface = netdev_priv(dev);