aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 0f554373a60d..1bcd352a813b 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -5833,19 +5833,6 @@ static void ipw2100_tx_timeout(struct net_device *dev)
5833 schedule_reset(priv); 5833 schedule_reset(priv);
5834} 5834}
5835 5835
5836/*
5837 * TODO: reimplement it so that it reads statistics
5838 * from the adapter using ordinal tables
5839 * instead of/in addition to collecting them
5840 * in the driver
5841 */
5842static struct net_device_stats *ipw2100_stats(struct net_device *dev)
5843{
5844 struct ipw2100_priv *priv = ieee80211_priv(dev);
5845
5846 return &priv->ieee->stats;
5847}
5848
5849static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value) 5836static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value)
5850{ 5837{
5851 /* This is called when wpa_supplicant loads and closes the driver 5838 /* This is called when wpa_supplicant loads and closes the driver
@@ -6030,7 +6017,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev,
6030 dev->open = ipw2100_open; 6017 dev->open = ipw2100_open;
6031 dev->stop = ipw2100_close; 6018 dev->stop = ipw2100_close;
6032 dev->init = ipw2100_net_init; 6019 dev->init = ipw2100_net_init;
6033 dev->get_stats = ipw2100_stats;
6034 dev->ethtool_ops = &ipw2100_ethtool_ops; 6020 dev->ethtool_ops = &ipw2100_ethtool_ops;
6035 dev->tx_timeout = ipw2100_tx_timeout; 6021 dev->tx_timeout = ipw2100_tx_timeout;
6036 dev->wireless_handlers = &ipw2100_wx_handler_def; 6022 dev->wireless_handlers = &ipw2100_wx_handler_def;
@@ -6428,6 +6414,7 @@ static int ipw2100_resume(struct pci_dev *pci_dev)
6428{ 6414{
6429 struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); 6415 struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
6430 struct net_device *dev = priv->net_dev; 6416 struct net_device *dev = priv->net_dev;
6417 int err;
6431 u32 val; 6418 u32 val;
6432 6419
6433 if (IPW2100_PM_DISABLED) 6420 if (IPW2100_PM_DISABLED)
@@ -6438,7 +6425,12 @@ static int ipw2100_resume(struct pci_dev *pci_dev)
6438 IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name); 6425 IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name);
6439 6426
6440 pci_set_power_state(pci_dev, PCI_D0); 6427 pci_set_power_state(pci_dev, PCI_D0);
6441 pci_enable_device(pci_dev); 6428 err = pci_enable_device(pci_dev);
6429 if (err) {
6430 printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
6431 dev->name);
6432 return err;
6433 }
6442 pci_restore_state(pci_dev); 6434 pci_restore_state(pci_dev);
6443 6435
6444 /* 6436 /*
@@ -7573,11 +7565,10 @@ static int ipw2100_wx_set_genie(struct net_device *dev,
7573 return -EINVAL; 7565 return -EINVAL;
7574 7566
7575 if (wrqu->data.length) { 7567 if (wrqu->data.length) {
7576 buf = kmalloc(wrqu->data.length, GFP_KERNEL); 7568 buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL);
7577 if (buf == NULL) 7569 if (buf == NULL)
7578 return -ENOMEM; 7570 return -ENOMEM;
7579 7571
7580 memcpy(buf, extra, wrqu->data.length);
7581 kfree(ieee->wpa_ie); 7572 kfree(ieee->wpa_ie);
7582 ieee->wpa_ie = buf; 7573 ieee->wpa_ie = buf;
7583 ieee->wpa_ie_len = wrqu->data.length; 7574 ieee->wpa_ie_len = wrqu->data.length;