aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 15:48:15 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 15:48:15 -0500
commit34161db6b14d984fb9b06c735b7b42f8803f6851 (patch)
tree99656278b6697f1cde5b05894b7c0ee22c63a00e /drivers/net/wireless/ipw2100.c
parent5847e1f4d058677c5e46dc6c3e3c70e8855ea3ba (diff)
parent620034c84d1d939717bdfbe02c51a3fee43541c3 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
Conflicts: include/linux/sunrpc/xprt.h net/sunrpc/xprtsock.c Fix up conflicts with the workqueue changes.
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c47
1 files changed, 27 insertions, 20 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 79607b8b877c..1bcd352a813b 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);
317static int ipw2100_ucode_download(struct ipw2100_priv *priv, 317static int ipw2100_ucode_download(struct ipw2100_priv *priv,
318 struct ipw2100_fw *fw); 318 struct ipw2100_fw *fw);
319static void ipw2100_wx_event_work(struct ipw2100_priv *priv); 319static void ipw2100_wx_event_work(struct work_struct *work);
320static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev); 320static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev);
321static struct iw_handler_def ipw2100_wx_handler_def; 321static 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
1876static void ipw2100_reset_adapter(struct ipw2100_priv *priv) 1877static 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
2079static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) 2082static 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
5527static void ipw2100_security_work(struct ipw2100_priv *priv) 5530static 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
5913static void ipw2100_hang_check(void *adapter) 5919static 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
5955static void ipw2100_rf_kill(void *adapter) 5962static 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);
@@ -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
8284static void ipw2100_wx_event_work(struct ipw2100_priv *priv) 8289static 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