diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
commit | 8d1413b28033c49c7f1a4d320e815d7a5531acee (patch) | |
tree | b37281abef014cd60803b81c100388d7a475d49e /drivers/net/wireless | |
parent | ed25ffa16434724f5ed825aa48734c7f3aefa203 (diff) | |
parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) |
Merge branch 'master' into upstream
Conflicts:
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/net/wireless')
29 files changed, 274 insertions, 370 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index ac9437d497f0..f12355398fe7 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -219,21 +219,6 @@ static int airo_config(struct pcmcia_device *link) | |||
219 | dev = link->priv; | 219 | dev = link->priv; |
220 | 220 | ||
221 | DEBUG(0, "airo_config(0x%p)\n", link); | 221 | DEBUG(0, "airo_config(0x%p)\n", link); |
222 | |||
223 | /* | ||
224 | This reads the card's CONFIG tuple to find its configuration | ||
225 | registers. | ||
226 | */ | ||
227 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
228 | tuple.Attributes = 0; | ||
229 | tuple.TupleData = buf; | ||
230 | tuple.TupleDataMax = sizeof(buf); | ||
231 | tuple.TupleOffset = 0; | ||
232 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
233 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
234 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
235 | link->conf.ConfigBase = parse.config.base; | ||
236 | link->conf.Present = parse.config.rmask[0]; | ||
237 | 222 | ||
238 | /* | 223 | /* |
239 | In this loop, we scan the CIS for configuration table entries, | 224 | In this loop, we scan the CIS for configuration table entries, |
@@ -247,6 +232,10 @@ static int airo_config(struct pcmcia_device *link) | |||
247 | these things without consulting the CIS, and most client drivers | 232 | these things without consulting the CIS, and most client drivers |
248 | will only use the CIS to fill in implementation-defined details. | 233 | will only use the CIS to fill in implementation-defined details. |
249 | */ | 234 | */ |
235 | tuple.Attributes = 0; | ||
236 | tuple.TupleData = buf; | ||
237 | tuple.TupleDataMax = sizeof(buf); | ||
238 | tuple.TupleOffset = 0; | ||
250 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 239 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
251 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 240 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
252 | while (1) { | 241 | while (1) { |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 5c410989c4d7..12617cd0b78e 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -244,17 +244,6 @@ static int atmel_config(struct pcmcia_device *link) | |||
244 | tuple.TupleOffset = 0; | 244 | tuple.TupleOffset = 0; |
245 | 245 | ||
246 | /* | 246 | /* |
247 | This reads the card's CONFIG tuple to find its configuration | ||
248 | registers. | ||
249 | */ | ||
250 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
251 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
252 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
253 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
254 | link->conf.ConfigBase = parse.config.base; | ||
255 | link->conf.Present = parse.config.rmask[0]; | ||
256 | |||
257 | /* | ||
258 | In this loop, we scan the CIS for configuration table entries, | 247 | In this loop, we scan the CIS for configuration table entries, |
259 | each of which describes a valid card configuration, including | 248 | each of which describes a valid card configuration, including |
260 | voltage, IO window, memory window, and interrupt settings. | 249 | voltage, IO window, memory window, and interrupt settings. |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h index 94dfb92fab5c..8286678513b9 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx.h | |||
@@ -819,7 +819,7 @@ struct bcm43xx_private { | |||
819 | struct tasklet_struct isr_tasklet; | 819 | struct tasklet_struct isr_tasklet; |
820 | 820 | ||
821 | /* Periodic tasks */ | 821 | /* Periodic tasks */ |
822 | struct work_struct periodic_work; | 822 | struct delayed_work periodic_work; |
823 | unsigned int periodic_state; | 823 | unsigned int periodic_state; |
824 | 824 | ||
825 | struct work_struct restart_work; | 825 | struct work_struct restart_work; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 5b3c27359a18..2ec2e5afce67 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3215,9 +3215,10 @@ static void do_periodic_work(struct bcm43xx_private *bcm) | |||
3215 | schedule_delayed_work(&bcm->periodic_work, HZ * 15); | 3215 | schedule_delayed_work(&bcm->periodic_work, HZ * 15); |
3216 | } | 3216 | } |
3217 | 3217 | ||
3218 | static void bcm43xx_periodic_work_handler(void *d) | 3218 | static void bcm43xx_periodic_work_handler(struct work_struct *work) |
3219 | { | 3219 | { |
3220 | struct bcm43xx_private *bcm = d; | 3220 | struct bcm43xx_private *bcm = |
3221 | container_of(work, struct bcm43xx_private, periodic_work.work); | ||
3221 | struct net_device *net_dev = bcm->net_dev; | 3222 | struct net_device *net_dev = bcm->net_dev; |
3222 | unsigned long flags; | 3223 | unsigned long flags; |
3223 | u32 savedirqs = 0; | 3224 | u32 savedirqs = 0; |
@@ -3279,11 +3280,11 @@ void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm) | |||
3279 | 3280 | ||
3280 | void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) | 3281 | void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) |
3281 | { | 3282 | { |
3282 | struct work_struct *work = &(bcm->periodic_work); | 3283 | struct delayed_work *work = &bcm->periodic_work; |
3283 | 3284 | ||
3284 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | 3285 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); |
3285 | INIT_WORK(work, bcm43xx_periodic_work_handler, bcm); | 3286 | INIT_DELAYED_WORK(work, bcm43xx_periodic_work_handler); |
3286 | schedule_work(work); | 3287 | schedule_delayed_work(work, 0); |
3287 | } | 3288 | } |
3288 | 3289 | ||
3289 | static void bcm43xx_security_init(struct bcm43xx_private *bcm) | 3290 | static void bcm43xx_security_init(struct bcm43xx_private *bcm) |
@@ -3635,7 +3636,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm) | |||
3635 | bcm43xx_periodic_tasks_setup(bcm); | 3636 | bcm43xx_periodic_tasks_setup(bcm); |
3636 | 3637 | ||
3637 | /*FIXME: This should be handled by softmac instead. */ | 3638 | /*FIXME: This should be handled by softmac instead. */ |
3638 | schedule_work(&bcm->softmac->associnfo.work); | 3639 | schedule_delayed_work(&bcm->softmac->associnfo.work, 0); |
3639 | 3640 | ||
3640 | out: | 3641 | out: |
3641 | mutex_unlock(&(bcm)->mutex); | 3642 | mutex_unlock(&(bcm)->mutex); |
@@ -4182,9 +4183,10 @@ static void __devexit bcm43xx_remove_one(struct pci_dev *pdev) | |||
4182 | /* Hard-reset the chip. Do not call this directly. | 4183 | /* Hard-reset the chip. Do not call this directly. |
4183 | * Use bcm43xx_controller_restart() | 4184 | * Use bcm43xx_controller_restart() |
4184 | */ | 4185 | */ |
4185 | static void bcm43xx_chip_reset(void *_bcm) | 4186 | static void bcm43xx_chip_reset(struct work_struct *work) |
4186 | { | 4187 | { |
4187 | struct bcm43xx_private *bcm = _bcm; | 4188 | struct bcm43xx_private *bcm = |
4189 | container_of(work, struct bcm43xx_private, restart_work); | ||
4188 | struct bcm43xx_phyinfo *phy; | 4190 | struct bcm43xx_phyinfo *phy; |
4189 | int err = -ENODEV; | 4191 | int err = -ENODEV; |
4190 | 4192 | ||
@@ -4211,7 +4213,7 @@ void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason) | |||
4211 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) | 4213 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) |
4212 | return; | 4214 | return; |
4213 | printk(KERN_ERR PFX "Controller RESET (%s) ...\n", reason); | 4215 | printk(KERN_ERR PFX "Controller RESET (%s) ...\n", reason); |
4214 | INIT_WORK(&bcm->restart_work, bcm43xx_chip_reset, bcm); | 4216 | INIT_WORK(&bcm->restart_work, bcm43xx_chip_reset); |
4215 | schedule_work(&bcm->restart_work); | 4217 | schedule_work(&bcm->restart_work); |
4216 | } | 4218 | } |
4217 | 4219 | ||
diff --git a/drivers/net/wireless/hostap/hostap.h b/drivers/net/wireless/hostap/hostap.h index e663518bd570..e89c890d16fd 100644 --- a/drivers/net/wireless/hostap/hostap.h +++ b/drivers/net/wireless/hostap/hostap.h | |||
@@ -35,7 +35,7 @@ int hostap_80211_get_hdrlen(u16 fc); | |||
35 | struct net_device_stats *hostap_get_stats(struct net_device *dev); | 35 | struct net_device_stats *hostap_get_stats(struct net_device *dev); |
36 | void hostap_setup_dev(struct net_device *dev, local_info_t *local, | 36 | void hostap_setup_dev(struct net_device *dev, local_info_t *local, |
37 | int main_dev); | 37 | int main_dev); |
38 | void hostap_set_multicast_list_queue(void *data); | 38 | void hostap_set_multicast_list_queue(struct work_struct *work); |
39 | int hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked); | 39 | int hostap_set_hostapd(local_info_t *local, int val, int rtnl_locked); |
40 | int hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked); | 40 | int hostap_set_hostapd_sta(local_info_t *local, int val, int rtnl_locked); |
41 | void hostap_cleanup(local_info_t *local); | 41 | void hostap_cleanup(local_info_t *local); |
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c index ba13125024cb..08bc57a4b895 100644 --- a/drivers/net/wireless/hostap/hostap_ap.c +++ b/drivers/net/wireless/hostap/hostap_ap.c | |||
@@ -49,10 +49,10 @@ MODULE_PARM_DESC(autom_ap_wds, "Add WDS connections to other APs " | |||
49 | static struct sta_info* ap_get_sta(struct ap_data *ap, u8 *sta); | 49 | static struct sta_info* ap_get_sta(struct ap_data *ap, u8 *sta); |
50 | static void hostap_event_expired_sta(struct net_device *dev, | 50 | static void hostap_event_expired_sta(struct net_device *dev, |
51 | struct sta_info *sta); | 51 | struct sta_info *sta); |
52 | static void handle_add_proc_queue(void *data); | 52 | static void handle_add_proc_queue(struct work_struct *work); |
53 | 53 | ||
54 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 54 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
55 | static void handle_wds_oper_queue(void *data); | 55 | static void handle_wds_oper_queue(struct work_struct *work); |
56 | static void prism2_send_mgmt(struct net_device *dev, | 56 | static void prism2_send_mgmt(struct net_device *dev, |
57 | u16 type_subtype, char *body, | 57 | u16 type_subtype, char *body, |
58 | int body_len, u8 *addr, u16 tx_cb_idx); | 58 | int body_len, u8 *addr, u16 tx_cb_idx); |
@@ -807,7 +807,7 @@ void hostap_init_data(local_info_t *local) | |||
807 | INIT_LIST_HEAD(&ap->sta_list); | 807 | INIT_LIST_HEAD(&ap->sta_list); |
808 | 808 | ||
809 | /* Initialize task queue structure for AP management */ | 809 | /* Initialize task queue structure for AP management */ |
810 | INIT_WORK(&local->ap->add_sta_proc_queue, handle_add_proc_queue, ap); | 810 | INIT_WORK(&local->ap->add_sta_proc_queue, handle_add_proc_queue); |
811 | 811 | ||
812 | ap->tx_callback_idx = | 812 | ap->tx_callback_idx = |
813 | hostap_tx_callback_register(local, hostap_ap_tx_cb, ap); | 813 | hostap_tx_callback_register(local, hostap_ap_tx_cb, ap); |
@@ -815,7 +815,7 @@ void hostap_init_data(local_info_t *local) | |||
815 | printk(KERN_WARNING "%s: failed to register TX callback for " | 815 | printk(KERN_WARNING "%s: failed to register TX callback for " |
816 | "AP\n", local->dev->name); | 816 | "AP\n", local->dev->name); |
817 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 817 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
818 | INIT_WORK(&local->ap->wds_oper_queue, handle_wds_oper_queue, local); | 818 | INIT_WORK(&local->ap->wds_oper_queue, handle_wds_oper_queue); |
819 | 819 | ||
820 | ap->tx_callback_auth = | 820 | ap->tx_callback_auth = |
821 | hostap_tx_callback_register(local, hostap_ap_tx_cb_auth, ap); | 821 | hostap_tx_callback_register(local, hostap_ap_tx_cb_auth, ap); |
@@ -1062,9 +1062,10 @@ static int prism2_sta_proc_read(char *page, char **start, off_t off, | |||
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | 1064 | ||
1065 | static void handle_add_proc_queue(void *data) | 1065 | static void handle_add_proc_queue(struct work_struct *work) |
1066 | { | 1066 | { |
1067 | struct ap_data *ap = (struct ap_data *) data; | 1067 | struct ap_data *ap = container_of(work, struct ap_data, |
1068 | add_sta_proc_queue); | ||
1068 | struct sta_info *sta; | 1069 | struct sta_info *sta; |
1069 | char name[20]; | 1070 | char name[20]; |
1070 | struct add_sta_proc_data *entry, *prev; | 1071 | struct add_sta_proc_data *entry, *prev; |
@@ -1952,9 +1953,11 @@ static void handle_pspoll(local_info_t *local, | |||
1952 | 1953 | ||
1953 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 1954 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
1954 | 1955 | ||
1955 | static void handle_wds_oper_queue(void *data) | 1956 | static void handle_wds_oper_queue(struct work_struct *work) |
1956 | { | 1957 | { |
1957 | local_info_t *local = data; | 1958 | struct ap_data *ap = container_of(work, struct ap_data, |
1959 | wds_oper_queue); | ||
1960 | local_info_t *local = ap->local; | ||
1958 | struct wds_oper_data *entry, *prev; | 1961 | struct wds_oper_data *entry, *prev; |
1959 | 1962 | ||
1960 | spin_lock_bh(&local->lock); | 1963 | spin_lock_bh(&local->lock); |
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index f63909e4bc32..ee542ec6d6a8 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -293,15 +293,12 @@ static int sandisk_enable_wireless(struct net_device *dev) | |||
293 | goto done; | 293 | goto done; |
294 | } | 294 | } |
295 | 295 | ||
296 | tuple.DesiredTuple = CISTPL_MANFID; | ||
297 | tuple.Attributes = TUPLE_RETURN_COMMON; | 296 | tuple.Attributes = TUPLE_RETURN_COMMON; |
298 | tuple.TupleData = buf; | 297 | tuple.TupleData = buf; |
299 | tuple.TupleDataMax = sizeof(buf); | 298 | tuple.TupleDataMax = sizeof(buf); |
300 | tuple.TupleOffset = 0; | 299 | tuple.TupleOffset = 0; |
301 | if (pcmcia_get_first_tuple(hw_priv->link, &tuple) || | 300 | |
302 | pcmcia_get_tuple_data(hw_priv->link, &tuple) || | 301 | if (hw_priv->link->manf_id != 0xd601 || hw_priv->link->card_id != 0x0101) { |
303 | pcmcia_parse_tuple(hw_priv->link, &tuple, parse) || | ||
304 | parse->manfid.manf != 0xd601 || parse->manfid.card != 0x0101) { | ||
305 | /* No SanDisk manfid found */ | 302 | /* No SanDisk manfid found */ |
306 | ret = -ENODEV; | 303 | ret = -ENODEV; |
307 | goto done; | 304 | goto done; |
@@ -573,16 +570,10 @@ static int prism2_config(struct pcmcia_device *link) | |||
573 | } | 570 | } |
574 | memset(hw_priv, 0, sizeof(*hw_priv)); | 571 | memset(hw_priv, 0, sizeof(*hw_priv)); |
575 | 572 | ||
576 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
577 | tuple.Attributes = 0; | 573 | tuple.Attributes = 0; |
578 | tuple.TupleData = buf; | 574 | tuple.TupleData = buf; |
579 | tuple.TupleDataMax = sizeof(buf); | 575 | tuple.TupleDataMax = sizeof(buf); |
580 | tuple.TupleOffset = 0; | 576 | tuple.TupleOffset = 0; |
581 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
582 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
583 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, parse)); | ||
584 | link->conf.ConfigBase = parse->config.base; | ||
585 | link->conf.Present = parse->config.rmask[0]; | ||
586 | 577 | ||
587 | CS_CHECK(GetConfigurationInfo, | 578 | CS_CHECK(GetConfigurationInfo, |
588 | pcmcia_get_configuration_info(link, &conf)); | 579 | pcmcia_get_configuration_info(link, &conf)); |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index ed00ebb6e7f4..c19e68636a1c 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -1645,9 +1645,9 @@ static void prism2_schedule_reset(local_info_t *local) | |||
1645 | 1645 | ||
1646 | /* Called only as scheduled task after noticing card timeout in interrupt | 1646 | /* Called only as scheduled task after noticing card timeout in interrupt |
1647 | * context */ | 1647 | * context */ |
1648 | static void handle_reset_queue(void *data) | 1648 | static void handle_reset_queue(struct work_struct *work) |
1649 | { | 1649 | { |
1650 | local_info_t *local = (local_info_t *) data; | 1650 | local_info_t *local = container_of(work, local_info_t, reset_queue); |
1651 | 1651 | ||
1652 | printk(KERN_DEBUG "%s: scheduled card reset\n", local->dev->name); | 1652 | printk(KERN_DEBUG "%s: scheduled card reset\n", local->dev->name); |
1653 | prism2_hw_reset(local->dev); | 1653 | prism2_hw_reset(local->dev); |
@@ -2896,9 +2896,10 @@ static void hostap_passive_scan(unsigned long data) | |||
2896 | 2896 | ||
2897 | /* Called only as a scheduled task when communications quality values should | 2897 | /* Called only as a scheduled task when communications quality values should |
2898 | * be updated. */ | 2898 | * be updated. */ |
2899 | static void handle_comms_qual_update(void *data) | 2899 | static void handle_comms_qual_update(struct work_struct *work) |
2900 | { | 2900 | { |
2901 | local_info_t *local = data; | 2901 | local_info_t *local = |
2902 | container_of(work, local_info_t, comms_qual_update); | ||
2902 | prism2_update_comms_qual(local->dev); | 2903 | prism2_update_comms_qual(local->dev); |
2903 | } | 2904 | } |
2904 | 2905 | ||
@@ -3050,9 +3051,9 @@ static int prism2_set_tim(struct net_device *dev, int aid, int set) | |||
3050 | } | 3051 | } |
3051 | 3052 | ||
3052 | 3053 | ||
3053 | static void handle_set_tim_queue(void *data) | 3054 | static void handle_set_tim_queue(struct work_struct *work) |
3054 | { | 3055 | { |
3055 | local_info_t *local = (local_info_t *) data; | 3056 | local_info_t *local = container_of(work, local_info_t, set_tim_queue); |
3056 | struct set_tim_data *entry; | 3057 | struct set_tim_data *entry; |
3057 | u16 val; | 3058 | u16 val; |
3058 | 3059 | ||
@@ -3209,15 +3210,15 @@ prism2_init_local_data(struct prism2_helper_functions *funcs, int card_idx, | |||
3209 | local->scan_channel_mask = 0xffff; | 3210 | local->scan_channel_mask = 0xffff; |
3210 | 3211 | ||
3211 | /* Initialize task queue structures */ | 3212 | /* Initialize task queue structures */ |
3212 | INIT_WORK(&local->reset_queue, handle_reset_queue, local); | 3213 | INIT_WORK(&local->reset_queue, handle_reset_queue); |
3213 | INIT_WORK(&local->set_multicast_list_queue, | 3214 | INIT_WORK(&local->set_multicast_list_queue, |
3214 | hostap_set_multicast_list_queue, local->dev); | 3215 | hostap_set_multicast_list_queue); |
3215 | 3216 | ||
3216 | INIT_WORK(&local->set_tim_queue, handle_set_tim_queue, local); | 3217 | INIT_WORK(&local->set_tim_queue, handle_set_tim_queue); |
3217 | INIT_LIST_HEAD(&local->set_tim_list); | 3218 | INIT_LIST_HEAD(&local->set_tim_list); |
3218 | spin_lock_init(&local->set_tim_lock); | 3219 | spin_lock_init(&local->set_tim_lock); |
3219 | 3220 | ||
3220 | INIT_WORK(&local->comms_qual_update, handle_comms_qual_update, local); | 3221 | INIT_WORK(&local->comms_qual_update, handle_comms_qual_update); |
3221 | 3222 | ||
3222 | /* Initialize tasklets for handling hardware IRQ related operations | 3223 | /* Initialize tasklets for handling hardware IRQ related operations |
3223 | * outside hw IRQ handler */ | 3224 | * outside hw IRQ handler */ |
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c index 50f72d831cf4..5fd2b1ad7f5e 100644 --- a/drivers/net/wireless/hostap/hostap_info.c +++ b/drivers/net/wireless/hostap/hostap_info.c | |||
@@ -474,9 +474,9 @@ static void handle_info_queue_scanresults(local_info_t *local) | |||
474 | 474 | ||
475 | /* Called only as scheduled task after receiving info frames (used to avoid | 475 | /* Called only as scheduled task after receiving info frames (used to avoid |
476 | * pending too much time in HW IRQ handler). */ | 476 | * pending too much time in HW IRQ handler). */ |
477 | static void handle_info_queue(void *data) | 477 | static void handle_info_queue(struct work_struct *work) |
478 | { | 478 | { |
479 | local_info_t *local = (local_info_t *) data; | 479 | local_info_t *local = container_of(work, local_info_t, info_queue); |
480 | 480 | ||
481 | if (test_and_clear_bit(PRISM2_INFO_PENDING_LINKSTATUS, | 481 | if (test_and_clear_bit(PRISM2_INFO_PENDING_LINKSTATUS, |
482 | &local->pending_info)) | 482 | &local->pending_info)) |
@@ -493,7 +493,7 @@ void hostap_info_init(local_info_t *local) | |||
493 | { | 493 | { |
494 | skb_queue_head_init(&local->info_list); | 494 | skb_queue_head_init(&local->info_list); |
495 | #ifndef PRISM2_NO_STATION_MODES | 495 | #ifndef PRISM2_NO_STATION_MODES |
496 | INIT_WORK(&local->info_queue, handle_info_queue, local); | 496 | INIT_WORK(&local->info_queue, handle_info_queue); |
497 | #endif /* PRISM2_NO_STATION_MODES */ | 497 | #endif /* PRISM2_NO_STATION_MODES */ |
498 | } | 498 | } |
499 | 499 | ||
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index 53374fcba77e..0796be9d9e77 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c | |||
@@ -767,14 +767,14 @@ static int prism2_set_mac_address(struct net_device *dev, void *p) | |||
767 | 767 | ||
768 | /* TODO: to be further implemented as soon as Prism2 fully supports | 768 | /* TODO: to be further implemented as soon as Prism2 fully supports |
769 | * GroupAddresses and correct documentation is available */ | 769 | * GroupAddresses and correct documentation is available */ |
770 | void hostap_set_multicast_list_queue(void *data) | 770 | void hostap_set_multicast_list_queue(struct work_struct *work) |
771 | { | 771 | { |
772 | struct net_device *dev = (struct net_device *) data; | 772 | local_info_t *local = |
773 | container_of(work, local_info_t, set_multicast_list_queue); | ||
774 | struct net_device *dev = local->dev; | ||
773 | struct hostap_interface *iface; | 775 | struct hostap_interface *iface; |
774 | local_info_t *local; | ||
775 | 776 | ||
776 | iface = netdev_priv(dev); | 777 | iface = netdev_priv(dev); |
777 | local = iface->local; | ||
778 | if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, | 778 | if (hostap_set_word(dev, HFA384X_RID_PROMISCUOUSMODE, |
779 | local->is_promisc)) { | 779 | local->is_promisc)) { |
780 | printk(KERN_INFO "%s: %sabling promiscuous mode failed\n", | 780 | printk(KERN_INFO "%s: %sabling promiscuous mode failed\n", |
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); |
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); |
@@ -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 | ||
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h index 55b7227198df..de7d384d38af 100644 --- a/drivers/net/wireless/ipw2100.h +++ b/drivers/net/wireless/ipw2100.h | |||
@@ -583,11 +583,11 @@ struct ipw2100_priv { | |||
583 | struct tasklet_struct irq_tasklet; | 583 | struct tasklet_struct irq_tasklet; |
584 | 584 | ||
585 | struct workqueue_struct *workqueue; | 585 | struct workqueue_struct *workqueue; |
586 | struct work_struct reset_work; | 586 | struct delayed_work reset_work; |
587 | struct work_struct security_work; | 587 | struct delayed_work security_work; |
588 | struct work_struct wx_event_work; | 588 | struct delayed_work wx_event_work; |
589 | struct work_struct hang_check; | 589 | struct delayed_work hang_check; |
590 | struct work_struct rf_kill; | 590 | struct delayed_work rf_kill; |
591 | 591 | ||
592 | u32 interrupts; | 592 | u32 interrupts; |
593 | int tx_interrupts; | 593 | int tx_interrupts; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index c692d01a76ca..e82e56bb85e1 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -187,9 +187,9 @@ static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *); | |||
187 | static void ipw_rx_queue_free(struct ipw_priv *, struct ipw_rx_queue *); | 187 | static void ipw_rx_queue_free(struct ipw_priv *, struct ipw_rx_queue *); |
188 | static void ipw_rx_queue_replenish(void *); | 188 | static void ipw_rx_queue_replenish(void *); |
189 | static int ipw_up(struct ipw_priv *); | 189 | static int ipw_up(struct ipw_priv *); |
190 | static void ipw_bg_up(void *); | 190 | static void ipw_bg_up(struct work_struct *work); |
191 | static void ipw_down(struct ipw_priv *); | 191 | static void ipw_down(struct ipw_priv *); |
192 | static void ipw_bg_down(void *); | 192 | static void ipw_bg_down(struct work_struct *work); |
193 | static int ipw_config(struct ipw_priv *); | 193 | static int ipw_config(struct ipw_priv *); |
194 | static int init_supported_rates(struct ipw_priv *priv, | 194 | static int init_supported_rates(struct ipw_priv *priv, |
195 | struct ipw_supported_rates *prates); | 195 | struct ipw_supported_rates *prates); |
@@ -862,11 +862,12 @@ static void ipw_led_link_on(struct ipw_priv *priv) | |||
862 | spin_unlock_irqrestore(&priv->lock, flags); | 862 | spin_unlock_irqrestore(&priv->lock, flags); |
863 | } | 863 | } |
864 | 864 | ||
865 | static void ipw_bg_led_link_on(void *data) | 865 | static void ipw_bg_led_link_on(struct work_struct *work) |
866 | { | 866 | { |
867 | struct ipw_priv *priv = data; | 867 | struct ipw_priv *priv = |
868 | container_of(work, struct ipw_priv, led_link_on.work); | ||
868 | mutex_lock(&priv->mutex); | 869 | mutex_lock(&priv->mutex); |
869 | ipw_led_link_on(data); | 870 | ipw_led_link_on(priv); |
870 | mutex_unlock(&priv->mutex); | 871 | mutex_unlock(&priv->mutex); |
871 | } | 872 | } |
872 | 873 | ||
@@ -906,11 +907,12 @@ static void ipw_led_link_off(struct ipw_priv *priv) | |||
906 | spin_unlock_irqrestore(&priv->lock, flags); | 907 | spin_unlock_irqrestore(&priv->lock, flags); |
907 | } | 908 | } |
908 | 909 | ||
909 | static void ipw_bg_led_link_off(void *data) | 910 | static void ipw_bg_led_link_off(struct work_struct *work) |
910 | { | 911 | { |
911 | struct ipw_priv *priv = data; | 912 | struct ipw_priv *priv = |
913 | container_of(work, struct ipw_priv, led_link_off.work); | ||
912 | mutex_lock(&priv->mutex); | 914 | mutex_lock(&priv->mutex); |
913 | ipw_led_link_off(data); | 915 | ipw_led_link_off(priv); |
914 | mutex_unlock(&priv->mutex); | 916 | mutex_unlock(&priv->mutex); |
915 | } | 917 | } |
916 | 918 | ||
@@ -985,11 +987,12 @@ static void ipw_led_activity_off(struct ipw_priv *priv) | |||
985 | spin_unlock_irqrestore(&priv->lock, flags); | 987 | spin_unlock_irqrestore(&priv->lock, flags); |
986 | } | 988 | } |
987 | 989 | ||
988 | static void ipw_bg_led_activity_off(void *data) | 990 | static void ipw_bg_led_activity_off(struct work_struct *work) |
989 | { | 991 | { |
990 | struct ipw_priv *priv = data; | 992 | struct ipw_priv *priv = |
993 | container_of(work, struct ipw_priv, led_act_off.work); | ||
991 | mutex_lock(&priv->mutex); | 994 | mutex_lock(&priv->mutex); |
992 | ipw_led_activity_off(data); | 995 | ipw_led_activity_off(priv); |
993 | mutex_unlock(&priv->mutex); | 996 | mutex_unlock(&priv->mutex); |
994 | } | 997 | } |
995 | 998 | ||
@@ -2228,11 +2231,12 @@ static void ipw_adapter_restart(void *adapter) | |||
2228 | } | 2231 | } |
2229 | } | 2232 | } |
2230 | 2233 | ||
2231 | static void ipw_bg_adapter_restart(void *data) | 2234 | static void ipw_bg_adapter_restart(struct work_struct *work) |
2232 | { | 2235 | { |
2233 | struct ipw_priv *priv = data; | 2236 | struct ipw_priv *priv = |
2237 | container_of(work, struct ipw_priv, adapter_restart); | ||
2234 | mutex_lock(&priv->mutex); | 2238 | mutex_lock(&priv->mutex); |
2235 | ipw_adapter_restart(data); | 2239 | ipw_adapter_restart(priv); |
2236 | mutex_unlock(&priv->mutex); | 2240 | mutex_unlock(&priv->mutex); |
2237 | } | 2241 | } |
2238 | 2242 | ||
@@ -2249,11 +2253,12 @@ static void ipw_scan_check(void *data) | |||
2249 | } | 2253 | } |
2250 | } | 2254 | } |
2251 | 2255 | ||
2252 | static void ipw_bg_scan_check(void *data) | 2256 | static void ipw_bg_scan_check(struct work_struct *work) |
2253 | { | 2257 | { |
2254 | struct ipw_priv *priv = data; | 2258 | struct ipw_priv *priv = |
2259 | container_of(work, struct ipw_priv, scan_check.work); | ||
2255 | mutex_lock(&priv->mutex); | 2260 | mutex_lock(&priv->mutex); |
2256 | ipw_scan_check(data); | 2261 | ipw_scan_check(priv); |
2257 | mutex_unlock(&priv->mutex); | 2262 | mutex_unlock(&priv->mutex); |
2258 | } | 2263 | } |
2259 | 2264 | ||
@@ -3831,17 +3836,19 @@ static int ipw_disassociate(void *data) | |||
3831 | return 1; | 3836 | return 1; |
3832 | } | 3837 | } |
3833 | 3838 | ||
3834 | static void ipw_bg_disassociate(void *data) | 3839 | static void ipw_bg_disassociate(struct work_struct *work) |
3835 | { | 3840 | { |
3836 | struct ipw_priv *priv = data; | 3841 | struct ipw_priv *priv = |
3842 | container_of(work, struct ipw_priv, disassociate); | ||
3837 | mutex_lock(&priv->mutex); | 3843 | mutex_lock(&priv->mutex); |
3838 | ipw_disassociate(data); | 3844 | ipw_disassociate(priv); |
3839 | mutex_unlock(&priv->mutex); | 3845 | mutex_unlock(&priv->mutex); |
3840 | } | 3846 | } |
3841 | 3847 | ||
3842 | static void ipw_system_config(void *data) | 3848 | static void ipw_system_config(struct work_struct *work) |
3843 | { | 3849 | { |
3844 | struct ipw_priv *priv = data; | 3850 | struct ipw_priv *priv = |
3851 | container_of(work, struct ipw_priv, system_config); | ||
3845 | 3852 | ||
3846 | #ifdef CONFIG_IPW2200_PROMISCUOUS | 3853 | #ifdef CONFIG_IPW2200_PROMISCUOUS |
3847 | if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { | 3854 | if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { |
@@ -4208,11 +4215,12 @@ static void ipw_gather_stats(struct ipw_priv *priv) | |||
4208 | IPW_STATS_INTERVAL); | 4215 | IPW_STATS_INTERVAL); |
4209 | } | 4216 | } |
4210 | 4217 | ||
4211 | static void ipw_bg_gather_stats(void *data) | 4218 | static void ipw_bg_gather_stats(struct work_struct *work) |
4212 | { | 4219 | { |
4213 | struct ipw_priv *priv = data; | 4220 | struct ipw_priv *priv = |
4221 | container_of(work, struct ipw_priv, gather_stats.work); | ||
4214 | mutex_lock(&priv->mutex); | 4222 | mutex_lock(&priv->mutex); |
4215 | ipw_gather_stats(data); | 4223 | ipw_gather_stats(priv); |
4216 | mutex_unlock(&priv->mutex); | 4224 | mutex_unlock(&priv->mutex); |
4217 | } | 4225 | } |
4218 | 4226 | ||
@@ -4268,8 +4276,8 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv, | |||
4268 | if (!(priv->status & STATUS_ROAMING)) { | 4276 | if (!(priv->status & STATUS_ROAMING)) { |
4269 | priv->status |= STATUS_ROAMING; | 4277 | priv->status |= STATUS_ROAMING; |
4270 | if (!(priv->status & STATUS_SCANNING)) | 4278 | if (!(priv->status & STATUS_SCANNING)) |
4271 | queue_work(priv->workqueue, | 4279 | queue_delayed_work(priv->workqueue, |
4272 | &priv->request_scan); | 4280 | &priv->request_scan, 0); |
4273 | } | 4281 | } |
4274 | return; | 4282 | return; |
4275 | } | 4283 | } |
@@ -4607,8 +4615,8 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4607 | #ifdef CONFIG_IPW2200_MONITOR | 4615 | #ifdef CONFIG_IPW2200_MONITOR |
4608 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { | 4616 | if (priv->ieee->iw_mode == IW_MODE_MONITOR) { |
4609 | priv->status |= STATUS_SCAN_FORCED; | 4617 | priv->status |= STATUS_SCAN_FORCED; |
4610 | queue_work(priv->workqueue, | 4618 | queue_delayed_work(priv->workqueue, |
4611 | &priv->request_scan); | 4619 | &priv->request_scan, 0); |
4612 | break; | 4620 | break; |
4613 | } | 4621 | } |
4614 | priv->status &= ~STATUS_SCAN_FORCED; | 4622 | priv->status &= ~STATUS_SCAN_FORCED; |
@@ -4631,8 +4639,8 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4631 | /* Don't schedule if we aborted the scan */ | 4639 | /* Don't schedule if we aborted the scan */ |
4632 | priv->status &= ~STATUS_ROAMING; | 4640 | priv->status &= ~STATUS_ROAMING; |
4633 | } else if (priv->status & STATUS_SCAN_PENDING) | 4641 | } else if (priv->status & STATUS_SCAN_PENDING) |
4634 | queue_work(priv->workqueue, | 4642 | queue_delayed_work(priv->workqueue, |
4635 | &priv->request_scan); | 4643 | &priv->request_scan, 0); |
4636 | else if (priv->config & CFG_BACKGROUND_SCAN | 4644 | else if (priv->config & CFG_BACKGROUND_SCAN |
4637 | && priv->status & STATUS_ASSOCIATED) | 4645 | && priv->status & STATUS_ASSOCIATED) |
4638 | queue_delayed_work(priv->workqueue, | 4646 | queue_delayed_work(priv->workqueue, |
@@ -5055,11 +5063,12 @@ static void ipw_rx_queue_replenish(void *data) | |||
5055 | ipw_rx_queue_restock(priv); | 5063 | ipw_rx_queue_restock(priv); |
5056 | } | 5064 | } |
5057 | 5065 | ||
5058 | static void ipw_bg_rx_queue_replenish(void *data) | 5066 | static void ipw_bg_rx_queue_replenish(struct work_struct *work) |
5059 | { | 5067 | { |
5060 | struct ipw_priv *priv = data; | 5068 | struct ipw_priv *priv = |
5069 | container_of(work, struct ipw_priv, rx_replenish); | ||
5061 | mutex_lock(&priv->mutex); | 5070 | mutex_lock(&priv->mutex); |
5062 | ipw_rx_queue_replenish(data); | 5071 | ipw_rx_queue_replenish(priv); |
5063 | mutex_unlock(&priv->mutex); | 5072 | mutex_unlock(&priv->mutex); |
5064 | } | 5073 | } |
5065 | 5074 | ||
@@ -5489,9 +5498,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv, | |||
5489 | return 1; | 5498 | return 1; |
5490 | } | 5499 | } |
5491 | 5500 | ||
5492 | static void ipw_merge_adhoc_network(void *data) | 5501 | static void ipw_merge_adhoc_network(struct work_struct *work) |
5493 | { | 5502 | { |
5494 | struct ipw_priv *priv = data; | 5503 | struct ipw_priv *priv = |
5504 | container_of(work, struct ipw_priv, merge_networks); | ||
5495 | struct ieee80211_network *network = NULL; | 5505 | struct ieee80211_network *network = NULL; |
5496 | struct ipw_network_match match = { | 5506 | struct ipw_network_match match = { |
5497 | .network = priv->assoc_network | 5507 | .network = priv->assoc_network |
@@ -5948,11 +5958,12 @@ static void ipw_adhoc_check(void *data) | |||
5948 | priv->assoc_request.beacon_interval); | 5958 | priv->assoc_request.beacon_interval); |
5949 | } | 5959 | } |
5950 | 5960 | ||
5951 | static void ipw_bg_adhoc_check(void *data) | 5961 | static void ipw_bg_adhoc_check(struct work_struct *work) |
5952 | { | 5962 | { |
5953 | struct ipw_priv *priv = data; | 5963 | struct ipw_priv *priv = |
5964 | container_of(work, struct ipw_priv, adhoc_check.work); | ||
5954 | mutex_lock(&priv->mutex); | 5965 | mutex_lock(&priv->mutex); |
5955 | ipw_adhoc_check(data); | 5966 | ipw_adhoc_check(priv); |
5956 | mutex_unlock(&priv->mutex); | 5967 | mutex_unlock(&priv->mutex); |
5957 | } | 5968 | } |
5958 | 5969 | ||
@@ -6299,19 +6310,26 @@ done: | |||
6299 | return err; | 6310 | return err; |
6300 | } | 6311 | } |
6301 | 6312 | ||
6302 | static int ipw_request_passive_scan(struct ipw_priv *priv) { | 6313 | static void ipw_request_passive_scan(struct work_struct *work) |
6303 | return ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE); | 6314 | { |
6315 | struct ipw_priv *priv = | ||
6316 | container_of(work, struct ipw_priv, request_passive_scan); | ||
6317 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE); | ||
6304 | } | 6318 | } |
6305 | 6319 | ||
6306 | static int ipw_request_scan(struct ipw_priv *priv) { | 6320 | static void ipw_request_scan(struct work_struct *work) |
6307 | return ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE); | 6321 | { |
6322 | struct ipw_priv *priv = | ||
6323 | container_of(work, struct ipw_priv, request_scan.work); | ||
6324 | ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE); | ||
6308 | } | 6325 | } |
6309 | 6326 | ||
6310 | static void ipw_bg_abort_scan(void *data) | 6327 | static void ipw_bg_abort_scan(struct work_struct *work) |
6311 | { | 6328 | { |
6312 | struct ipw_priv *priv = data; | 6329 | struct ipw_priv *priv = |
6330 | container_of(work, struct ipw_priv, abort_scan); | ||
6313 | mutex_lock(&priv->mutex); | 6331 | mutex_lock(&priv->mutex); |
6314 | ipw_abort_scan(data); | 6332 | ipw_abort_scan(priv); |
6315 | mutex_unlock(&priv->mutex); | 6333 | mutex_unlock(&priv->mutex); |
6316 | } | 6334 | } |
6317 | 6335 | ||
@@ -7084,9 +7102,10 @@ static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv, | |||
7084 | /* | 7102 | /* |
7085 | * background support to run QoS activate functionality | 7103 | * background support to run QoS activate functionality |
7086 | */ | 7104 | */ |
7087 | static void ipw_bg_qos_activate(void *data) | 7105 | static void ipw_bg_qos_activate(struct work_struct *work) |
7088 | { | 7106 | { |
7089 | struct ipw_priv *priv = data; | 7107 | struct ipw_priv *priv = |
7108 | container_of(work, struct ipw_priv, qos_activate); | ||
7090 | 7109 | ||
7091 | if (priv == NULL) | 7110 | if (priv == NULL) |
7092 | return; | 7111 | return; |
@@ -7394,11 +7413,12 @@ static void ipw_roam(void *data) | |||
7394 | priv->status &= ~STATUS_ROAMING; | 7413 | priv->status &= ~STATUS_ROAMING; |
7395 | } | 7414 | } |
7396 | 7415 | ||
7397 | static void ipw_bg_roam(void *data) | 7416 | static void ipw_bg_roam(struct work_struct *work) |
7398 | { | 7417 | { |
7399 | struct ipw_priv *priv = data; | 7418 | struct ipw_priv *priv = |
7419 | container_of(work, struct ipw_priv, roam); | ||
7400 | mutex_lock(&priv->mutex); | 7420 | mutex_lock(&priv->mutex); |
7401 | ipw_roam(data); | 7421 | ipw_roam(priv); |
7402 | mutex_unlock(&priv->mutex); | 7422 | mutex_unlock(&priv->mutex); |
7403 | } | 7423 | } |
7404 | 7424 | ||
@@ -7479,8 +7499,8 @@ static int ipw_associate(void *data) | |||
7479 | &priv->request_scan, | 7499 | &priv->request_scan, |
7480 | SCAN_INTERVAL); | 7500 | SCAN_INTERVAL); |
7481 | else | 7501 | else |
7482 | queue_work(priv->workqueue, | 7502 | queue_delayed_work(priv->workqueue, |
7483 | &priv->request_scan); | 7503 | &priv->request_scan, 0); |
7484 | } | 7504 | } |
7485 | 7505 | ||
7486 | return 0; | 7506 | return 0; |
@@ -7491,11 +7511,12 @@ static int ipw_associate(void *data) | |||
7491 | return 1; | 7511 | return 1; |
7492 | } | 7512 | } |
7493 | 7513 | ||
7494 | static void ipw_bg_associate(void *data) | 7514 | static void ipw_bg_associate(struct work_struct *work) |
7495 | { | 7515 | { |
7496 | struct ipw_priv *priv = data; | 7516 | struct ipw_priv *priv = |
7517 | container_of(work, struct ipw_priv, associate); | ||
7497 | mutex_lock(&priv->mutex); | 7518 | mutex_lock(&priv->mutex); |
7498 | ipw_associate(data); | 7519 | ipw_associate(priv); |
7499 | mutex_unlock(&priv->mutex); | 7520 | mutex_unlock(&priv->mutex); |
7500 | } | 7521 | } |
7501 | 7522 | ||
@@ -9410,7 +9431,7 @@ static int ipw_wx_set_scan(struct net_device *dev, | |||
9410 | 9431 | ||
9411 | IPW_DEBUG_WX("Start scan\n"); | 9432 | IPW_DEBUG_WX("Start scan\n"); |
9412 | 9433 | ||
9413 | queue_work(priv->workqueue, &priv->request_scan); | 9434 | queue_delayed_work(priv->workqueue, &priv->request_scan, 0); |
9414 | 9435 | ||
9415 | return 0; | 9436 | return 0; |
9416 | } | 9437 | } |
@@ -10547,11 +10568,12 @@ static void ipw_rf_kill(void *adapter) | |||
10547 | spin_unlock_irqrestore(&priv->lock, flags); | 10568 | spin_unlock_irqrestore(&priv->lock, flags); |
10548 | } | 10569 | } |
10549 | 10570 | ||
10550 | static void ipw_bg_rf_kill(void *data) | 10571 | static void ipw_bg_rf_kill(struct work_struct *work) |
10551 | { | 10572 | { |
10552 | struct ipw_priv *priv = data; | 10573 | struct ipw_priv *priv = |
10574 | container_of(work, struct ipw_priv, rf_kill.work); | ||
10553 | mutex_lock(&priv->mutex); | 10575 | mutex_lock(&priv->mutex); |
10554 | ipw_rf_kill(data); | 10576 | ipw_rf_kill(priv); |
10555 | mutex_unlock(&priv->mutex); | 10577 | mutex_unlock(&priv->mutex); |
10556 | } | 10578 | } |
10557 | 10579 | ||
@@ -10582,11 +10604,12 @@ static void ipw_link_up(struct ipw_priv *priv) | |||
10582 | queue_delayed_work(priv->workqueue, &priv->request_scan, HZ); | 10604 | queue_delayed_work(priv->workqueue, &priv->request_scan, HZ); |
10583 | } | 10605 | } |
10584 | 10606 | ||
10585 | static void ipw_bg_link_up(void *data) | 10607 | static void ipw_bg_link_up(struct work_struct *work) |
10586 | { | 10608 | { |
10587 | struct ipw_priv *priv = data; | 10609 | struct ipw_priv *priv = |
10610 | container_of(work, struct ipw_priv, link_up); | ||
10588 | mutex_lock(&priv->mutex); | 10611 | mutex_lock(&priv->mutex); |
10589 | ipw_link_up(data); | 10612 | ipw_link_up(priv); |
10590 | mutex_unlock(&priv->mutex); | 10613 | mutex_unlock(&priv->mutex); |
10591 | } | 10614 | } |
10592 | 10615 | ||
@@ -10606,15 +10629,16 @@ static void ipw_link_down(struct ipw_priv *priv) | |||
10606 | 10629 | ||
10607 | if (!(priv->status & STATUS_EXIT_PENDING)) { | 10630 | if (!(priv->status & STATUS_EXIT_PENDING)) { |
10608 | /* Queue up another scan... */ | 10631 | /* Queue up another scan... */ |
10609 | queue_work(priv->workqueue, &priv->request_scan); | 10632 | queue_delayed_work(priv->workqueue, &priv->request_scan, 0); |
10610 | } | 10633 | } |
10611 | } | 10634 | } |
10612 | 10635 | ||
10613 | static void ipw_bg_link_down(void *data) | 10636 | static void ipw_bg_link_down(struct work_struct *work) |
10614 | { | 10637 | { |
10615 | struct ipw_priv *priv = data; | 10638 | struct ipw_priv *priv = |
10639 | container_of(work, struct ipw_priv, link_down); | ||
10616 | mutex_lock(&priv->mutex); | 10640 | mutex_lock(&priv->mutex); |
10617 | ipw_link_down(data); | 10641 | ipw_link_down(priv); |
10618 | mutex_unlock(&priv->mutex); | 10642 | mutex_unlock(&priv->mutex); |
10619 | } | 10643 | } |
10620 | 10644 | ||
@@ -10626,38 +10650,30 @@ static int ipw_setup_deferred_work(struct ipw_priv *priv) | |||
10626 | init_waitqueue_head(&priv->wait_command_queue); | 10650 | init_waitqueue_head(&priv->wait_command_queue); |
10627 | init_waitqueue_head(&priv->wait_state); | 10651 | init_waitqueue_head(&priv->wait_state); |
10628 | 10652 | ||
10629 | INIT_WORK(&priv->adhoc_check, ipw_bg_adhoc_check, priv); | 10653 | INIT_DELAYED_WORK(&priv->adhoc_check, ipw_bg_adhoc_check); |
10630 | INIT_WORK(&priv->associate, ipw_bg_associate, priv); | 10654 | INIT_WORK(&priv->associate, ipw_bg_associate); |
10631 | INIT_WORK(&priv->disassociate, ipw_bg_disassociate, priv); | 10655 | INIT_WORK(&priv->disassociate, ipw_bg_disassociate); |
10632 | INIT_WORK(&priv->system_config, ipw_system_config, priv); | 10656 | INIT_WORK(&priv->system_config, ipw_system_config); |
10633 | INIT_WORK(&priv->rx_replenish, ipw_bg_rx_queue_replenish, priv); | 10657 | INIT_WORK(&priv->rx_replenish, ipw_bg_rx_queue_replenish); |
10634 | INIT_WORK(&priv->adapter_restart, ipw_bg_adapter_restart, priv); | 10658 | INIT_WORK(&priv->adapter_restart, ipw_bg_adapter_restart); |
10635 | INIT_WORK(&priv->rf_kill, ipw_bg_rf_kill, priv); | 10659 | INIT_DELAYED_WORK(&priv->rf_kill, ipw_bg_rf_kill); |
10636 | INIT_WORK(&priv->up, (void (*)(void *))ipw_bg_up, priv); | 10660 | INIT_WORK(&priv->up, ipw_bg_up); |
10637 | INIT_WORK(&priv->down, (void (*)(void *))ipw_bg_down, priv); | 10661 | INIT_WORK(&priv->down, ipw_bg_down); |
10638 | INIT_WORK(&priv->request_scan, | 10662 | INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); |
10639 | (void (*)(void *))ipw_request_scan, priv); | 10663 | INIT_WORK(&priv->request_passive_scan, ipw_request_passive_scan); |
10640 | INIT_WORK(&priv->request_passive_scan, | 10664 | INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); |
10641 | (void (*)(void *))ipw_request_passive_scan, priv); | 10665 | INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); |
10642 | INIT_WORK(&priv->gather_stats, | 10666 | INIT_WORK(&priv->roam, ipw_bg_roam); |
10643 | (void (*)(void *))ipw_bg_gather_stats, priv); | 10667 | INIT_DELAYED_WORK(&priv->scan_check, ipw_bg_scan_check); |
10644 | INIT_WORK(&priv->abort_scan, (void (*)(void *))ipw_bg_abort_scan, priv); | 10668 | INIT_WORK(&priv->link_up, ipw_bg_link_up); |
10645 | INIT_WORK(&priv->roam, ipw_bg_roam, priv); | 10669 | INIT_WORK(&priv->link_down, ipw_bg_link_down); |
10646 | INIT_WORK(&priv->scan_check, ipw_bg_scan_check, priv); | 10670 | INIT_DELAYED_WORK(&priv->led_link_on, ipw_bg_led_link_on); |
10647 | INIT_WORK(&priv->link_up, (void (*)(void *))ipw_bg_link_up, priv); | 10671 | INIT_DELAYED_WORK(&priv->led_link_off, ipw_bg_led_link_off); |
10648 | INIT_WORK(&priv->link_down, (void (*)(void *))ipw_bg_link_down, priv); | 10672 | INIT_DELAYED_WORK(&priv->led_act_off, ipw_bg_led_activity_off); |
10649 | INIT_WORK(&priv->led_link_on, (void (*)(void *))ipw_bg_led_link_on, | 10673 | INIT_WORK(&priv->merge_networks, ipw_merge_adhoc_network); |
10650 | priv); | ||
10651 | INIT_WORK(&priv->led_link_off, (void (*)(void *))ipw_bg_led_link_off, | ||
10652 | priv); | ||
10653 | INIT_WORK(&priv->led_act_off, (void (*)(void *))ipw_bg_led_activity_off, | ||
10654 | priv); | ||
10655 | INIT_WORK(&priv->merge_networks, | ||
10656 | (void (*)(void *))ipw_merge_adhoc_network, priv); | ||
10657 | 10674 | ||
10658 | #ifdef CONFIG_IPW2200_QOS | 10675 | #ifdef CONFIG_IPW2200_QOS |
10659 | INIT_WORK(&priv->qos_activate, (void (*)(void *))ipw_bg_qos_activate, | 10676 | INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); |
10660 | priv); | ||
10661 | #endif /* CONFIG_IPW2200_QOS */ | 10677 | #endif /* CONFIG_IPW2200_QOS */ |
10662 | 10678 | ||
10663 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 10679 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
@@ -11190,7 +11206,8 @@ static int ipw_up(struct ipw_priv *priv) | |||
11190 | 11206 | ||
11191 | /* If configure to try and auto-associate, kick | 11207 | /* If configure to try and auto-associate, kick |
11192 | * off a scan. */ | 11208 | * off a scan. */ |
11193 | queue_work(priv->workqueue, &priv->request_scan); | 11209 | queue_delayed_work(priv->workqueue, |
11210 | &priv->request_scan, 0); | ||
11194 | 11211 | ||
11195 | return 0; | 11212 | return 0; |
11196 | } | 11213 | } |
@@ -11211,11 +11228,12 @@ static int ipw_up(struct ipw_priv *priv) | |||
11211 | return -EIO; | 11228 | return -EIO; |
11212 | } | 11229 | } |
11213 | 11230 | ||
11214 | static void ipw_bg_up(void *data) | 11231 | static void ipw_bg_up(struct work_struct *work) |
11215 | { | 11232 | { |
11216 | struct ipw_priv *priv = data; | 11233 | struct ipw_priv *priv = |
11234 | container_of(work, struct ipw_priv, up); | ||
11217 | mutex_lock(&priv->mutex); | 11235 | mutex_lock(&priv->mutex); |
11218 | ipw_up(data); | 11236 | ipw_up(priv); |
11219 | mutex_unlock(&priv->mutex); | 11237 | mutex_unlock(&priv->mutex); |
11220 | } | 11238 | } |
11221 | 11239 | ||
@@ -11282,11 +11300,12 @@ static void ipw_down(struct ipw_priv *priv) | |||
11282 | ipw_led_radio_off(priv); | 11300 | ipw_led_radio_off(priv); |
11283 | } | 11301 | } |
11284 | 11302 | ||
11285 | static void ipw_bg_down(void *data) | 11303 | static void ipw_bg_down(struct work_struct *work) |
11286 | { | 11304 | { |
11287 | struct ipw_priv *priv = data; | 11305 | struct ipw_priv *priv = |
11306 | container_of(work, struct ipw_priv, down); | ||
11288 | mutex_lock(&priv->mutex); | 11307 | mutex_lock(&priv->mutex); |
11289 | ipw_down(data); | 11308 | ipw_down(priv); |
11290 | mutex_unlock(&priv->mutex); | 11309 | mutex_unlock(&priv->mutex); |
11291 | } | 11310 | } |
11292 | 11311 | ||
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index dad5eedefbf1..626a240a87d8 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -1290,21 +1290,21 @@ struct ipw_priv { | |||
1290 | 1290 | ||
1291 | struct workqueue_struct *workqueue; | 1291 | struct workqueue_struct *workqueue; |
1292 | 1292 | ||
1293 | struct work_struct adhoc_check; | 1293 | struct delayed_work adhoc_check; |
1294 | struct work_struct associate; | 1294 | struct work_struct associate; |
1295 | struct work_struct disassociate; | 1295 | struct work_struct disassociate; |
1296 | struct work_struct system_config; | 1296 | struct work_struct system_config; |
1297 | struct work_struct rx_replenish; | 1297 | struct work_struct rx_replenish; |
1298 | struct work_struct request_scan; | 1298 | struct delayed_work request_scan; |
1299 | struct work_struct request_passive_scan; | 1299 | struct work_struct request_passive_scan; |
1300 | struct work_struct adapter_restart; | 1300 | struct work_struct adapter_restart; |
1301 | struct work_struct rf_kill; | 1301 | struct delayed_work rf_kill; |
1302 | struct work_struct up; | 1302 | struct work_struct up; |
1303 | struct work_struct down; | 1303 | struct work_struct down; |
1304 | struct work_struct gather_stats; | 1304 | struct delayed_work gather_stats; |
1305 | struct work_struct abort_scan; | 1305 | struct work_struct abort_scan; |
1306 | struct work_struct roam; | 1306 | struct work_struct roam; |
1307 | struct work_struct scan_check; | 1307 | struct delayed_work scan_check; |
1308 | struct work_struct link_up; | 1308 | struct work_struct link_up; |
1309 | struct work_struct link_down; | 1309 | struct work_struct link_down; |
1310 | 1310 | ||
@@ -1319,9 +1319,9 @@ struct ipw_priv { | |||
1319 | u32 led_ofdm_on; | 1319 | u32 led_ofdm_on; |
1320 | u32 led_ofdm_off; | 1320 | u32 led_ofdm_off; |
1321 | 1321 | ||
1322 | struct work_struct led_link_on; | 1322 | struct delayed_work led_link_on; |
1323 | struct work_struct led_link_off; | 1323 | struct delayed_work led_link_off; |
1324 | struct work_struct led_act_off; | 1324 | struct delayed_work led_act_off; |
1325 | struct work_struct merge_networks; | 1325 | struct work_struct merge_networks; |
1326 | 1326 | ||
1327 | struct ipw_cmd_log *cmdlog; | 1327 | struct ipw_cmd_log *cmdlog; |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 6714e0dfa8d6..644b4741ef74 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -735,10 +735,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
735 | static int netwave_pcmcia_config(struct pcmcia_device *link) { | 735 | static int netwave_pcmcia_config(struct pcmcia_device *link) { |
736 | struct net_device *dev = link->priv; | 736 | struct net_device *dev = link->priv; |
737 | netwave_private *priv = netdev_priv(dev); | 737 | netwave_private *priv = netdev_priv(dev); |
738 | tuple_t tuple; | ||
739 | cisparse_t parse; | ||
740 | int i, j, last_ret, last_fn; | 738 | int i, j, last_ret, last_fn; |
741 | u_char buf[64]; | ||
742 | win_req_t req; | 739 | win_req_t req; |
743 | memreq_t mem; | 740 | memreq_t mem; |
744 | u_char __iomem *ramBase = NULL; | 741 | u_char __iomem *ramBase = NULL; |
@@ -746,21 +743,6 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) { | |||
746 | DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); | 743 | DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); |
747 | 744 | ||
748 | /* | 745 | /* |
749 | This reads the card's CONFIG tuple to find its configuration | ||
750 | registers. | ||
751 | */ | ||
752 | tuple.Attributes = 0; | ||
753 | tuple.TupleData = (cisdata_t *) buf; | ||
754 | tuple.TupleDataMax = 64; | ||
755 | tuple.TupleOffset = 0; | ||
756 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
757 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
758 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
759 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
760 | link->conf.ConfigBase = parse.config.base; | ||
761 | link->conf.Present = parse.config.rmask[0]; | ||
762 | |||
763 | /* | ||
764 | * Try allocating IO ports. This tries a few fixed addresses. | 746 | * Try allocating IO ports. This tries a few fixed addresses. |
765 | * If you want, you can also read the card's config table to | 747 | * If you want, you can also read the card's config table to |
766 | * pick addresses -- see the serial driver for an example. | 748 | * pick addresses -- see the serial driver for an example. |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 336cabac13b3..936c888e03e1 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -980,9 +980,11 @@ static void print_linkstatus(struct net_device *dev, u16 status) | |||
980 | } | 980 | } |
981 | 981 | ||
982 | /* Search scan results for requested BSSID, join it if found */ | 982 | /* Search scan results for requested BSSID, join it if found */ |
983 | static void orinoco_join_ap(struct net_device *dev) | 983 | static void orinoco_join_ap(struct work_struct *work) |
984 | { | 984 | { |
985 | struct orinoco_private *priv = netdev_priv(dev); | 985 | struct orinoco_private *priv = |
986 | container_of(work, struct orinoco_private, join_work); | ||
987 | struct net_device *dev = priv->ndev; | ||
986 | struct hermes *hw = &priv->hw; | 988 | struct hermes *hw = &priv->hw; |
987 | int err; | 989 | int err; |
988 | unsigned long flags; | 990 | unsigned long flags; |
@@ -1055,9 +1057,11 @@ static void orinoco_join_ap(struct net_device *dev) | |||
1055 | } | 1057 | } |
1056 | 1058 | ||
1057 | /* Send new BSSID to userspace */ | 1059 | /* Send new BSSID to userspace */ |
1058 | static void orinoco_send_wevents(struct net_device *dev) | 1060 | static void orinoco_send_wevents(struct work_struct *work) |
1059 | { | 1061 | { |
1060 | struct orinoco_private *priv = netdev_priv(dev); | 1062 | struct orinoco_private *priv = |
1063 | container_of(work, struct orinoco_private, wevent_work); | ||
1064 | struct net_device *dev = priv->ndev; | ||
1061 | struct hermes *hw = &priv->hw; | 1065 | struct hermes *hw = &priv->hw; |
1062 | union iwreq_data wrqu; | 1066 | union iwreq_data wrqu; |
1063 | int err; | 1067 | int err; |
@@ -1864,9 +1868,11 @@ __orinoco_set_multicast_list(struct net_device *dev) | |||
1864 | 1868 | ||
1865 | /* This must be called from user context, without locks held - use | 1869 | /* This must be called from user context, without locks held - use |
1866 | * schedule_work() */ | 1870 | * schedule_work() */ |
1867 | static void orinoco_reset(struct net_device *dev) | 1871 | static void orinoco_reset(struct work_struct *work) |
1868 | { | 1872 | { |
1869 | struct orinoco_private *priv = netdev_priv(dev); | 1873 | struct orinoco_private *priv = |
1874 | container_of(work, struct orinoco_private, reset_work); | ||
1875 | struct net_device *dev = priv->ndev; | ||
1870 | struct hermes *hw = &priv->hw; | 1876 | struct hermes *hw = &priv->hw; |
1871 | int err; | 1877 | int err; |
1872 | unsigned long flags; | 1878 | unsigned long flags; |
@@ -2434,9 +2440,9 @@ struct net_device *alloc_orinocodev(int sizeof_card, | |||
2434 | priv->hw_unavailable = 1; /* orinoco_init() must clear this | 2440 | priv->hw_unavailable = 1; /* orinoco_init() must clear this |
2435 | * before anything else touches the | 2441 | * before anything else touches the |
2436 | * hardware */ | 2442 | * hardware */ |
2437 | INIT_WORK(&priv->reset_work, (void (*)(void *))orinoco_reset, dev); | 2443 | INIT_WORK(&priv->reset_work, orinoco_reset); |
2438 | INIT_WORK(&priv->join_work, (void (*)(void *))orinoco_join_ap, dev); | 2444 | INIT_WORK(&priv->join_work, orinoco_join_ap); |
2439 | INIT_WORK(&priv->wevent_work, (void (*)(void *))orinoco_send_wevents, dev); | 2445 | INIT_WORK(&priv->wevent_work, orinoco_send_wevents); |
2440 | 2446 | ||
2441 | netif_carrier_off(dev); | 2447 | netif_carrier_off(dev); |
2442 | priv->last_linkstatus = 0xffff; | 2448 | priv->last_linkstatus = 0xffff; |
@@ -3608,7 +3614,7 @@ static int orinoco_ioctl_reset(struct net_device *dev, | |||
3608 | printk(KERN_DEBUG "%s: Forcing reset!\n", dev->name); | 3614 | printk(KERN_DEBUG "%s: Forcing reset!\n", dev->name); |
3609 | 3615 | ||
3610 | /* Firmware reset */ | 3616 | /* Firmware reset */ |
3611 | orinoco_reset(dev); | 3617 | orinoco_reset(&priv->reset_work); |
3612 | } else { | 3618 | } else { |
3613 | printk(KERN_DEBUG "%s: Force scheduling reset!\n", dev->name); | 3619 | printk(KERN_DEBUG "%s: Force scheduling reset!\n", dev->name); |
3614 | 3620 | ||
@@ -4154,7 +4160,7 @@ static int orinoco_ioctl_commit(struct net_device *dev, | |||
4154 | return 0; | 4160 | return 0; |
4155 | 4161 | ||
4156 | if (priv->broken_disableport) { | 4162 | if (priv->broken_disableport) { |
4157 | orinoco_reset(dev); | 4163 | orinoco_reset(&priv->reset_work); |
4158 | return 0; | 4164 | return 0; |
4159 | } | 4165 | } |
4160 | 4166 | ||
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index bc14689cbf24..d08ae8d2726c 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -178,21 +178,6 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
178 | cisparse_t parse; | 178 | cisparse_t parse; |
179 | void __iomem *mem; | 179 | void __iomem *mem; |
180 | 180 | ||
181 | /* | ||
182 | * This reads the card's CONFIG tuple to find its | ||
183 | * configuration registers. | ||
184 | */ | ||
185 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
186 | tuple.Attributes = 0; | ||
187 | tuple.TupleData = buf; | ||
188 | tuple.TupleDataMax = sizeof(buf); | ||
189 | tuple.TupleOffset = 0; | ||
190 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
191 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
192 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
193 | link->conf.ConfigBase = parse.config.base; | ||
194 | link->conf.Present = parse.config.rmask[0]; | ||
195 | |||
196 | /* Look up the current Vcc */ | 181 | /* Look up the current Vcc */ |
197 | CS_CHECK(GetConfigurationInfo, | 182 | CS_CHECK(GetConfigurationInfo, |
198 | pcmcia_get_configuration_info(link, &conf)); | 183 | pcmcia_get_configuration_info(link, &conf)); |
@@ -211,6 +196,10 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
211 | * and most client drivers will only use the CIS to fill in | 196 | * and most client drivers will only use the CIS to fill in |
212 | * implementation-defined details. | 197 | * implementation-defined details. |
213 | */ | 198 | */ |
199 | tuple.Attributes = 0; | ||
200 | tuple.TupleData = buf; | ||
201 | tuple.TupleDataMax = sizeof(buf); | ||
202 | tuple.TupleOffset = 0; | ||
214 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 203 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
215 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 204 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
216 | while (1) { | 205 | while (1) { |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 4a20e45de3ca..a87eb51886c8 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -157,8 +157,9 @@ prism54_mib_init(islpci_private *priv) | |||
157 | * schedule_work(), thus we can as well use sleeping semaphore | 157 | * schedule_work(), thus we can as well use sleeping semaphore |
158 | * locking */ | 158 | * locking */ |
159 | void | 159 | void |
160 | prism54_update_stats(islpci_private *priv) | 160 | prism54_update_stats(struct work_struct *work) |
161 | { | 161 | { |
162 | islpci_private *priv = container_of(work, islpci_private, stats_work); | ||
162 | char *data; | 163 | char *data; |
163 | int j; | 164 | int j; |
164 | struct obj_bss bss, *bss2; | 165 | struct obj_bss bss, *bss2; |
@@ -2493,9 +2494,10 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, | |||
2493 | * interrupt context, no locks held. | 2494 | * interrupt context, no locks held. |
2494 | */ | 2495 | */ |
2495 | void | 2496 | void |
2496 | prism54_process_trap(void *data) | 2497 | prism54_process_trap(struct work_struct *work) |
2497 | { | 2498 | { |
2498 | struct islpci_mgmtframe *frame = data; | 2499 | struct islpci_mgmtframe *frame = |
2500 | container_of(work, struct islpci_mgmtframe, ws); | ||
2499 | struct net_device *ndev = frame->ndev; | 2501 | struct net_device *ndev = frame->ndev; |
2500 | enum oid_num_t n = mgt_oidtonum(frame->header->oid); | 2502 | enum oid_num_t n = mgt_oidtonum(frame->header->oid); |
2501 | 2503 | ||
diff --git a/drivers/net/wireless/prism54/isl_ioctl.h b/drivers/net/wireless/prism54/isl_ioctl.h index e8183d30c52e..bcfbfb9281d2 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.h +++ b/drivers/net/wireless/prism54/isl_ioctl.h | |||
@@ -31,12 +31,12 @@ | |||
31 | void prism54_mib_init(islpci_private *); | 31 | void prism54_mib_init(islpci_private *); |
32 | 32 | ||
33 | struct iw_statistics *prism54_get_wireless_stats(struct net_device *); | 33 | struct iw_statistics *prism54_get_wireless_stats(struct net_device *); |
34 | void prism54_update_stats(islpci_private *); | 34 | void prism54_update_stats(struct work_struct *); |
35 | 35 | ||
36 | void prism54_acl_init(struct islpci_acl *); | 36 | void prism54_acl_init(struct islpci_acl *); |
37 | void prism54_acl_clean(struct islpci_acl *); | 37 | void prism54_acl_clean(struct islpci_acl *); |
38 | 38 | ||
39 | void prism54_process_trap(void *); | 39 | void prism54_process_trap(struct work_struct *); |
40 | 40 | ||
41 | void prism54_wpa_bss_ie_init(islpci_private *priv); | 41 | void prism54_wpa_bss_ie_init(islpci_private *priv); |
42 | void prism54_wpa_bss_ie_clean(islpci_private *priv); | 42 | void prism54_wpa_bss_ie_clean(islpci_private *priv); |
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 1e0603ca436c..f057fd9fcd79 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -860,11 +860,10 @@ islpci_setup(struct pci_dev *pdev) | |||
860 | priv->state_off = 1; | 860 | priv->state_off = 1; |
861 | 861 | ||
862 | /* initialize workqueue's */ | 862 | /* initialize workqueue's */ |
863 | INIT_WORK(&priv->stats_work, | 863 | INIT_WORK(&priv->stats_work, prism54_update_stats); |
864 | (void (*)(void *)) prism54_update_stats, priv); | ||
865 | priv->stats_timestamp = 0; | 864 | priv->stats_timestamp = 0; |
866 | 865 | ||
867 | INIT_WORK(&priv->reset_task, islpci_do_reset_and_wake, priv); | 866 | INIT_WORK(&priv->reset_task, islpci_do_reset_and_wake); |
868 | priv->reset_task_pending = 0; | 867 | priv->reset_task_pending = 0; |
869 | 868 | ||
870 | /* allocate various memory areas */ | 869 | /* allocate various memory areas */ |
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 676d83813dc8..b1122912ee2d 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -480,9 +480,9 @@ islpci_eth_receive(islpci_private *priv) | |||
480 | } | 480 | } |
481 | 481 | ||
482 | void | 482 | void |
483 | islpci_do_reset_and_wake(void *data) | 483 | islpci_do_reset_and_wake(struct work_struct *work) |
484 | { | 484 | { |
485 | islpci_private *priv = data; | 485 | islpci_private *priv = container_of(work, islpci_private, reset_task); |
486 | 486 | ||
487 | islpci_reset(priv, 1); | 487 | islpci_reset(priv, 1); |
488 | priv->reset_task_pending = 0; | 488 | priv->reset_task_pending = 0; |
diff --git a/drivers/net/wireless/prism54/islpci_eth.h b/drivers/net/wireless/prism54/islpci_eth.h index 26789454067c..5bf820defbd0 100644 --- a/drivers/net/wireless/prism54/islpci_eth.h +++ b/drivers/net/wireless/prism54/islpci_eth.h | |||
@@ -67,6 +67,6 @@ void islpci_eth_cleanup_transmit(islpci_private *, isl38xx_control_block *); | |||
67 | int islpci_eth_transmit(struct sk_buff *, struct net_device *); | 67 | int islpci_eth_transmit(struct sk_buff *, struct net_device *); |
68 | int islpci_eth_receive(islpci_private *); | 68 | int islpci_eth_receive(islpci_private *); |
69 | void islpci_eth_tx_timeout(struct net_device *); | 69 | void islpci_eth_tx_timeout(struct net_device *); |
70 | void islpci_do_reset_and_wake(void *data); | 70 | void islpci_do_reset_and_wake(struct work_struct *); |
71 | 71 | ||
72 | #endif /* _ISL_GEN_H */ | 72 | #endif /* _ISL_GEN_H */ |
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 036a875054c9..2246f7930b4e 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -386,7 +386,7 @@ islpci_mgt_receive(struct net_device *ndev) | |||
386 | 386 | ||
387 | /* Create work to handle trap out of interrupt | 387 | /* Create work to handle trap out of interrupt |
388 | * context. */ | 388 | * context. */ |
389 | INIT_WORK(&frame->ws, prism54_process_trap, frame); | 389 | INIT_WORK(&frame->ws, prism54_process_trap); |
390 | schedule_work(&frame->ws); | 390 | schedule_work(&frame->ws); |
391 | 391 | ||
392 | } else { | 392 | } else { |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 7fbfc9e41d07..88e10c9bc4ac 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -408,11 +408,8 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
408 | #define MAX_TUPLE_SIZE 128 | 408 | #define MAX_TUPLE_SIZE 128 |
409 | static int ray_config(struct pcmcia_device *link) | 409 | static int ray_config(struct pcmcia_device *link) |
410 | { | 410 | { |
411 | tuple_t tuple; | ||
412 | cisparse_t parse; | ||
413 | int last_fn = 0, last_ret = 0; | 411 | int last_fn = 0, last_ret = 0; |
414 | int i; | 412 | int i; |
415 | u_char buf[MAX_TUPLE_SIZE]; | ||
416 | win_req_t req; | 413 | win_req_t req; |
417 | memreq_t mem; | 414 | memreq_t mem; |
418 | struct net_device *dev = (struct net_device *)link->priv; | 415 | struct net_device *dev = (struct net_device *)link->priv; |
@@ -420,29 +417,12 @@ static int ray_config(struct pcmcia_device *link) | |||
420 | 417 | ||
421 | DEBUG(1, "ray_config(0x%p)\n", link); | 418 | DEBUG(1, "ray_config(0x%p)\n", link); |
422 | 419 | ||
423 | /* This reads the card's CONFIG tuple to find its configuration regs */ | ||
424 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
425 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
426 | tuple.TupleData = buf; | ||
427 | tuple.TupleDataMax = MAX_TUPLE_SIZE; | ||
428 | tuple.TupleOffset = 0; | ||
429 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
430 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
431 | link->conf.ConfigBase = parse.config.base; | ||
432 | link->conf.Present = parse.config.rmask[0]; | ||
433 | |||
434 | /* Determine card type and firmware version */ | 420 | /* Determine card type and firmware version */ |
435 | buf[0] = buf[MAX_TUPLE_SIZE - 1] = 0; | 421 | printk(KERN_INFO "ray_cs Detected: %s%s%s%s\n", |
436 | tuple.DesiredTuple = CISTPL_VERS_1; | 422 | link->prod_id[0] ? link->prod_id[0] : " ", |
437 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 423 | link->prod_id[1] ? link->prod_id[1] : " ", |
438 | tuple.TupleData = buf; | 424 | link->prod_id[2] ? link->prod_id[2] : " ", |
439 | tuple.TupleDataMax = MAX_TUPLE_SIZE; | 425 | link->prod_id[3] ? link->prod_id[3] : " "); |
440 | tuple.TupleOffset = 2; | ||
441 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
442 | |||
443 | for (i=0; i<tuple.TupleDataLen - 4; i++) | ||
444 | if (buf[i] == 0) buf[i] = ' '; | ||
445 | printk(KERN_INFO "ray_cs Detected: %s\n",buf); | ||
446 | 426 | ||
447 | /* Now allocate an interrupt line. Note that this does not | 427 | /* Now allocate an interrupt line. Note that this does not |
448 | actually assign a handler to the interrupt. | 428 | actually assign a handler to the interrupt. |
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c index bcc7038130f6..cf2d1486b01d 100644 --- a/drivers/net/wireless/spectrum_cs.c +++ b/drivers/net/wireless/spectrum_cs.c | |||
@@ -647,21 +647,6 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
647 | cisparse_t parse; | 647 | cisparse_t parse; |
648 | void __iomem *mem; | 648 | void __iomem *mem; |
649 | 649 | ||
650 | /* | ||
651 | * This reads the card's CONFIG tuple to find its | ||
652 | * configuration registers. | ||
653 | */ | ||
654 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
655 | tuple.Attributes = 0; | ||
656 | tuple.TupleData = buf; | ||
657 | tuple.TupleDataMax = sizeof(buf); | ||
658 | tuple.TupleOffset = 0; | ||
659 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
660 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
661 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
662 | link->conf.ConfigBase = parse.config.base; | ||
663 | link->conf.Present = parse.config.rmask[0]; | ||
664 | |||
665 | /* Look up the current Vcc */ | 650 | /* Look up the current Vcc */ |
666 | CS_CHECK(GetConfigurationInfo, | 651 | CS_CHECK(GetConfigurationInfo, |
667 | pcmcia_get_configuration_info(link, &conf)); | 652 | pcmcia_get_configuration_info(link, &conf)); |
@@ -681,6 +666,10 @@ spectrum_cs_config(struct pcmcia_device *link) | |||
681 | * implementation-defined details. | 666 | * implementation-defined details. |
682 | */ | 667 | */ |
683 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; | 668 | tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; |
669 | tuple.Attributes = 0; | ||
670 | tuple.TupleData = buf; | ||
671 | tuple.TupleDataMax = sizeof(buf); | ||
672 | tuple.TupleOffset = 0; | ||
684 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | 673 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); |
685 | while (1) { | 674 | while (1) { |
686 | cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); | 675 | cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index aafb301041b1..233d906c08f0 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -3939,11 +3939,8 @@ wv_hw_reset(struct net_device * dev) | |||
3939 | static inline int | 3939 | static inline int |
3940 | wv_pcmcia_config(struct pcmcia_device * link) | 3940 | wv_pcmcia_config(struct pcmcia_device * link) |
3941 | { | 3941 | { |
3942 | tuple_t tuple; | ||
3943 | cisparse_t parse; | ||
3944 | struct net_device * dev = (struct net_device *) link->priv; | 3942 | struct net_device * dev = (struct net_device *) link->priv; |
3945 | int i; | 3943 | int i; |
3946 | u_char buf[64]; | ||
3947 | win_req_t req; | 3944 | win_req_t req; |
3948 | memreq_t mem; | 3945 | memreq_t mem; |
3949 | net_local * lp = netdev_priv(dev); | 3946 | net_local * lp = netdev_priv(dev); |
@@ -3953,36 +3950,6 @@ wv_pcmcia_config(struct pcmcia_device * link) | |||
3953 | printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link); | 3950 | printk(KERN_DEBUG "->wv_pcmcia_config(0x%p)\n", link); |
3954 | #endif | 3951 | #endif |
3955 | 3952 | ||
3956 | /* | ||
3957 | * This reads the card's CONFIG tuple to find its configuration | ||
3958 | * registers. | ||
3959 | */ | ||
3960 | do | ||
3961 | { | ||
3962 | tuple.Attributes = 0; | ||
3963 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
3964 | i = pcmcia_get_first_tuple(link, &tuple); | ||
3965 | if(i != CS_SUCCESS) | ||
3966 | break; | ||
3967 | tuple.TupleData = (cisdata_t *)buf; | ||
3968 | tuple.TupleDataMax = 64; | ||
3969 | tuple.TupleOffset = 0; | ||
3970 | i = pcmcia_get_tuple_data(link, &tuple); | ||
3971 | if(i != CS_SUCCESS) | ||
3972 | break; | ||
3973 | i = pcmcia_parse_tuple(link, &tuple, &parse); | ||
3974 | if(i != CS_SUCCESS) | ||
3975 | break; | ||
3976 | link->conf.ConfigBase = parse.config.base; | ||
3977 | link->conf.Present = parse.config.rmask[0]; | ||
3978 | } | ||
3979 | while(0); | ||
3980 | if(i != CS_SUCCESS) | ||
3981 | { | ||
3982 | cs_error(link, ParseTuple, i); | ||
3983 | return FALSE; | ||
3984 | } | ||
3985 | |||
3986 | do | 3953 | do |
3987 | { | 3954 | { |
3988 | i = pcmcia_request_io(link, &link->io); | 3955 | i = pcmcia_request_io(link, &link->io); |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index 5b98a7876982..583e0d655a98 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1966,25 +1966,10 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
1966 | */ | 1966 | */ |
1967 | static int wl3501_config(struct pcmcia_device *link) | 1967 | static int wl3501_config(struct pcmcia_device *link) |
1968 | { | 1968 | { |
1969 | tuple_t tuple; | ||
1970 | cisparse_t parse; | ||
1971 | struct net_device *dev = link->priv; | 1969 | struct net_device *dev = link->priv; |
1972 | int i = 0, j, last_fn, last_ret; | 1970 | int i = 0, j, last_fn, last_ret; |
1973 | unsigned char bf[64]; | ||
1974 | struct wl3501_card *this; | 1971 | struct wl3501_card *this; |
1975 | 1972 | ||
1976 | /* This reads the card's CONFIG tuple to find its config registers. */ | ||
1977 | tuple.Attributes = 0; | ||
1978 | tuple.DesiredTuple = CISTPL_CONFIG; | ||
1979 | CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); | ||
1980 | tuple.TupleData = bf; | ||
1981 | tuple.TupleDataMax = sizeof(bf); | ||
1982 | tuple.TupleOffset = 0; | ||
1983 | CS_CHECK(GetTupleData, pcmcia_get_tuple_data(link, &tuple)); | ||
1984 | CS_CHECK(ParseTuple, pcmcia_parse_tuple(link, &tuple, &parse)); | ||
1985 | link->conf.ConfigBase = parse.config.base; | ||
1986 | link->conf.Present = parse.config.rmask[0]; | ||
1987 | |||
1988 | /* Try allocating IO ports. This tries a few fixed addresses. If you | 1973 | /* Try allocating IO ports. This tries a few fixed addresses. If you |
1989 | * want, you can also read the card's config table to pick addresses -- | 1974 | * want, you can also read the card's config table to pick addresses -- |
1990 | * see the serial driver for an example. */ | 1975 | * see the serial driver for an example. */ |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 2696f95b9278..f1573a9c2336 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -32,8 +32,8 @@ | |||
32 | 32 | ||
33 | static void ieee_init(struct ieee80211_device *ieee); | 33 | static void ieee_init(struct ieee80211_device *ieee); |
34 | static void softmac_init(struct ieee80211softmac_device *sm); | 34 | static void softmac_init(struct ieee80211softmac_device *sm); |
35 | static void set_rts_cts_work(void *d); | 35 | static void set_rts_cts_work(struct work_struct *work); |
36 | static void set_basic_rates_work(void *d); | 36 | static void set_basic_rates_work(struct work_struct *work); |
37 | 37 | ||
38 | static void housekeeping_init(struct zd_mac *mac); | 38 | static void housekeeping_init(struct zd_mac *mac); |
39 | static void housekeeping_enable(struct zd_mac *mac); | 39 | static void housekeeping_enable(struct zd_mac *mac); |
@@ -48,8 +48,8 @@ int zd_mac_init(struct zd_mac *mac, | |||
48 | memset(mac, 0, sizeof(*mac)); | 48 | memset(mac, 0, sizeof(*mac)); |
49 | spin_lock_init(&mac->lock); | 49 | spin_lock_init(&mac->lock); |
50 | mac->netdev = netdev; | 50 | mac->netdev = netdev; |
51 | INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work, mac); | 51 | INIT_DELAYED_WORK(&mac->set_rts_cts_work, set_rts_cts_work); |
52 | INIT_WORK(&mac->set_basic_rates_work, set_basic_rates_work, mac); | 52 | INIT_DELAYED_WORK(&mac->set_basic_rates_work, set_basic_rates_work); |
53 | 53 | ||
54 | ieee_init(ieee); | 54 | ieee_init(ieee); |
55 | softmac_init(ieee80211_priv(netdev)); | 55 | softmac_init(ieee80211_priv(netdev)); |
@@ -366,9 +366,10 @@ static void try_enable_tx(struct zd_mac *mac) | |||
366 | spin_unlock_irqrestore(&mac->lock, flags); | 366 | spin_unlock_irqrestore(&mac->lock, flags); |
367 | } | 367 | } |
368 | 368 | ||
369 | static void set_rts_cts_work(void *d) | 369 | static void set_rts_cts_work(struct work_struct *work) |
370 | { | 370 | { |
371 | struct zd_mac *mac = d; | 371 | struct zd_mac *mac = |
372 | container_of(work, struct zd_mac, set_rts_cts_work.work); | ||
372 | unsigned long flags; | 373 | unsigned long flags; |
373 | u8 rts_rate; | 374 | u8 rts_rate; |
374 | unsigned int short_preamble; | 375 | unsigned int short_preamble; |
@@ -387,9 +388,10 @@ static void set_rts_cts_work(void *d) | |||
387 | try_enable_tx(mac); | 388 | try_enable_tx(mac); |
388 | } | 389 | } |
389 | 390 | ||
390 | static void set_basic_rates_work(void *d) | 391 | static void set_basic_rates_work(struct work_struct *work) |
391 | { | 392 | { |
392 | struct zd_mac *mac = d; | 393 | struct zd_mac *mac = |
394 | container_of(work, struct zd_mac, set_basic_rates_work.work); | ||
393 | unsigned long flags; | 395 | unsigned long flags; |
394 | u16 basic_rates; | 396 | u16 basic_rates; |
395 | 397 | ||
@@ -467,12 +469,13 @@ static void bssinfo_change(struct net_device *netdev, u32 changes) | |||
467 | if (need_set_rts_cts && !mac->updating_rts_rate) { | 469 | if (need_set_rts_cts && !mac->updating_rts_rate) { |
468 | mac->updating_rts_rate = 1; | 470 | mac->updating_rts_rate = 1; |
469 | netif_stop_queue(mac->netdev); | 471 | netif_stop_queue(mac->netdev); |
470 | queue_work(zd_workqueue, &mac->set_rts_cts_work); | 472 | queue_delayed_work(zd_workqueue, &mac->set_rts_cts_work, 0); |
471 | } | 473 | } |
472 | if (need_set_rates && !mac->updating_basic_rates) { | 474 | if (need_set_rates && !mac->updating_basic_rates) { |
473 | mac->updating_basic_rates = 1; | 475 | mac->updating_basic_rates = 1; |
474 | netif_stop_queue(mac->netdev); | 476 | netif_stop_queue(mac->netdev); |
475 | queue_work(zd_workqueue, &mac->set_basic_rates_work); | 477 | queue_delayed_work(zd_workqueue, &mac->set_basic_rates_work, |
478 | 0); | ||
476 | } | 479 | } |
477 | spin_unlock_irqrestore(&mac->lock, flags); | 480 | spin_unlock_irqrestore(&mac->lock, flags); |
478 | } | 481 | } |
@@ -1182,9 +1185,10 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev) | |||
1182 | 1185 | ||
1183 | #define LINK_LED_WORK_DELAY HZ | 1186 | #define LINK_LED_WORK_DELAY HZ |
1184 | 1187 | ||
1185 | static void link_led_handler(void *p) | 1188 | static void link_led_handler(struct work_struct *work) |
1186 | { | 1189 | { |
1187 | struct zd_mac *mac = p; | 1190 | struct zd_mac *mac = |
1191 | container_of(work, struct zd_mac, housekeeping.link_led_work.work); | ||
1188 | struct zd_chip *chip = &mac->chip; | 1192 | struct zd_chip *chip = &mac->chip; |
1189 | struct ieee80211softmac_device *sm = ieee80211_priv(mac->netdev); | 1193 | struct ieee80211softmac_device *sm = ieee80211_priv(mac->netdev); |
1190 | int is_associated; | 1194 | int is_associated; |
@@ -1205,7 +1209,7 @@ static void link_led_handler(void *p) | |||
1205 | 1209 | ||
1206 | static void housekeeping_init(struct zd_mac *mac) | 1210 | static void housekeeping_init(struct zd_mac *mac) |
1207 | { | 1211 | { |
1208 | INIT_WORK(&mac->housekeeping.link_led_work, link_led_handler, mac); | 1212 | INIT_DELAYED_WORK(&mac->housekeeping.link_led_work, link_led_handler); |
1209 | } | 1213 | } |
1210 | 1214 | ||
1211 | static void housekeeping_enable(struct zd_mac *mac) | 1215 | static void housekeeping_enable(struct zd_mac *mac) |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h index 5dcfb251f02e..d4e8b870409d 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.h +++ b/drivers/net/wireless/zd1211rw/zd_mac.h | |||
@@ -119,7 +119,7 @@ struct rx_status { | |||
119 | #define ZD_RX_ERROR 0x80 | 119 | #define ZD_RX_ERROR 0x80 |
120 | 120 | ||
121 | struct housekeeping { | 121 | struct housekeeping { |
122 | struct work_struct link_led_work; | 122 | struct delayed_work link_led_work; |
123 | }; | 123 | }; |
124 | 124 | ||
125 | #define ZD_MAC_STATS_BUFFER_SIZE 16 | 125 | #define ZD_MAC_STATS_BUFFER_SIZE 16 |
@@ -133,8 +133,8 @@ struct zd_mac { | |||
133 | struct iw_statistics iw_stats; | 133 | struct iw_statistics iw_stats; |
134 | 134 | ||
135 | struct housekeeping housekeeping; | 135 | struct housekeeping housekeeping; |
136 | struct work_struct set_rts_cts_work; | 136 | struct delayed_work set_rts_cts_work; |
137 | struct work_struct set_basic_rates_work; | 137 | struct delayed_work set_basic_rates_work; |
138 | 138 | ||
139 | unsigned int stats_count; | 139 | unsigned int stats_count; |
140 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; | 140 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; |