Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35117
b: refs/heads/master
c: f1207ba
h: refs/heads/master
i:
  35115: 34e66e0
v: v3
  • Loading branch information
John W. Linville committed Jul 27, 2006
1 parent 7d80c15 commit e0668a0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27be44ff8ee29e945adad226cc360c9278239d17
refs/heads/master: f1207ba1a756610a9880fe4b70d7f0e9f0627073
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ static ssize_t restart_write_file(struct file *file, const char __user *user_buf
res = -EFAULT;
goto out_up;
}
bcm43xx_lock_irqsafe(bcm, flags);
mutex_lock(&(bcm)->mutex);
spin_lock_irqsave(&(bcm)->irq_lock, flags);
if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) {
printk(KERN_INFO PFX "debugfs: Board not initialized.\n");
res = -EFAULT;
Expand All @@ -344,7 +345,8 @@ static ssize_t restart_write_file(struct file *file, const char __user *user_buf
res = -EINVAL;

out_unlock:
bcm43xx_unlock_irqsafe(bcm, flags);
spin_unlock_irqrestore(&(bcm)->irq_lock, flags);
mutex_unlock(&(bcm)->mutex);
out_up:
up(&big_buffer_sem);
return res;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3199,9 +3199,9 @@ static int bcm43xx_rng_read(struct hwrng *rng, u32 *data)
struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv;
unsigned long flags;

bcm43xx_lock_irqonly(bcm, flags);
spin_lock_irqsave(&(bcm)->irq_lock, flags);
*data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG);
bcm43xx_unlock_irqonly(bcm, flags);
spin_unlock_irqrestore(&(bcm)->irq_lock, flags);

return (sizeof(u16));
}
Expand Down Expand Up @@ -3264,10 +3264,10 @@ static void bcm43xx_free_board(struct bcm43xx_private *bcm)
bcm43xx_sysfs_unregister(bcm);
bcm43xx_periodic_tasks_delete(bcm);

bcm43xx_lock_noirq(bcm);
mutex_lock(&(bcm)->mutex);
bcm43xx_shutdown_all_wireless_cores(bcm);
bcm43xx_pctl_set_crystal(bcm, 0);
bcm43xx_unlock_noirq(bcm);
mutex_unlock(&(bcm)->mutex);
}

static void prepare_phydata_for_init(struct bcm43xx_phyinfo *phy)
Expand Down Expand Up @@ -3511,7 +3511,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm)
{
int err;

bcm43xx_lock_noirq(bcm);
mutex_lock(&(bcm)->mutex);

tasklet_enable(&bcm->isr_tasklet);
err = bcm43xx_pctl_set_crystal(bcm, 1);
Expand All @@ -3533,7 +3533,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm)
schedule_work(&bcm->softmac->associnfo.work);

out:
bcm43xx_unlock_noirq(bcm);
mutex_unlock(&(bcm)->mutex);

return err;

Expand Down Expand Up @@ -4097,10 +4097,10 @@ static void bcm43xx_chip_reset(void *_bcm)
struct bcm43xx_phyinfo *phy;
int err;

bcm43xx_lock_noirq(bcm);
mutex_lock(&(bcm)->mutex);
phy = bcm43xx_current_phy(bcm);
err = bcm43xx_select_wireless_core(bcm, phy->type);
bcm43xx_unlock_noirq(bcm);
mutex_unlock(&(bcm)->mutex);

printk(KERN_ERR PFX "Controller restart%s\n",
(err == 0) ? "ed" : " failed");
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ static ssize_t bcm43xx_attr_phymode_store(struct device *dev,
goto out;
}

bcm43xx_lock_noirq(bcm);
mutex_lock(&(bcm)->mutex);
err = bcm43xx_select_wireless_core(bcm, phytype);
bcm43xx_unlock_noirq(bcm);
mutex_unlock(&(bcm)->mutex);
if (err == -ESRCH)
err = -ENODEV;

Expand All @@ -350,7 +350,7 @@ static ssize_t bcm43xx_attr_phymode_show(struct device *dev,
struct bcm43xx_private *bcm = dev_to_bcm(dev);
ssize_t count = 0;

bcm43xx_lock_noirq(bcm);
mutex_lock(&(bcm)->mutex);
switch (bcm43xx_current_phy(bcm)->type) {
case BCM43xx_PHYTYPE_A:
snprintf(buf, PAGE_SIZE, "A");
Expand All @@ -364,7 +364,7 @@ static ssize_t bcm43xx_attr_phymode_show(struct device *dev,
default:
assert(0);
}
bcm43xx_unlock_noirq(bcm);
mutex_unlock(&(bcm)->mutex);

return count;
}
Expand Down

0 comments on commit e0668a0

Please sign in to comment.