Skip to content

Commit

Permalink
b43: Protect sanity check against physical device removal
Browse files Browse the repository at this point in the history
Fix IRQ mask sanity check for physically pulled device.

Tested-by: Andrew Price <andy@andrewprice.me.uk>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Michael Buesch authored and John W. Linville committed Oct 7, 2009
1 parent 886e71d commit 49d965c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3874,6 +3874,7 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
{
struct b43_wl *wl = dev->wl;
struct b43_wldev *orig_dev;
u32 mask;

redo:
if (!dev || b43_status(dev) < B43_STAT_STARTED)
Expand Down Expand Up @@ -3920,7 +3921,8 @@ static struct b43_wldev * b43_wireless_core_stop(struct b43_wldev *dev)
goto redo;
return dev;
}
B43_WARN_ON(b43_read32(dev, B43_MMIO_GEN_IRQ_MASK));
mask = b43_read32(dev, B43_MMIO_GEN_IRQ_MASK);
B43_WARN_ON(mask != 0xFFFFFFFF && mask);

/* Drain the TX queue */
while (skb_queue_len(&wl->tx_queue))
Expand Down

0 comments on commit 49d965c

Please sign in to comment.