diff options
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 4e4eaa2a99ca..79607b8b877c 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -5827,19 +5827,6 @@ static void ipw2100_tx_timeout(struct net_device *dev) | |||
5827 | schedule_reset(priv); | 5827 | schedule_reset(priv); |
5828 | } | 5828 | } |
5829 | 5829 | ||
5830 | /* | ||
5831 | * TODO: reimplement it so that it reads statistics | ||
5832 | * from the adapter using ordinal tables | ||
5833 | * instead of/in addition to collecting them | ||
5834 | * in the driver | ||
5835 | */ | ||
5836 | static struct net_device_stats *ipw2100_stats(struct net_device *dev) | ||
5837 | { | ||
5838 | struct ipw2100_priv *priv = ieee80211_priv(dev); | ||
5839 | |||
5840 | return &priv->ieee->stats; | ||
5841 | } | ||
5842 | |||
5843 | static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value) | 5830 | static int ipw2100_wpa_enable(struct ipw2100_priv *priv, int value) |
5844 | { | 5831 | { |
5845 | /* This is called when wpa_supplicant loads and closes the driver | 5832 | /* This is called when wpa_supplicant loads and closes the driver |
@@ -6022,7 +6009,6 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6022 | dev->open = ipw2100_open; | 6009 | dev->open = ipw2100_open; |
6023 | dev->stop = ipw2100_close; | 6010 | dev->stop = ipw2100_close; |
6024 | dev->init = ipw2100_net_init; | 6011 | dev->init = ipw2100_net_init; |
6025 | dev->get_stats = ipw2100_stats; | ||
6026 | dev->ethtool_ops = &ipw2100_ethtool_ops; | 6012 | dev->ethtool_ops = &ipw2100_ethtool_ops; |
6027 | dev->tx_timeout = ipw2100_tx_timeout; | 6013 | dev->tx_timeout = ipw2100_tx_timeout; |
6028 | dev->wireless_handlers = &ipw2100_wx_handler_def; | 6014 | dev->wireless_handlers = &ipw2100_wx_handler_def; |
@@ -6423,6 +6409,7 @@ static int ipw2100_resume(struct pci_dev *pci_dev) | |||
6423 | { | 6409 | { |
6424 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); | 6410 | struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); |
6425 | struct net_device *dev = priv->net_dev; | 6411 | struct net_device *dev = priv->net_dev; |
6412 | int err; | ||
6426 | u32 val; | 6413 | u32 val; |
6427 | 6414 | ||
6428 | if (IPW2100_PM_DISABLED) | 6415 | if (IPW2100_PM_DISABLED) |
@@ -6433,7 +6420,12 @@ static int ipw2100_resume(struct pci_dev *pci_dev) | |||
6433 | IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name); | 6420 | IPW_DEBUG_INFO("%s: Coming out of suspend...\n", dev->name); |
6434 | 6421 | ||
6435 | pci_set_power_state(pci_dev, PCI_D0); | 6422 | pci_set_power_state(pci_dev, PCI_D0); |
6436 | pci_enable_device(pci_dev); | 6423 | err = pci_enable_device(pci_dev); |
6424 | if (err) { | ||
6425 | printk(KERN_ERR "%s: pci_enable_device failed on resume\n", | ||
6426 | dev->name); | ||
6427 | return err; | ||
6428 | } | ||
6437 | pci_restore_state(pci_dev); | 6429 | pci_restore_state(pci_dev); |
6438 | 6430 | ||
6439 | /* | 6431 | /* |
@@ -7568,11 +7560,10 @@ static int ipw2100_wx_set_genie(struct net_device *dev, | |||
7568 | return -EINVAL; | 7560 | return -EINVAL; |
7569 | 7561 | ||
7570 | if (wrqu->data.length) { | 7562 | if (wrqu->data.length) { |
7571 | buf = kmalloc(wrqu->data.length, GFP_KERNEL); | 7563 | buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL); |
7572 | if (buf == NULL) | 7564 | if (buf == NULL) |
7573 | return -ENOMEM; | 7565 | return -ENOMEM; |
7574 | 7566 | ||
7575 | memcpy(buf, extra, wrqu->data.length); | ||
7576 | kfree(ieee->wpa_ie); | 7567 | kfree(ieee->wpa_ie); |
7577 | ieee->wpa_ie = buf; | 7568 | ieee->wpa_ie = buf; |
7578 | ieee->wpa_ie_len = wrqu->data.length; | 7569 | ieee->wpa_ie_len = wrqu->data.length; |