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 a1b783813d8e..728a9b789fdf 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3177,9 +3177,10 @@ static int estimate_periodic_work_badness(unsigned int state) | |||
3177 | return badness; | 3177 | return badness; |
3178 | } | 3178 | } |
3179 | 3179 | ||
3180 | static void bcm43xx_periodic_work_handler(void *d) | 3180 | static void bcm43xx_periodic_work_handler(struct work_struct *work) |
3181 | { | 3181 | { |
3182 | struct bcm43xx_private *bcm = d; | 3182 | struct bcm43xx_private *bcm = |
3183 | container_of(work, struct bcm43xx_private, periodic_work.work); | ||
3183 | struct net_device *net_dev = bcm->net_dev; | 3184 | struct net_device *net_dev = bcm->net_dev; |
3184 | unsigned long flags; | 3185 | unsigned long flags; |
3185 | u32 savedirqs = 0; | 3186 | u32 savedirqs = 0; |
@@ -3242,11 +3243,11 @@ void bcm43xx_periodic_tasks_delete(struct bcm43xx_private *bcm) | |||
3242 | 3243 | ||
3243 | void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) | 3244 | void bcm43xx_periodic_tasks_setup(struct bcm43xx_private *bcm) |
3244 | { | 3245 | { |
3245 | struct work_struct *work = &(bcm->periodic_work); | 3246 | struct delayed_work *work = &bcm->periodic_work; |
3246 | 3247 | ||
3247 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); | 3248 | assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED); |
3248 | INIT_WORK(work, bcm43xx_periodic_work_handler, bcm); | 3249 | INIT_DELAYED_WORK(work, bcm43xx_periodic_work_handler); |
3249 | schedule_work(work); | 3250 | schedule_delayed_work(work, 0); |
3250 | } | 3251 | } |
3251 | 3252 | ||
3252 | static void bcm43xx_security_init(struct bcm43xx_private *bcm) | 3253 | static void bcm43xx_security_init(struct bcm43xx_private *bcm) |
@@ -3598,7 +3599,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm) | |||
3598 | bcm43xx_periodic_tasks_setup(bcm); | 3599 | bcm43xx_periodic_tasks_setup(bcm); |
3599 | 3600 | ||
3600 | /*FIXME: This should be handled by softmac instead. */ | 3601 | /*FIXME: This should be handled by softmac instead. */ |
3601 | schedule_work(&bcm->softmac->associnfo.work); | 3602 | schedule_delayed_work(&bcm->softmac->associnfo.work, 0); |
3602 | 3603 | ||
3603 | out: | 3604 | out: |
3604 | mutex_unlock(&(bcm)->mutex); | 3605 | mutex_unlock(&(bcm)->mutex); |
@@ -4149,9 +4150,10 @@ static void __devexit bcm43xx_remove_one(struct pci_dev *pdev) | |||
4149 | /* Hard-reset the chip. Do not call this directly. | 4150 | /* Hard-reset the chip. Do not call this directly. |
4150 | * Use bcm43xx_controller_restart() | 4151 | * Use bcm43xx_controller_restart() |
4151 | */ | 4152 | */ |
4152 | static void bcm43xx_chip_reset(void *_bcm) | 4153 | static void bcm43xx_chip_reset(struct work_struct *work) |
4153 | { | 4154 | { |
4154 | struct bcm43xx_private *bcm = _bcm; | 4155 | struct bcm43xx_private *bcm = |
4156 | container_of(work, struct bcm43xx_private, restart_work); | ||
4155 | struct bcm43xx_phyinfo *phy; | 4157 | struct bcm43xx_phyinfo *phy; |
4156 | int err = -ENODEV; | 4158 | int err = -ENODEV; |
4157 | 4159 | ||
@@ -4178,7 +4180,7 @@ void bcm43xx_controller_restart(struct bcm43xx_private *bcm, const char *reason) | |||
4178 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) | 4180 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) |
4179 | return; | 4181 | return; |
4180 | printk(KERN_ERR PFX "Controller RESET (%s) ...\n", reason); | 4182 | printk(KERN_ERR PFX "Controller RESET (%s) ...\n", reason); |
4181 | INIT_WORK(&bcm->restart_work, bcm43xx_chip_reset, bcm); | 4183 | INIT_WORK(&bcm->restart_work, bcm43xx_chip_reset); |
4182 | schedule_work(&bcm->restart_work); | 4184 | schedule_work(&bcm->restart_work); |
4183 | } | 4185 | } |
4184 | 4186 | ||