diff options
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 79607b8b877c..dd9ba4aad7bb 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -316,7 +316,7 @@ static void ipw2100_release_firmware(struct ipw2100_priv *priv, | |||
316 | struct ipw2100_fw *fw); | 316 | struct ipw2100_fw *fw); |
317 | static int ipw2100_ucode_download(struct ipw2100_priv *priv, | 317 | static int ipw2100_ucode_download(struct ipw2100_priv *priv, |
318 | struct ipw2100_fw *fw); | 318 | struct ipw2100_fw *fw); |
319 | static void ipw2100_wx_event_work(struct ipw2100_priv *priv); | 319 | static void ipw2100_wx_event_work(struct work_struct *work); |
320 | static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev); | 320 | static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev); |
321 | static struct iw_handler_def ipw2100_wx_handler_def; | 321 | static struct iw_handler_def ipw2100_wx_handler_def; |
322 | 322 | ||
@@ -679,7 +679,8 @@ static void schedule_reset(struct ipw2100_priv *priv) | |||
679 | queue_delayed_work(priv->workqueue, &priv->reset_work, | 679 | queue_delayed_work(priv->workqueue, &priv->reset_work, |
680 | priv->reset_backoff * HZ); | 680 | priv->reset_backoff * HZ); |
681 | else | 681 | else |
682 | queue_work(priv->workqueue, &priv->reset_work); | 682 | queue_delayed_work(priv->workqueue, &priv->reset_work, |
683 | 0); | ||
683 | 684 | ||
684 | if (priv->reset_backoff < MAX_RESET_BACKOFF) | 685 | if (priv->reset_backoff < MAX_RESET_BACKOFF) |
685 | priv->reset_backoff++; | 686 | priv->reset_backoff++; |
@@ -1873,8 +1874,10 @@ static void ipw2100_down(struct ipw2100_priv *priv) | |||
1873 | netif_stop_queue(priv->net_dev); | 1874 | netif_stop_queue(priv->net_dev); |
1874 | } | 1875 | } |
1875 | 1876 | ||
1876 | static void ipw2100_reset_adapter(struct ipw2100_priv *priv) | 1877 | static void ipw2100_reset_adapter(struct work_struct *work) |
1877 | { | 1878 | { |
1879 | struct ipw2100_priv *priv = | ||
1880 | container_of(work, struct ipw2100_priv, reset_work.work); | ||
1878 | unsigned long flags; | 1881 | unsigned long flags; |
1879 | union iwreq_data wrqu = { | 1882 | union iwreq_data wrqu = { |
1880 | .ap_addr = { | 1883 | .ap_addr = { |
@@ -2071,9 +2074,9 @@ static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) | |||
2071 | return; | 2074 | return; |
2072 | 2075 | ||
2073 | if (priv->status & STATUS_SECURITY_UPDATED) | 2076 | if (priv->status & STATUS_SECURITY_UPDATED) |
2074 | queue_work(priv->workqueue, &priv->security_work); | 2077 | queue_delayed_work(priv->workqueue, &priv->security_work, 0); |
2075 | 2078 | ||
2076 | queue_work(priv->workqueue, &priv->wx_event_work); | 2079 | queue_delayed_work(priv->workqueue, &priv->wx_event_work, 0); |
2077 | } | 2080 | } |
2078 | 2081 | ||
2079 | static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | 2082 | static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) |
@@ -5524,8 +5527,11 @@ static int ipw2100_configure_security(struct ipw2100_priv *priv, int batch_mode) | |||
5524 | return err; | 5527 | return err; |
5525 | } | 5528 | } |
5526 | 5529 | ||
5527 | static void ipw2100_security_work(struct ipw2100_priv *priv) | 5530 | static void ipw2100_security_work(struct work_struct *work) |
5528 | { | 5531 | { |
5532 | struct ipw2100_priv *priv = | ||
5533 | container_of(work, struct ipw2100_priv, security_work.work); | ||
5534 | |||
5529 | /* If we happen to have reconnected before we get a chance to | 5535 | /* If we happen to have reconnected before we get a chance to |
5530 | * process this, then update the security settings--which causes | 5536 | * process this, then update the security settings--which causes |
5531 | * a disassociation to occur */ | 5537 | * a disassociation to occur */ |
@@ -5748,7 +5754,7 @@ static int ipw2100_set_address(struct net_device *dev, void *p) | |||
5748 | 5754 | ||
5749 | priv->reset_backoff = 0; | 5755 | priv->reset_backoff = 0; |
5750 | mutex_unlock(&priv->action_mutex); | 5756 | mutex_unlock(&priv->action_mutex); |
5751 | ipw2100_reset_adapter(priv); | 5757 | ipw2100_reset_adapter(&priv->reset_work.work); |
5752 | return 0; | 5758 | return 0; |
5753 | 5759 | ||
5754 | done: | 5760 | done: |
@@ -5910,9 +5916,10 @@ static const struct ethtool_ops ipw2100_ethtool_ops = { | |||
5910 | .get_drvinfo = ipw_ethtool_get_drvinfo, | 5916 | .get_drvinfo = ipw_ethtool_get_drvinfo, |
5911 | }; | 5917 | }; |
5912 | 5918 | ||
5913 | static void ipw2100_hang_check(void *adapter) | 5919 | static void ipw2100_hang_check(struct work_struct *work) |
5914 | { | 5920 | { |
5915 | struct ipw2100_priv *priv = adapter; | 5921 | struct ipw2100_priv *priv = |
5922 | container_of(work, struct ipw2100_priv, hang_check.work); | ||
5916 | unsigned long flags; | 5923 | unsigned long flags; |
5917 | u32 rtc = 0xa5a5a5a5; | 5924 | u32 rtc = 0xa5a5a5a5; |
5918 | u32 len = sizeof(rtc); | 5925 | u32 len = sizeof(rtc); |
@@ -5952,9 +5959,10 @@ static void ipw2100_hang_check(void *adapter) | |||
5952 | spin_unlock_irqrestore(&priv->low_lock, flags); | 5959 | spin_unlock_irqrestore(&priv->low_lock, flags); |
5953 | } | 5960 | } |
5954 | 5961 | ||
5955 | static void ipw2100_rf_kill(void *adapter) | 5962 | static void ipw2100_rf_kill(struct work_struct *work) |
5956 | { | 5963 | { |
5957 | struct ipw2100_priv *priv = adapter; | 5964 | struct ipw2100_priv *priv = |
5965 | container_of(work, struct ipw2100_priv, rf_kill.work); | ||
5958 | unsigned long flags; | 5966 | unsigned long flags; |
5959 | 5967 | ||
5960 | spin_lock_irqsave(&priv->low_lock, flags); | 5968 | spin_lock_irqsave(&priv->low_lock, flags); |
@@ -6103,14 +6111,11 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6103 | 6111 | ||
6104 | priv->workqueue = create_workqueue(DRV_NAME); | 6112 | priv->workqueue = create_workqueue(DRV_NAME); |
6105 | 6113 | ||
6106 | INIT_WORK(&priv->reset_work, | 6114 | INIT_DELAYED_WORK(&priv->reset_work, ipw2100_reset_adapter); |
6107 | (void (*)(void *))ipw2100_reset_adapter, priv); | 6115 | INIT_DELAYED_WORK(&priv->security_work, ipw2100_security_work); |
6108 | INIT_WORK(&priv->security_work, | 6116 | INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); |
6109 | (void (*)(void *))ipw2100_security_work, priv); | 6117 | INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check); |
6110 | INIT_WORK(&priv->wx_event_work, | 6118 | INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); |
6111 | (void (*)(void *))ipw2100_wx_event_work, priv); | ||
6112 | INIT_WORK(&priv->hang_check, ipw2100_hang_check, priv); | ||
6113 | INIT_WORK(&priv->rf_kill, ipw2100_rf_kill, priv); | ||
6114 | 6119 | ||
6115 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 6120 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
6116 | ipw2100_irq_tasklet, (unsigned long)priv); | 6121 | ipw2100_irq_tasklet, (unsigned long)priv); |
@@ -6215,7 +6220,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev, | |||
6215 | /* Allocate and initialize the Tx/Rx queues and lists */ | 6220 | /* Allocate and initialize the Tx/Rx queues and lists */ |
6216 | if (ipw2100_queues_allocate(priv)) { | 6221 | if (ipw2100_queues_allocate(priv)) { |
6217 | printk(KERN_WARNING DRV_NAME | 6222 | printk(KERN_WARNING DRV_NAME |
6218 | "Error calilng ipw2100_queues_allocate.\n"); | 6223 | "Error calling ipw2100_queues_allocate.\n"); |
6219 | err = -ENOMEM; | 6224 | err = -ENOMEM; |
6220 | goto fail; | 6225 | goto fail; |
6221 | } | 6226 | } |
@@ -8281,8 +8286,10 @@ static struct iw_handler_def ipw2100_wx_handler_def = { | |||
8281 | .get_wireless_stats = ipw2100_wx_wireless_stats, | 8286 | .get_wireless_stats = ipw2100_wx_wireless_stats, |
8282 | }; | 8287 | }; |
8283 | 8288 | ||
8284 | static void ipw2100_wx_event_work(struct ipw2100_priv *priv) | 8289 | static void ipw2100_wx_event_work(struct work_struct *work) |
8285 | { | 8290 | { |
8291 | struct ipw2100_priv *priv = | ||
8292 | container_of(work, struct ipw2100_priv, wx_event_work.work); | ||
8286 | union iwreq_data wrqu; | 8293 | union iwreq_data wrqu; |
8287 | int len = ETH_ALEN; | 8294 | int len = ETH_ALEN; |
8288 | 8295 | ||