Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40745
b: refs/heads/master
c: 81e171b
h: refs/heads/master
i:
  40743: d8a9cea
v: v3
  • Loading branch information
Michael Buesch authored and John W. Linville committed Nov 1, 2006
1 parent 9146d2c commit d74501b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 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: 115e222d538e7838bffa0f76409acd9816a0ef32
refs/heads/master: 81e171b95d2d06a64465a1e6ab1e2fb864ea2448
16 changes: 15 additions & 1 deletion trunk/drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3163,17 +3163,30 @@ static int estimate_periodic_work_badness(unsigned int state)
static void bcm43xx_periodic_work_handler(void *d)
{
struct bcm43xx_private *bcm = d;
struct net_device *net_dev = bcm->net_dev;
unsigned long flags;
u32 savedirqs = 0;
int badness;
unsigned long orig_trans_start = 0;

mutex_lock(&bcm->mutex);
badness = estimate_periodic_work_badness(bcm->periodic_state);
if (badness > BADNESS_LIMIT) {
/* Periodic work will take a long time, so we want it to
* be preemtible.
*/
netif_tx_disable(bcm->net_dev);

netif_tx_lock_bh(net_dev);
/* We must fake a started transmission here, as we are going to
* disable TX. If we wouldn't fake a TX, it would be possible to
* trigger the netdev watchdog, if the last real TX is already
* some time on the past (slightly less than 5secs)
*/
orig_trans_start = net_dev->trans_start;
net_dev->trans_start = jiffies;
netif_stop_queue(net_dev);
netif_tx_unlock_bh(net_dev);

spin_lock_irqsave(&bcm->irq_lock, flags);
bcm43xx_mac_suspend(bcm);
if (bcm43xx_using_pio(bcm))
Expand All @@ -3198,6 +3211,7 @@ static void bcm43xx_periodic_work_handler(void *d)
bcm43xx_pio_thaw_txqueues(bcm);
bcm43xx_mac_enable(bcm);
netif_wake_queue(bcm->net_dev);
net_dev->trans_start = orig_trans_start;
}
mmiowb();
spin_unlock_irqrestore(&bcm->irq_lock, flags);
Expand Down

0 comments on commit d74501b

Please sign in to comment.