diff options
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 20 |
1 files changed, 11 insertions, 9 deletions
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 | ||