Skip to content

Commit

Permalink
[PATCH] bcm43xx: move initialized = 1 to the end of init_board.
Browse files Browse the repository at this point in the history
Note that the periodic work has to be started with initialized==1

Signed-off-by: Michael Buesch <mbuesch@freenet.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Michael Buesch authored and John W. Linville committed Mar 27, 2006
1 parent bf7b876 commit cad2b31
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3484,15 +3484,17 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm)

bcm43xx_pctl_set_clock(bcm, BCM43xx_PCTL_CLK_DYNAMIC);

spin_lock_irqsave(&bcm->lock, flags);
bcm->initialized = 1;
spin_unlock_irqrestore(&bcm->lock, flags);

if (bcm->current_core->radio->initial_channel != 0xFF) {
bcm43xx_mac_suspend(bcm);
bcm43xx_radio_selectchannel(bcm, bcm->current_core->radio->initial_channel, 0);
bcm43xx_mac_enable(bcm);
}

/* Initialization of the board is done. Flag it as such. */
spin_lock_irqsave(&bcm->lock, flags);
bcm->initialized = 1;
spin_unlock_irqrestore(&bcm->lock, flags);

bcm43xx_periodic_tasks_setup(bcm);

assert(err == 0);
Expand Down

0 comments on commit cad2b31

Please sign in to comment.