aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm43xx/bcm43xx_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index a94c6d8826f8..65edb56107fd 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -3163,9 +3163,11 @@ static int estimate_periodic_work_badness(unsigned int state)
3163static void bcm43xx_periodic_work_handler(void *d) 3163static void bcm43xx_periodic_work_handler(void *d)
3164{ 3164{
3165 struct bcm43xx_private *bcm = d; 3165 struct bcm43xx_private *bcm = d;
3166 struct net_device *net_dev = bcm->net_dev;
3166 unsigned long flags; 3167 unsigned long flags;
3167 u32 savedirqs = 0; 3168 u32 savedirqs = 0;
3168 int badness; 3169 int badness;
3170 unsigned long orig_trans_start = 0;
3169 3171
3170 mutex_lock(&bcm->mutex); 3172 mutex_lock(&bcm->mutex);
3171 badness = estimate_periodic_work_badness(bcm->periodic_state); 3173 badness = estimate_periodic_work_badness(bcm->periodic_state);
@@ -3173,7 +3175,18 @@ static void bcm43xx_periodic_work_handler(void *d)
3173 /* Periodic work will take a long time, so we want it to 3175 /* Periodic work will take a long time, so we want it to
3174 * be preemtible. 3176 * be preemtible.
3175 */ 3177 */
3176 netif_tx_disable(bcm->net_dev); 3178
3179 netif_tx_lock_bh(net_dev);
3180 /* We must fake a started transmission here, as we are going to
3181 * disable TX. If we wouldn't fake a TX, it would be possible to
3182 * trigger the netdev watchdog, if the last real TX is already
3183 * some time on the past (slightly less than 5secs)
3184 */
3185 orig_trans_start = net_dev->trans_start;
3186 net_dev->trans_start = jiffies;
3187 netif_stop_queue(net_dev);
3188 netif_tx_unlock_bh(net_dev);
3189
3177 spin_lock_irqsave(&bcm->irq_lock, flags); 3190 spin_lock_irqsave(&bcm->irq_lock, flags);
3178 bcm43xx_mac_suspend(bcm); 3191 bcm43xx_mac_suspend(bcm);
3179 if (bcm43xx_using_pio(bcm)) 3192 if (bcm43xx_using_pio(bcm))
@@ -3198,6 +3211,7 @@ static void bcm43xx_periodic_work_handler(void *d)
3198 bcm43xx_pio_thaw_txqueues(bcm); 3211 bcm43xx_pio_thaw_txqueues(bcm);
3199 bcm43xx_mac_enable(bcm); 3212 bcm43xx_mac_enable(bcm);
3200 netif_wake_queue(bcm->net_dev); 3213 netif_wake_queue(bcm->net_dev);
3214 net_dev->trans_start = orig_trans_start;
3201 } 3215 }
3202 mmiowb(); 3216 mmiowb();
3203 spin_unlock_irqrestore(&bcm->irq_lock, flags); 3217 spin_unlock_irqrestore(&bcm->irq_lock, flags);